From 332f53da464a15aea859930b5f83e70a8b81dd19 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Mon, 4 Mar 2024 15:06:13 -0500 Subject: [PATCH] jjb: babeltrace: disable spurious warnings on GCC 4.8 Change-Id: Ia94b50680bf89cc104acb52be4d278d6c14dee02 Signed-off-by: Michael Jeanson --- scripts/babeltrace/build.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/babeltrace/build.sh b/scripts/babeltrace/build.sh index d7c79fb..e09324c 100755 --- a/scripts/babeltrace/build.sh +++ b/scripts/babeltrace/build.sh @@ -208,6 +208,13 @@ freebsd*) ;; esac +# Some warning flags are very dumb in GCC 4.8 on SLES12 / EL7, disable them +# even if they are available. +if [[ $platform = sles12sp5* ]] || [[ $platform = el7* ]]; then + CFLAGS="$CFLAGS -Wno-missing-field-initializers -Wno-shadow" + CXXFLAGS="$CXXFLAGS -Wno-missing-field-initializers -Wno-shadow" +fi + # Print build env details print_header "Build environment details" print_hardware || true -- 2.34.1