Elyes Haouas has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/67751 )
Change subject: [test] Use default C language standard ......................................................................
[test] Use default C language standard
Signed-off-by: Elyes Haouas ehaouas@noos.fr Change-Id: Iad37a522620ac84f839c4113e51adbf5baaf4eea --- M Makefile.inc M payloads/libpayload/Makefile M payloads/libpayload/tests/Makefile.inc M tests/Makefile.common M util/cbfstool/Makefile.inc M util/cbfstool/lz4/lib/Makefile M util/coreboot-configurator/meson.build M util/kconfig/qconf-cfg.sh M util/nvidia/Makefile.inc 9 files changed, 20 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/51/67751/1
diff --git a/Makefile.inc b/Makefile.inc index 0ed205f..c3e82db 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -430,7 +430,7 @@ CPPFLAGS_ramstage += -Isrc/device/oprom/include endif
-CFLAGS_common += -pipe -g -nostdinc -std=gnu11 +CFLAGS_common += -pipe -g -nostdinc -std=gnu18 CFLAGS_common += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs -Wimplicit-fallthrough CFLAGS_common += -Wshadow -Wdate-time -Wtype-limits -Wvla diff --git a/payloads/libpayload/Makefile b/payloads/libpayload/Makefile index 0104a11..18ce50a 100644 --- a/payloads/libpayload/Makefile +++ b/payloads/libpayload/Makefile @@ -215,7 +215,7 @@ AR := $(AR_$(ARCH-y)) endif
-CFLAGS += -std=gnu11 $(CFLAGS_$(ARCH-y)) +CFLAGS += -std=gnu18 $(CFLAGS_$(ARCH-y))
ifneq ($(INNER_SCANBUILD),y) ifeq ($(CONFIG_LP_COMPILER_LLVM_CLANG),y) diff --git a/payloads/libpayload/tests/Makefile.inc b/payloads/libpayload/tests/Makefile.inc index 2a067e0..679228f 100644 --- a/payloads/libpayload/tests/Makefile.inc +++ b/payloads/libpayload/tests/Makefile.inc @@ -47,7 +47,7 @@ TEST_CFLAGS += -Wstrict-aliasing -Wshadow -Werror TEST_CFLAGS += -Wno-unknown-warning-option -Wno-source-mgr -Wno-main-return-type
-TEST_CFLAGS += -std=gnu11 -Os -ffunction-sections -fdata-sections -fno-builtin +TEST_CFLAGS += -std=gnu18 -Os -ffunction-sections -fdata-sections -fno-builtin
# Make unit-tests detectable by the code TEST_CFLAGS += -D__TEST__ diff --git a/tests/Makefile.common b/tests/Makefile.common index 04bd6c9..136f662 100644 --- a/tests/Makefile.common +++ b/tests/Makefile.common @@ -51,7 +51,7 @@ # Path for Kconfig autoheader TEST_CFLAGS += -I$(dir $(TEST_KCONFIG_AUTOHEADER))
-TEST_CFLAGS += -std=gnu11 -Os -ffunction-sections -fdata-sections -fno-builtin +TEST_CFLAGS += -std=gnu18 -Os -ffunction-sections -fdata-sections -fno-builtin
TEST_CFLAGS += -D__TEST__
diff --git a/util/cbfstool/Makefile.inc b/util/cbfstool/Makefile.inc index a60cee1..e38d6b7b 100644 --- a/util/cbfstool/Makefile.inc +++ b/util/cbfstool/Makefile.inc @@ -139,10 +139,10 @@ TOOLCFLAGS += -mno-ms-bitfields endif ifeq ($(shell uname -o 2>/dev/null), Cygwin) -TOOLCFLAGS+=-std=gnu11 +TOOLCFLAGS+=-std=gnu18 TOOLCPPFLAGS+=-D_GNU_SOURCE else -TOOLCFLAGS+=-std=c11 +TOOLCFLAGS+=-std=c18 endif
LZ4CFLAGS ?= -Wno-strict-prototypes diff --git a/util/cbfstool/lz4/lib/Makefile b/util/cbfstool/lz4/lib/Makefile index 12a741d..f6f644d 100644 --- a/util/cbfstool/lz4/lib/Makefile +++ b/util/cbfstool/lz4/lib/Makefile @@ -41,7 +41,7 @@ PREFIX ?= /usr/local CPPFLAGS= -DXXH_NAMESPACE=LZ4_ CFLAGS ?= -O3 -CFLAGS += -std=c99 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wcast-qual -Wstrict-prototypes -pedantic +CFLAGS += -std=c18 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wcast-qual -Wstrict-prototypes -pedantic FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
LIBDIR?= $(PREFIX)/lib diff --git a/util/coreboot-configurator/meson.build b/util/coreboot-configurator/meson.build index b3175cc..83180eb 100644 --- a/util/coreboot-configurator/meson.build +++ b/util/coreboot-configurator/meson.build @@ -6,7 +6,7 @@ license: ['GPL2', 'CC BY-SA 4.0'], meson_version: '>= 0.53.0', default_options: ['prefix=/usr', - 'cpp_std=c++14'], + 'cpp_std=c++17'], )
subdir('src') diff --git a/util/kconfig/qconf-cfg.sh b/util/kconfig/qconf-cfg.sh index fa564cd..bc308f6 100755 --- a/util/kconfig/qconf-cfg.sh +++ b/util/kconfig/qconf-cfg.sh @@ -11,7 +11,7 @@ fi
if pkg-config --exists $PKG; then - echo cflags="-std=c++11 -fPIC $(pkg-config --cflags $PKG)" + echo cflags="-std=c++17 -fPIC $(pkg-config --cflags $PKG)" echo libs="$(pkg-config --libs $PKG)" echo moc="$(pkg-config --variable=host_bins Qt5Core)/moc" exit 0 diff --git a/util/nvidia/Makefile.inc b/util/nvidia/Makefile.inc index 1894fad..be3f95c 100644 --- a/util/nvidia/Makefile.inc +++ b/util/nvidia/Makefile.inc @@ -41,7 +41,7 @@
CBOOTIMAGE_SRCS:=$(addprefix util/nvidia/cbootimage/src/,$(filter %.c,$(CBOOTIMAGE_RAW_SRCS))) CBOOTIMAGE_OBJS:=$(addprefix $(objutil)/nvidia/cbootimage/,$(patsubst %.c,%.o,$(filter %.c,$(CBOOTIMAGE_RAW_SRCS)))) -CBOOTIMAGE_FLAGS:=-Wall -std=c99 -O2 +CBOOTIMAGE_FLAGS:=-Wall -std=c18 -O2
ifeq ($(OS_ARCH), FreeBSD) CBOOTIMAGE_FLAGS:=-DENODATA=ENOATTR