From 51c585078161b7f5f0a9eaf88b6dae34212af939 Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Thu, 13 May 2021 16:00:33 -0700 Subject: [PATCH] Disable LTO, since runtime errors occur with GCC 11 Upstream Bug: https://github.com/nodejs/node/issues/38501 Gentoo Bug: https://bugs.gentoo.org/787158 Signed-off-by: Patrick McCarty --- build_prepend | 1 - nodejs.spec | 12 ++++-------- options.conf | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/build_prepend b/build_prepend index 27430b3..8558693 100644 --- a/build_prepend +++ b/build_prepend @@ -19,7 +19,6 @@ export PYTHON=/usr/bin/python2 --shared-openssl \ --shared-zlib \ --use-largepages \ - --enable-lto \ --shared-nghttp2 \ --shared-libuv \ --verbose \ diff --git a/nodejs.spec b/nodejs.spec index 08cf917..0ebff9f 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -125,7 +125,6 @@ export PYTHON=/usr/bin/python2 --shared-openssl \ --shared-zlib \ --use-largepages \ ---enable-lto \ --shared-nghttp2 \ --shared-libuv \ --verbose \ @@ -137,13 +136,10 @@ export no_proxy=localhost,127.0.0.1,0.0.0.0 export LANG=C.UTF-8 export SOURCE_DATE_EPOCH=1620853173 export GCC_IGNORE_WERROR=1 -export AR=gcc-ar -export RANLIB=gcc-ranlib -export NM=gcc-nm -export CFLAGS="$CFLAGS -O3 -falign-functions=32 -ffat-lto-objects -flto=4 -fno-math-errno -fno-semantic-interposition -fno-trapping-math " -export FCFLAGS="$FFLAGS -O3 -falign-functions=32 -ffat-lto-objects -flto=4 -fno-math-errno -fno-semantic-interposition -fno-trapping-math " -export FFLAGS="$FFLAGS -O3 -falign-functions=32 -ffat-lto-objects -flto=4 -fno-math-errno -fno-semantic-interposition -fno-trapping-math " -export CXXFLAGS="$CXXFLAGS -O3 -falign-functions=32 -ffat-lto-objects -flto=4 -fno-math-errno -fno-semantic-interposition -fno-trapping-math " +export CFLAGS="$CFLAGS -O3 -falign-functions=32 -fno-lto -fno-math-errno -fno-semantic-interposition -fno-trapping-math " +export FCFLAGS="$FFLAGS -O3 -falign-functions=32 -fno-lto -fno-math-errno -fno-semantic-interposition -fno-trapping-math " +export FFLAGS="$FFLAGS -O3 -falign-functions=32 -fno-lto -fno-math-errno -fno-semantic-interposition -fno-trapping-math " +export CXXFLAGS="$CXXFLAGS -O3 -falign-functions=32 -fno-lto -fno-math-errno -fno-semantic-interposition -fno-trapping-math " make %{?_smp_mflags} diff --git a/options.conf b/options.conf index 59bc1c6..10e0c1b 100644 --- a/options.conf +++ b/options.conf @@ -58,7 +58,7 @@ use_avx512 = false # add clang flags use_clang = false # configure build for lto -use_lto = true +use_lto = false # require package verification for build verify_required = false