aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-01-02 08:48:58 +0000
committerRon Yorston <rmy@pobox.com>2024-01-17 11:57:23 +0000
commitc0b57922a9373395c58139b2d4fe4cd865ef8223 (patch)
treef5d4d7ba37a275764ebab5c96627d35b1fd1a6f1
parentf27442f8e9a9a8ef706e2c0b4b0c15453f64e080 (diff)
downloadbusybox-w32-c0b57922a9373395c58139b2d4fe4cd865ef8223.tar.gz
busybox-w32-c0b57922a9373395c58139b2d4fe4cd865ef8223.tar.bz2
busybox-w32-c0b57922a9373395c58139b2d4fe4cd865ef8223.zip
Makefile.flags: suppress clang warnings when cross-compiling
Extend the changes introduced by commit b4ef2e3467 (Makefile.flags: suppress some clang-9 warnings) so they also cover the case where clang is used as a cross-compiler. Signed-off-by: Ron Yorston <rmy@pobox.com>
-rw-r--r--Makefile.flags6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile.flags b/Makefile.flags
index bf22cec04..7d6bec8ec 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -49,7 +49,7 @@ endif
49# gcc 3.x emits bogus "old style proto" warning on find.c:alloc_action() 49# gcc 3.x emits bogus "old style proto" warning on find.c:alloc_action()
50CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition) 50CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition)
51 51
52ifneq ($(CC),clang) 52ifneq ($(lastword $(subst -, ,$(CC))),clang)
53# "clang-9: warning: optimization flag '-finline-limit=0' is not supported 53# "clang-9: warning: optimization flag '-finline-limit=0' is not supported
54CFLAGS += $(call cc-option,-finline-limit=0,) 54CFLAGS += $(call cc-option,-finline-limit=0,)
55endif 55endif
@@ -67,7 +67,7 @@ CFLAGS += $(call cc-option,-static-libgcc,)
67endif 67endif
68 68
69CFLAGS += $(call cc-option,-falign-functions=1,) 69CFLAGS += $(call cc-option,-falign-functions=1,)
70ifneq ($(CC),clang) 70ifneq ($(lastword $(subst -, ,$(CC))),clang)
71# "clang-9: warning: optimization flag '-falign-jumps=1' is not supported" (and same for other two) 71# "clang-9: warning: optimization flag '-falign-jumps=1' is not supported" (and same for other two)
72CFLAGS += $(call cc-option,-falign-jumps=1 -falign-labels=1 -falign-loops=1,) 72CFLAGS += $(call cc-option,-falign-jumps=1 -falign-labels=1 -falign-loops=1,)
73endif 73endif
@@ -80,7 +80,7 @@ CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables,)
80CFLAGS += $(call cc-option,-fno-builtin-printf,) 80CFLAGS += $(call cc-option,-fno-builtin-printf,)
81 81
82# clang-9 does not like "str" + N and "if (CONFIG_ITEM && cond)" constructs 82# clang-9 does not like "str" + N and "if (CONFIG_ITEM && cond)" constructs
83ifeq ($(CC),clang) 83ifeq ($(lastword $(subst -, ,$(CC))),clang)
84CFLAGS += $(call cc-option,-Wno-string-plus-int -Wno-constant-logical-operand) 84CFLAGS += $(call cc-option,-Wno-string-plus-int -Wno-constant-logical-operand)
85endif 85endif
86 86