From f1c3b9d6e8184270a54aa2e6debad9767d2b6361 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Tue, 16 Jul 2024 15:41:53 +0200 Subject: [PATCH 1/5] Update GCC 12.4.1 --- gcc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc.spec b/gcc.spec index 813f07efdb0..b3aec3ed6f8 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,10 +1,10 @@ -### RPM external gcc 12.3.1 +### RPM external gcc 12.4.1 ## USE_COMPILER_VERSION ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 # Use the git repository for fetching the sources. This gives us more control while developing # a new platform so that we can compile yet to be released versions of the compiler. # See: https://gcc.gnu.org/viewcvs/gcc/branches/gcc-8-branch/?view=log -%define gccTag 10ebb8b9db2ec7ad53e4fc1f2900d9a8c8ddeaea +%define gccTag 9e00ae3e23eef8bff497981e00853ca092772201 %define gccBranch releases/gcc-12 %define moduleName %{n}-%{realversion} From 1b747b01c15fea8458adee92eb773a72b26de8d2 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Tue, 16 Jul 2024 15:45:19 +0200 Subject: [PATCH 2/5] Update gcc.spec --- gcc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc.spec b/gcc.spec index b3aec3ed6f8..f781b19b507 100644 --- a/gcc.spec +++ b/gcc.spec @@ -264,6 +264,7 @@ export LD_LIBRARY_PATH=%{i}/lib64:%{i}/lib:$LD_LIBRARY_PATH $CONF_GCC_OS_SPEC $CONF_GCC_WITH_LTO --with-gmp=%{i} --with-mpfr=%{i} --enable-bootstrap \ --with-mpc=%{i} --with-isl=%{i} --enable-checking=release \ --build=%{_build} --host=%{_host} --enable-libstdcxx-time=rt $CONF_GCC_ARCH_SPEC \ + -enable-libstdcxx-backtrace=yes \ --enable-shared --disable-libgcj \ --with-zstd=%{i}/tmp/sw \ CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" \ From 613d2b20985d9d89b86a3db74290b6d198c75e8a Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Tue, 16 Jul 2024 15:45:35 +0200 Subject: [PATCH 3/5] Update gcc.spec --- gcc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc.spec b/gcc.spec index f781b19b507..d435fb93377 100644 --- a/gcc.spec +++ b/gcc.spec @@ -264,7 +264,7 @@ export LD_LIBRARY_PATH=%{i}/lib64:%{i}/lib:$LD_LIBRARY_PATH $CONF_GCC_OS_SPEC $CONF_GCC_WITH_LTO --with-gmp=%{i} --with-mpfr=%{i} --enable-bootstrap \ --with-mpc=%{i} --with-isl=%{i} --enable-checking=release \ --build=%{_build} --host=%{_host} --enable-libstdcxx-time=rt $CONF_GCC_ARCH_SPEC \ - -enable-libstdcxx-backtrace=yes \ + --enable-libstdcxx-backtrace=yes \ --enable-shared --disable-libgcj \ --with-zstd=%{i}/tmp/sw \ CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" \ From bed8e9fb0f458c14b59dce7b954b7990ca30b101 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Wed, 17 Jul 2024 13:51:40 +0200 Subject: [PATCH 4/5] avoid array-bound errors from pybind11 in onnxruntime and py3-contourpy --- onnxruntime.spec | 2 +- pip/contourpy.file | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/onnxruntime.spec b/onnxruntime.spec index 74b53213dad..2a64e03e1af 100644 --- a/onnxruntime.spec +++ b/onnxruntime.spec @@ -52,7 +52,7 @@ cmake ../%{n}-%{realversion}/cmake -GNinja \ -Donnxruntime_BUILD_UNIT_TESTS=OFF \ -DCMAKE_PREFIX_PATH="${ZLIB_ROOT};${LIBPNG_ROOT};${PROTOBUF_ROOT};${PY3_PYBIND11_ROOT};${RE2_ROOT}" \ -DRE2_INCLUDE_DIR="${RE2_ROOT}/include" \ - -DCMAKE_CXX_FLAGS="-Wno-error=stringop-overflow -Wno-error=maybe-uninitialized" + -DCMAKE_CXX_FLAGS="-Wno-error=stringop-overflow -Wno-error=maybe-uninitialized -Wno-error=array-bounds" # -Wno-error=stringop-overflow is needed to work around a false positive string overflow, # see https://github.com/google/flatbuffers/issues/7366 diff --git a/pip/contourpy.file b/pip/contourpy.file index d9c216036ff..0fd5b433143 100644 --- a/pip/contourpy.file +++ b/pip/contourpy.file @@ -1,3 +1,6 @@ Requires: py3-pybind11 py3-numpy py3-meson-python py3-meson +%define PipPreBuild \ + export CXXFLAGS="-Wno-error=array-bounds" + %define PipPostPost \ %{relocateConfig}lib/python*/site-packages/contourpy/util/_build_config.py From bf7bb3e45b556392d71521cb8c47382697e29cf4 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Wed, 17 Jul 2024 13:53:15 +0200 Subject: [PATCH 5/5] avoid array bound errors for gcc 12.4 --- scram-tools.file/tools/gcc/env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scram-tools.file/tools/gcc/env.sh b/scram-tools.file/tools/gcc/env.sh index 26f944140a1..be5dad6bd7b 100644 --- a/scram-tools.file/tools/gcc/env.sh +++ b/scram-tools.file/tools/gcc/env.sh @@ -41,7 +41,7 @@ GCC_CXXFLAGS="$GCC_CXXFLAGS -fno-math-errno --param vect-max-version-for-alias-c GCC_CXXFLAGS="$GCC_CXXFLAGS -Xassembler --compress-debug-sections" #FIXME: GCC 12.2 workaround -if [[ "$GCC_VERSION" =~ ^12\.[23]\. ]] ; then +if [[ "$GCC_VERSION" =~ ^12\.[234]\. ]] ; then GCC_CXXFLAGS="$GCC_CXXFLAGS -Wno-error=array-bounds -Warray-bounds" fi