summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--newmoon/newmoon-mozconfig3
-rw-r--r--newmoon/newmoon.spec6
2 files changed, 8 insertions, 1 deletions
diff --git a/newmoon/newmoon-mozconfig b/newmoon/newmoon-mozconfig
index 04fd1cc..8cb2cdb 100644
--- a/newmoon/newmoon-mozconfig
+++ b/newmoon/newmoon-mozconfig
@@ -49,9 +49,10 @@ ac_add_options --disable-sync
ac_add_options --disable-personas
export MOZ_PKG_SPECIAL=gtk2
-# experimental for linker and LTO stuff
+# 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 f3c56da..7b99211 100644
--- a/newmoon/newmoon.spec
+++ b/newmoon/newmoon.spec
@@ -124,7 +124,13 @@ sed -i -r -e '/enable-optimize/s/"\s*$/ -Wno-format-overflow"/' ./.mozconfig
%patch0 -p1
%patch1 -p1
%patch2 -p1
+# Only do LTO on Fedora and RHEL8
+%if 0%{?fedora} >= 33 || 0%{?rhel} >= 8
%patch3 -p1
+%else
+# we ned to remove the LTO options from the mozconfig for RHEL7
+sed -i -r -e '/START EXPERIMENT1/,/END EXPERIMENT1/d' ./.mozconfig
+%endif
! test -d %{badname}/branding/unofficial.unbuilt && {
cp -pr %{badname}/branding/unofficial %{badname}/branding/unofficial.unbuilt && \
bgstack15