aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-01-02 09:01:32 +0000
committerDenys Vlasenko <vda.linux@googlemail.com>2024-07-10 07:21:20 +0200
commit87c31609f40c98203bbc9c30117a15a9342b2d4c (patch)
tree89fb62a1e4b405871b154f22f08b6b2d6907ffcd
parentba0f94458bf992bb1f34c75e36960811d77b5f55 (diff)
downloadbusybox-w32-87c31609f40c98203bbc9c30117a15a9342b2d4c.tar.gz
busybox-w32-87c31609f40c98203bbc9c30117a15a9342b2d4c.tar.bz2
busybox-w32-87c31609f40c98203bbc9c30117a15a9342b2d4c.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> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--Makefile.flags6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile.flags b/Makefile.flags
index e4cd658fd..97cb4dca2 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -48,7 +48,7 @@ endif
48# gcc 3.x emits bogus "old style proto" warning on find.c:alloc_action() 48# gcc 3.x emits bogus "old style proto" warning on find.c:alloc_action()
49CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition) 49CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition)
50 50
51ifneq ($(CC),clang) 51ifneq ($(lastword $(subst -, ,$(CC))),clang)
52# "clang-9: warning: optimization flag '-finline-limit=0' is not supported 52# "clang-9: warning: optimization flag '-finline-limit=0' is not supported
53CFLAGS += $(call cc-option,-finline-limit=0,) 53CFLAGS += $(call cc-option,-finline-limit=0,)
54endif 54endif
@@ -66,7 +66,7 @@ CFLAGS += $(call cc-option,-static-libgcc,)
66endif 66endif
67 67
68CFLAGS += $(call cc-option,-falign-functions=1,) 68CFLAGS += $(call cc-option,-falign-functions=1,)
69ifneq ($(CC),clang) 69ifneq ($(lastword $(subst -, ,$(CC))),clang)
70# "clang-9: warning: optimization flag '-falign-jumps=1' is not supported" (and same for other two) 70# "clang-9: warning: optimization flag '-falign-jumps=1' is not supported" (and same for other two)
71CFLAGS += $(call cc-option,-falign-jumps=1 -falign-labels=1 -falign-loops=1,) 71CFLAGS += $(call cc-option,-falign-jumps=1 -falign-labels=1 -falign-loops=1,)
72endif 72endif
@@ -79,7 +79,7 @@ CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables,)
79CFLAGS += $(call cc-option,-fno-builtin-printf,) 79CFLAGS += $(call cc-option,-fno-builtin-printf,)
80 80
81# clang-9 does not like "str" + N and "if (CONFIG_ITEM && cond)" constructs 81# clang-9 does not like "str" + N and "if (CONFIG_ITEM && cond)" constructs
82ifeq ($(CC),clang) 82ifeq ($(lastword $(subst -, ,$(CC))),clang)
83CFLAGS += $(call cc-option,-Wno-string-plus-int -Wno-constant-logical-operand) 83CFLAGS += $(call cc-option,-Wno-string-plus-int -Wno-constant-logical-operand)
84endif 84endif
85 85