]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools: Stop re-defining -std= when building tools
authorTom Rini <trini@konsulko.com>
Mon, 11 Oct 2021 15:11:41 +0000 (11:11 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 19 Oct 2021 15:25:25 +0000 (11:25 -0400)
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>
Makefile
tools/Makefile

index 32d29b87db45ce631a34d2ff73a18607577ae401..6f2474baebe2bbea27336abb2797f78e1f9c79f0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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
index 999fd46531669022821570038d23fe0f3c783fbf..b45219e2c30c1455b34290639bd52bf63bcb5e6c 100644 (file)
@@ -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)