summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2021-11-14 12:40:20 -0500
committerB. Stack <bgstack15@gmail.com>2021-11-14 12:40:20 -0500
commite7a576a8b747c7ec56c8cb17aefe414840aa92ee (patch)
tree7b2622e02803f1d0f4b31194fff02c8317d2a49d
parentno lto for RHEL8 (gcc 8) (diff)
downloadstackrpms-e7a576a8b747c7ec56c8cb17aefe414840aa92ee.tar.gz
stackrpms-e7a576a8b747c7ec56c8cb17aefe414840aa92ee.tar.bz2
stackrpms-e7a576a8b747c7ec56c8cb17aefe414840aa92ee.zip
use gcc-ar for el7,el8newmoon-experiment
Gord said CentOS's ar implementation doesn't support LTO, so use the gcc-ar wrapper
-rw-r--r--newmoon/newmoon-mozconfig2
-rw-r--r--newmoon/newmoon.spec10
2 files changed, 4 insertions, 8 deletions
diff --git a/newmoon/newmoon-mozconfig b/newmoon/newmoon-mozconfig
index 8cb2cdb..fe7bd0a 100644
--- a/newmoon/newmoon-mozconfig
+++ b/newmoon/newmoon-mozconfig
@@ -49,10 +49,8 @@ ac_add_options --disable-sync
ac_add_options --disable-personas
export MOZ_PKG_SPECIAL=gtk2
-# START EXPERIMENT1 experimental for linker and LTO stuff
export CFLAGS="${CFLAGS} -flto=$(nproc)"
export CXXFLAGS="${CXXFLAGS} -flto=$(nproc)"
export LDFLAGS="${LDFLAGS} -Wl,-z,norelro"
ac_add_options --disable-elf-hack
ac_add_options --disable-gold
-# END EXPERIMENT1
diff --git a/newmoon/newmoon.spec b/newmoon/newmoon.spec
index 96b271b..ad8c665 100644
--- a/newmoon/newmoon.spec
+++ b/newmoon/newmoon.spec
@@ -124,12 +124,10 @@ sed -i -r -e '/enable-optimize/s/"\s*$/ -Wno-format-overflow"/' ./.mozconfig
%patch0 -p1
%patch1 -p1
%patch2 -p1
-# Only do LTO on Fedora
-%if 0%{?fedora} >= 33
%patch3 -p1
-%else
-# we ned to remove the LTO options from the mozconfig for RHEL7 and RHEL8
-sed -i -r -e '/START EXPERIMENT1/,/END EXPERIMENT1/d' ./.mozconfig
+# For RHEL 7, 8 use gcc-ar so that ar has LTO support
+%if 0%{?rhel} >= 7
+echo 'export AR=/usr/bin/gcc-ar' >> ./.mozconfig
%endif
# If gcc-11 then add the trick from Gord, which affects fc34 and up
@@ -314,7 +312,7 @@ update-mime-database -n ${_datadir}/mime 1>/dev/null 2>&1 & :
%doc AUTHORS LICENSE
%changelog
-* Wed Nov 10 2021 B. Stack <bgstack15@gmail.com> - 29.4.2-2
+* Sun Nov 14 2021 B. Stack <bgstack15@gmail.com> - 29.4.2-2
- Experiment with some mozconfig entries that work for dpkg
- Experiment with LTO patch and disable-gold
bgstack15