From fdb6646037827f46233dbe7c12d025217c8483a9 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 25 Mar 2022 15:01:50 -0400 Subject: [PATCH] jjb: lttng-tools: disable -Wmissing-field-initializers on sles12sp5 Change-Id: Idbad48052e76e03f5036e4ae8c88534899447264 --- scripts/lttng-tools/build.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/lttng-tools/build.sh b/scripts/lttng-tools/build.sh index a41fbfb..9454269 100755 --- a/scripts/lttng-tools/build.sh +++ b/scripts/lttng-tools/build.sh @@ -151,6 +151,7 @@ export BABELTRACE_PLUGIN_PATH="$DEPS_LIB/babeltrace2/plugins/" export LIBBABELTRACE2_PLUGIN_PROVIDER_DIR="$DEPS_LIB/babeltrace2/plugin-providers/" export CFLAGS="-g -O2" +export CXXFLAGS="-g -O2" # Set compiler variables case "$cc" in @@ -282,6 +283,13 @@ cygwin|cygwin64|msys32|msys64) ;; esac +# The missing-field-initializers warning code is very dumb in GCC 4.8 on +# SLES12, disable it even if it's available. +if [ "$arch" = "sles12sp5" ]; then + CFLAGS="$CFLAGS -Wno-missing-field-initializers" + CXXFLAGS="$CXXFLAGS -Wno-missing-field-initializers" +fi + case "$test_type" in full) LTTNG_TOOLS_RUN_TESTS_LONG_REGRESSION="yes" -- 2.34.1