@@ -15,6 +15,7 @@ CPPFLAGS += \
1515 -include include/autoconf.h \
1616 -D_GNU_SOURCE -DNDEBUG \
1717 $(if $(CONFIG_LFS),-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) \
18+ $(if $(CONFIG_TIME64),-D_TIME_BITS=64) \
1819 -DBB_VER=$(squote)$(quote)$(BB_VER)$(quote)$(squote)
1920
2021CFLAGS += $(call cc-option,-Wall,)
4748# gcc 3.x emits bogus "old style proto" warning on find.c:alloc_action()
4849CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition)
4950
50- ifneq ($(CC ),clang)
51+ ifneq ($(lastword $(subst -, ,$(CC)) ),clang)
5152# "clang-9: warning: optimization flag '-finline-limit=0' is not supported
5253CFLAGS += $(call cc-option,-finline-limit=0,)
5354endif
@@ -65,7 +66,7 @@ CFLAGS += $(call cc-option,-static-libgcc,)
6566endif
6667
6768CFLAGS += $(call cc-option,-falign-functions=1,)
68- ifneq ($(CC ),clang)
69+ ifneq ($(lastword $(subst -, ,$(CC)) ),clang)
6970# "clang-9: warning: optimization flag '-falign-jumps=1' is not supported" (and same for other two)
7071CFLAGS += $(call cc-option,-falign-jumps=1 -falign-labels=1 -falign-loops=1,)
7172endif
@@ -78,7 +79,7 @@ CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables,)
7879CFLAGS += $(call cc-option,-fno-builtin-printf,)
7980
8081# clang-9 does not like "str" + N and "if (CONFIG_ITEM && cond)" constructs
81- ifeq ($(CC ),clang)
82+ ifeq ($(lastword $(subst -, ,$(CC)) ),clang)
8283CFLAGS += $(call cc-option,-Wno-string-plus-int -Wno-constant-logical-operand)
8384endif
8485
0 commit comments