diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2024-05-15 23:30:59 +0200 |
---|---|---|
committer | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-06-18 13:02:53 +0200 |
commit | 027b2d37a8cd56973d117107acc25a64cfe0a92f (patch) | |
tree | 013957ebe26761c1a286669abf39b2c49586cf3d /Makefile | |
parent | mdadm: Fix socket connection failure when mdmon runs in foreground mode. (diff) | |
download | mdadm-027b2d37a8cd56973d117107acc25a64cfe0a92f.tar.xz mdadm-027b2d37a8cd56973d117107acc25a64cfe0a92f.zip |
Makefile: Do not call gcc directly
When mdadm is compiled with clang, direct gcc will fail.
Make sure to use $(CC) variable instead.
Note that Clang does not support --help=warnings,
--print-diagnostic-options should be used instead.
So with Clang, the compilation will go through, but the
extra warning flags will never be added.
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -56,21 +56,21 @@ CWFLAGS += -Wp -O3 endif ifeq ($(origin FALLTHROUGH), undefined) - FALLTHROUGH := $(shell gcc -Q --help=warnings 2>&1 | grep "implicit-fallthrough" | wc -l) + FALLTHROUGH := $(shell $(CC) -Q --help=warnings 2>&1 | grep "implicit-fallthrough" | wc -l) ifneq "$(FALLTHROUGH)" "0" CWFLAGS += -Wimplicit-fallthrough=0 endif endif ifeq ($(origin FORMATOVERFLOW), undefined) - FORMATOVERFLOW := $(shell gcc -Q --help=warnings 2>&1 | grep "format-overflow" | wc -l) + FORMATOVERFLOW := $(shell $(CC) -Q --help=warnings 2>&1 | grep "format-overflow" | wc -l) ifneq "$(FORMATOVERFLOW)" "0" CWFLAGS += -Wformat-overflow endif endif ifeq ($(origin STRINGOPOVERFLOW), undefined) - STRINGOPOVERFLOW := $(shell gcc -Q --help=warnings 2>&1 | grep "stringop-overflow" | wc -l) + STRINGOPOVERFLOW := $(shell $(CC) -Q --help=warnings 2>&1 | grep "stringop-overflow" | wc -l) ifneq "$(STRINGOPOVERFLOW)" "0" CWFLAGS += -Wstringop-overflow endif |