diff options
author | Ron Yorston <rmy@pobox.com> | 2024-01-02 09:01:32 +0000 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2024-07-10 07:21:20 +0200 |
commit | 87c31609f40c98203bbc9c30117a15a9342b2d4c (patch) | |
tree | 89fb62a1e4b405871b154f22f08b6b2d6907ffcd | |
parent | ba0f94458bf992bb1f34c75e36960811d77b5f55 (diff) | |
download | busybox-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.flags | 6 |
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() |
49 | CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition) | 49 | CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition) |
50 | 50 | ||
51 | ifneq ($(CC),clang) | 51 | ifneq ($(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 |
53 | CFLAGS += $(call cc-option,-finline-limit=0,) | 53 | CFLAGS += $(call cc-option,-finline-limit=0,) |
54 | endif | 54 | endif |
@@ -66,7 +66,7 @@ CFLAGS += $(call cc-option,-static-libgcc,) | |||
66 | endif | 66 | endif |
67 | 67 | ||
68 | CFLAGS += $(call cc-option,-falign-functions=1,) | 68 | CFLAGS += $(call cc-option,-falign-functions=1,) |
69 | ifneq ($(CC),clang) | 69 | ifneq ($(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) |
71 | CFLAGS += $(call cc-option,-falign-jumps=1 -falign-labels=1 -falign-loops=1,) | 71 | CFLAGS += $(call cc-option,-falign-jumps=1 -falign-labels=1 -falign-loops=1,) |
72 | endif | 72 | endif |
@@ -79,7 +79,7 @@ CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables,) | |||
79 | CFLAGS += $(call cc-option,-fno-builtin-printf,) | 79 | CFLAGS += $(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 |
82 | ifeq ($(CC),clang) | 82 | ifeq ($(lastword $(subst -, ,$(CC))),clang) |
83 | CFLAGS += $(call cc-option,-Wno-string-plus-int -Wno-constant-logical-operand) | 83 | CFLAGS += $(call cc-option,-Wno-string-plus-int -Wno-constant-logical-operand) |
84 | endif | 84 | endif |
85 | 85 | ||