diff options
author | Tom Rini <trini@konsulko.com> | 2021-10-10 15:20:47 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-10-11 08:45:12 -0400 |
commit | 8e72fb856d9da58ea16635b51d48445f5d14f9b6 (patch) | |
tree | 8fbfc77e58a88baf9acf67a0b6b6fe31a991280f | |
parent | f331497d3ad4166f9826e7674793ae04094b29c1 (diff) | |
download | u-boot-TEST/update-tools-c-std.zip u-boot-TEST/update-tools-c-std.tar.gz u-boot-TEST/update-tools-c-std.tar.bz2 |
tools: Stop re-defining -std= when building toolsTEST/update-tools-c-std
While we intentionally set -std=gnu11 for building host tools, and have
for quite some time, we never dropped -std=gnu99 from tools/Makefile.
This resulted in passing -std=gnu11 ... -std=gnu99 when building, and
gnu99 would win. This in turn would result now in warnings such as:
tools/mkeficapsule.c:25:15: warning: redefinition of typedef 'u32' is a C11 feature [-Wtypedef-redefinition]
typedef __u32 u32;
^
Signed-off-by: Tom Rini <trini@konsulko.com>
---
Changes in v2:
- Always use -std=gnu11 after Bin pointed out that we have only been
enforcing this for Linux hosts.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | tools/Makefile | 3 |
2 files changed, 1 insertions, 4 deletions
@@ -299,9 +299,7 @@ KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS) # have older compilers as their default, so we make it explicit for # these that our host tools are GNU11 (i.e. C11 w/ GNU extensions). CSTD_FLAG := -std=gnu11 -ifeq ($(HOSTOS),linux) KBUILD_HOSTCFLAGS += $(CSTD_FLAG) -endif ifeq ($(HOSTOS),cygwin) KBUILD_HOSTCFLAGS += -ansi diff --git a/tools/Makefile b/tools/Makefile index 999fd46..b45219e 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -295,8 +295,7 @@ HOST_EXTRACFLAGS += -include $(srctree)/include/compiler.h \ -I$(srctree)/tools \ -DUSE_HOSTCC \ -D__KERNEL_STRICT_NAMES \ - -D_GNU_SOURCE \ - -std=gnu99 + -D_GNU_SOURCE __build: $(LOGO-y) |