diff options
author | Ron Yorston <rmy@pobox.com> | 2024-01-02 08:48:58 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-01-17 11:57:23 +0000 |
commit | c0b57922a9373395c58139b2d4fe4cd865ef8223 (patch) | |
tree | f5d4d7ba37a275764ebab5c96627d35b1fd1a6f1 | |
parent | f27442f8e9a9a8ef706e2c0b4b0c15453f64e080 (diff) | |
download | busybox-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.flags | 6 |
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() |
50 | CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition) | 50 | CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition) |
51 | 51 | ||
52 | ifneq ($(CC),clang) | 52 | ifneq ($(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 |
54 | CFLAGS += $(call cc-option,-finline-limit=0,) | 54 | CFLAGS += $(call cc-option,-finline-limit=0,) |
55 | endif | 55 | endif |
@@ -67,7 +67,7 @@ CFLAGS += $(call cc-option,-static-libgcc,) | |||
67 | endif | 67 | endif |
68 | 68 | ||
69 | CFLAGS += $(call cc-option,-falign-functions=1,) | 69 | CFLAGS += $(call cc-option,-falign-functions=1,) |
70 | ifneq ($(CC),clang) | 70 | ifneq ($(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) |
72 | CFLAGS += $(call cc-option,-falign-jumps=1 -falign-labels=1 -falign-loops=1,) | 72 | CFLAGS += $(call cc-option,-falign-jumps=1 -falign-labels=1 -falign-loops=1,) |
73 | endif | 73 | endif |
@@ -80,7 +80,7 @@ CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables,) | |||
80 | CFLAGS += $(call cc-option,-fno-builtin-printf,) | 80 | CFLAGS += $(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 |
83 | ifeq ($(CC),clang) | 83 | ifeq ($(lastword $(subst -, ,$(CC))),clang) |
84 | CFLAGS += $(call cc-option,-Wno-string-plus-int -Wno-constant-logical-operand) | 84 | CFLAGS += $(call cc-option,-Wno-string-plus-int -Wno-constant-logical-operand) |
85 | endif | 85 | endif |
86 | 86 | ||