diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2019-08-13 16:26:31 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2019-08-28 12:16:52 +0300 |
commit | c8fcc7d4ace1633e3eca478b7d6ecd6d34b85003 (patch) | |
tree | 7f004ac54c3cb3c876e265949ff590a9f8366289 | |
parent | 8ac9af9d0a63c935e7eb7436f6d69fded7f7eb2b (diff) | |
download | rpm-c8fcc7d4ace1633e3eca478b7d6ecd6d34b85003.tar.gz |
Drop %_lto_cflags macro afterall
This was only added in commit 2bb7b0cf066c97a9d92eb0bf59618896000cb29d,
but turns out that this kind of usage is bad for build reproducability
because the system-specific CPU count gets recorded RPMTAG_OPTFLAGS
and the resulting binaries too (depending on gcc flags).
In addition, gcc upstream has decided to make -flto default to
autodetected parallelism. Since -flto can be overridden with
by simply appending -fno-lto for the packages that need to disable it,
there's no practical need for us to provide such a macro for disabling
either.
(cherry picked from commit 7faf8eda1358f8a877b9b3d6e1197b814e80b50b)
-rw-r--r-- | macros.in | 2 | ||||
-rw-r--r-- | platform.in | 3 |
2 files changed, 1 insertions, 4 deletions
@@ -1025,7 +1025,7 @@ package or when debugging this package.\ %build_fflags %{optflags} %{?_fmoddir:-I%{_fmoddir}} # Link editor flags. This is usually called LDFLAGS in makefiles. -#%build_ldflags -Wl,-z,relro %{?_lto_cflags} +#%build_ldflags -Wl,-z,relro # Expands to shell code to seot the compiler/linker environment # variables CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, LDFLAGS if they have diff --git a/platform.in b/platform.in index e1efc42b0..db6d2382f 100644 --- a/platform.in +++ b/platform.in @@ -59,9 +59,6 @@ %_smp_mflags -j%{_smp_build_ncpus} -# Enable LTO optimization with a maximal parallelism -%_lto_cflags -flto=%{_smp_build_ncpus} - #============================================================================== # ---- Build policy macros. # |