summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2024-06-03 16:42:44 +0200
committerElyes Haouas <ehaouas@noos.fr>2024-06-04 10:23:03 +0000
commit78bd2710a7013884a0b71206ac99d2c6100de3bc (patch)
treedc01306ac7091e582ef7d7ec8d16dbec0b8d0326
parentb62f86be43f39146dcf93da0f078c41ecafa8870 (diff)
util/xcompile: Use new GCC's warning options only if supported
Wflex-array-member-not-at-end & Wcalloc-transposed-args are not supported when using GCC older than GCC-14. Use them only when supported. Change-Id: I11c1e729569c8130bd254a10454c5066a72974d6 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82785 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
-rwxr-xr-xutil/xcompile/xcompile7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index ad4361db53..ff067d2f6a 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -201,6 +201,13 @@ detect_special_flags() {
CFLAGS_GCC="$CFLAGS_GCC -Wno-address-of-packed-member"
testcc "$GCC" "$CFLAGS_GCC --param=min-pagesize=1024 $FLAGS_GCC" &&
CFLAGS_GCC="$CFLAGS_GCC --param=min-pagesize=1024"
+
+ testcc "$GCC" "$CFLAGS_GCC -Wflex-array-member-not-at-end" &&
+ CFLAGS_GCC="$CFLAGS_GCC -Wflex-array-member-not-at-end"
+
+ testcc "$GCC" "$CFLAGS_GCC -Wcalloc-transposed-args" &&
+ CFLAGS_GCC="$CFLAGS_GCC -Wcalloc-transposed-args"
+
case "$architecture" in
x86)
;;