|
Panu Matilainen |
d678a6 |
From 7faf8eda1358f8a877b9b3d6e1197b814e80b50b Mon Sep 17 00:00:00 2001
|
|
Panu Matilainen |
d678a6 |
Message-Id: <7faf8eda1358f8a877b9b3d6e1197b814e80b50b.1566557361.git.pmatilai@redhat.com>
|
|
Panu Matilainen |
d678a6 |
From: Panu Matilainen <pmatilai@redhat.com>
|
|
Panu Matilainen |
d678a6 |
Date: Tue, 13 Aug 2019 16:26:31 +0300
|
|
Panu Matilainen |
d678a6 |
Subject: [PATCH] Drop %_lto_cflags macro afterall
|
|
Panu Matilainen |
d678a6 |
|
|
Panu Matilainen |
d678a6 |
This was only added in commit 2bb7b0cf066c97a9d92eb0bf59618896000cb29d,
|
|
Panu Matilainen |
d678a6 |
but turns out that this kind of usage is bad for build reproducability
|
|
Panu Matilainen |
d678a6 |
because the system-specific CPU count gets recorded RPMTAG_OPTFLAGS
|
|
Panu Matilainen |
d678a6 |
and the resulting binaries too (depending on gcc flags).
|
|
Panu Matilainen |
d678a6 |
In addition, gcc upstream has decided to make -flto default to
|
|
Panu Matilainen |
d678a6 |
autodetected parallelism. Since -flto can be overridden with
|
|
Panu Matilainen |
d678a6 |
by simply appending -fno-lto for the packages that need to disable it,
|
|
Panu Matilainen |
d678a6 |
there's no practical need for us to provide such a macro for disabling
|
|
Panu Matilainen |
d678a6 |
either.
|
|
Panu Matilainen |
d678a6 |
---
|
|
Panu Matilainen |
d678a6 |
macros.in | 2 +-
|
|
Panu Matilainen |
d678a6 |
platform.in | 3 ---
|
|
Panu Matilainen |
d678a6 |
2 files changed, 1 insertion(+), 4 deletions(-)
|
|
Panu Matilainen |
d678a6 |
|
|
Panu Matilainen |
d678a6 |
diff --git a/macros.in b/macros.in
|
|
Panu Matilainen |
d678a6 |
index 633d5ca6e..b7da4ea2f 100644
|
|
Panu Matilainen |
d678a6 |
--- a/macros.in
|
|
Panu Matilainen |
d678a6 |
+++ b/macros.in
|
|
Panu Matilainen |
d678a6 |
@@ -1025,7 +1025,7 @@ package or when debugging this package.\
|
|
Panu Matilainen |
d678a6 |
%build_fflags %{optflags} %{?_fmoddir:-I%{_fmoddir}}
|
|
Panu Matilainen |
d678a6 |
|
|
Panu Matilainen |
d678a6 |
# Link editor flags. This is usually called LDFLAGS in makefiles.
|
|
Panu Matilainen |
d678a6 |
-#%build_ldflags -Wl,-z,relro %{?_lto_cflags}
|
|
Panu Matilainen |
d678a6 |
+#%build_ldflags -Wl,-z,relro
|
|
Panu Matilainen |
d678a6 |
|
|
Panu Matilainen |
d678a6 |
# Expands to shell code to seot the compiler/linker environment
|
|
Panu Matilainen |
d678a6 |
# variables CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, LDFLAGS if they have
|
|
Panu Matilainen |
d678a6 |
diff --git a/platform.in b/platform.in
|
|
Panu Matilainen |
d678a6 |
index e1efc42b0..db6d2382f 100644
|
|
Panu Matilainen |
d678a6 |
--- a/platform.in
|
|
Panu Matilainen |
d678a6 |
+++ b/platform.in
|
|
Panu Matilainen |
d678a6 |
@@ -59,9 +59,6 @@
|
|
Panu Matilainen |
d678a6 |
|
|
Panu Matilainen |
d678a6 |
%_smp_mflags -j%{_smp_build_ncpus}
|
|
Panu Matilainen |
d678a6 |
|
|
Panu Matilainen |
d678a6 |
-# Enable LTO optimization with a maximal parallelism
|
|
Panu Matilainen |
d678a6 |
-%_lto_cflags -flto=%{_smp_build_ncpus}
|
|
Panu Matilainen |
d678a6 |
-
|
|
Panu Matilainen |
d678a6 |
#==============================================================================
|
|
Panu Matilainen |
d678a6 |
# ---- Build policy macros.
|
|
Panu Matilainen |
d678a6 |
#
|
|
Panu Matilainen |
d678a6 |
--
|
|
Panu Matilainen |
d678a6 |
2.21.0
|
|
Panu Matilainen |
d678a6 |
|