multipath-tools: Makefile.inc: test for -Wno-clobbered support
authorMartin Wilck <mwilck@suse.com>
Sat, 12 Oct 2019 21:29:07 +0000 (21:29 +0000)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Mon, 2 Mar 2020 08:40:44 +0000 (09:40 +0100)
clang doesn't support this option.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Makefile.inc

index 5876c6a..b399338 100644 (file)
@@ -90,10 +90,11 @@ TEST_CC_OPTION = $(shell \
 
 STACKPROT := $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector)
 ERROR_DISCARDED_QUALIFIERS := $(call TEST_CC_OPTION,-Werror=discarded-qualifiers,)
+WNOCLOBBERED := $(call TEST_CC_OPTION,-Wno-clobbered,)
 
 OPTFLAGS       = -O2 -g -pipe -Werror -Wall -Wextra -Wformat=2 -Werror=implicit-int \
                  -Werror=implicit-function-declaration -Werror=format-security \
-                 -Wno-clobbered \
+                 $(WNOCLOBBERED) \
                  -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) \
                  $(STACKPROT) --param=ssp-buffer-size=4
 CPPFLAGS       := -Wp,-D_FORTIFY_SOURCE=2