diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2019-10-25 12:56:51 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2019-10-25 12:56:51 +0200 |
commit | b4ef2e3467d8e980ccf13c9dd342459c013b455f (patch) | |
tree | 0cda70aa17a210c24810b0402e73a98c69dd732f | |
parent | af7169b4a70eb3f60555ced17a40780f70aaaa5c (diff) | |
download | busybox-w32-b4ef2e3467d8e980ccf13c9dd342459c013b455f.tar.gz busybox-w32-b4ef2e3467d8e980ccf13c9dd342459c013b455f.tar.bz2 busybox-w32-b4ef2e3467d8e980ccf13c9dd342459c013b455f.zip |
Makefile.flags: suppress some clang-9 warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | Makefile.flags | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/Makefile.flags b/Makefile.flags index bea464753..e378fbad9 100644 --- a/Makefile.flags +++ b/Makefile.flags | |||
@@ -47,12 +47,28 @@ endif | |||
47 | # gcc 3.x emits bogus "old style proto" warning on find.c:alloc_action() | 47 | # gcc 3.x emits bogus "old style proto" warning on find.c:alloc_action() |
48 | CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition) | 48 | CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition) |
49 | 49 | ||
50 | CFLAGS += $(call cc-option,-fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections,) | 50 | ifneq ($(CC),clang) |
51 | # "clang-9: warning: optimization flag '-finline-limit=0' is not supported | ||
52 | CFLAGS += $(call cc-option,-finline-limit=0,) | ||
53 | endif | ||
54 | |||
55 | CFLAGS += $(call cc-option,-fno-builtin-strlen -fomit-frame-pointer -ffunction-sections -fdata-sections,) | ||
51 | # -fno-guess-branch-probability: prohibit pseudo-random guessing | 56 | # -fno-guess-branch-probability: prohibit pseudo-random guessing |
52 | # of branch probabilities (hopefully makes bloatcheck more stable): | 57 | # of branch probabilities (hopefully makes bloatcheck more stable): |
53 | CFLAGS += $(call cc-option,-fno-guess-branch-probability,) | 58 | CFLAGS += $(call cc-option,-fno-guess-branch-probability,) |
54 | CFLAGS += $(call cc-option,-funsigned-char -static-libgcc,) | 59 | CFLAGS += $(call cc-option,-funsigned-char,) |
55 | CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1,) | 60 | |
61 | ifneq ($(CC),clang) | ||
62 | # "clang-9: warning: argument unused during compilation: '-static-libgcc'" | ||
63 | CFLAGS += $(call cc-option,-static-libgcc,) | ||
64 | endif | ||
65 | |||
66 | CFLAGS += $(call cc-option,-falign-functions=1,) | ||
67 | ifneq ($(CC),clang) | ||
68 | # "clang-9: warning: optimization flag '-falign-jumps=1' is not supported" (and same for other two) | ||
69 | CFLAGS += $(call cc-option,-falign-jumps=1 -falign-labels=1 -falign-loops=1,) | ||
70 | endif | ||
71 | |||
56 | # Defeat .eh_frame bloat (gcc 4.6.3 x86-32 defconfig: 20% smaller busybox binary): | 72 | # Defeat .eh_frame bloat (gcc 4.6.3 x86-32 defconfig: 20% smaller busybox binary): |
57 | CFLAGS += $(call cc-option,-fno-unwind-tables,) | 73 | CFLAGS += $(call cc-option,-fno-unwind-tables,) |
58 | CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables,) | 74 | CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables,) |
@@ -60,6 +76,9 @@ CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables,) | |||
60 | # (try disabling this and comparing assembly, it's instructive) | 76 | # (try disabling this and comparing assembly, it's instructive) |
61 | CFLAGS += $(call cc-option,-fno-builtin-printf,) | 77 | CFLAGS += $(call cc-option,-fno-builtin-printf,) |
62 | 78 | ||
79 | # clang-9 does not like "str" + N and "if (CONFIG_ITEM && cond)" constructs | ||
80 | CFLAGS += $(call cc-option,-Wno-string-plus-int -Wno-constant-logical-operand) | ||
81 | |||
63 | # FIXME: These warnings are at least partially to be concerned about and should | 82 | # FIXME: These warnings are at least partially to be concerned about and should |
64 | # be fixed.. | 83 | # be fixed.. |
65 | #CFLAGS += $(call cc-option,-Wconversion,) | 84 | #CFLAGS += $(call cc-option,-Wconversion,) |