multipath-tools: Makefile.inc: fix TEST_CC_OPTION
authorMartin Wilck <mwilck@suse.com>
Sat, 12 Oct 2019 21:28:59 +0000 (21:28 +0000)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Mon, 2 Mar 2020 10:11:53 +0000 (11:11 +0100)
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

index b399338..d4d1e0d 100644 (file)
@@ -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 \