diff mbox series

[66/72] multipath-tools: Makefile.inc: fix TEST_CC_OPTION

Message ID 20191012212703.12989-67-martin.wilck@suse.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series multipath-tools: cleanup and warning enablement | expand

Commit Message

Martin Wilck Oct. 12, 2019, 9:28 p.m. UTC
From: Martin Wilck <mwilck@suse.com>

The test works only if the compiler actually errors out for an
unsupported warning option, which requires setting -Werror.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 Makefile.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Makefile.inc b/Makefile.inc
index 0c800ab3..d4d08fe9 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -81,7 +81,8 @@  INSTALL_PROGRAM	= install
 # Test if the C compiler supports the option.
 # Evaluates to "option" if yes, and "fallback" otherwise.
 TEST_CC_OPTION = $(shell \
-	if echo 'int main(void){return 0;}' | $(CC) -o /dev/null -c "$(1)" -xc - >/dev/null 2>&1; \
+	if echo 'int main(void){return 0;}' | \
+		$(CC) -o /dev/null -c -Werror "$(1)" -xc - >/dev/null 2>&1; \
 	then \
 		echo "$(1)"; \
 	else \