aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2019-10-25 12:56:51 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2019-10-25 12:56:51 +0200
commitb4ef2e3467d8e980ccf13c9dd342459c013b455f (patch)
tree0cda70aa17a210c24810b0402e73a98c69dd732f
parentaf7169b4a70eb3f60555ced17a40780f70aaaa5c (diff)
downloadbusybox-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.flags25
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()
48CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition) 48CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition)
49 49
50CFLAGS += $(call cc-option,-fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections,) 50ifneq ($(CC),clang)
51# "clang-9: warning: optimization flag '-finline-limit=0' is not supported
52CFLAGS += $(call cc-option,-finline-limit=0,)
53endif
54
55CFLAGS += $(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):
53CFLAGS += $(call cc-option,-fno-guess-branch-probability,) 58CFLAGS += $(call cc-option,-fno-guess-branch-probability,)
54CFLAGS += $(call cc-option,-funsigned-char -static-libgcc,) 59CFLAGS += $(call cc-option,-funsigned-char,)
55CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1,) 60
61ifneq ($(CC),clang)
62# "clang-9: warning: argument unused during compilation: '-static-libgcc'"
63CFLAGS += $(call cc-option,-static-libgcc,)
64endif
65
66CFLAGS += $(call cc-option,-falign-functions=1,)
67ifneq ($(CC),clang)
68# "clang-9: warning: optimization flag '-falign-jumps=1' is not supported" (and same for other two)
69CFLAGS += $(call cc-option,-falign-jumps=1 -falign-labels=1 -falign-loops=1,)
70endif
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):
57CFLAGS += $(call cc-option,-fno-unwind-tables,) 73CFLAGS += $(call cc-option,-fno-unwind-tables,)
58CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables,) 74CFLAGS += $(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)
61CFLAGS += $(call cc-option,-fno-builtin-printf,) 77CFLAGS += $(call cc-option,-fno-builtin-printf,)
62 78
79# clang-9 does not like "str" + N and "if (CONFIG_ITEM && cond)" constructs
80CFLAGS += $(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,)