| |
@@ -230,7 +230,16 @@
|
| |
%_ld_as_needed 1
|
| |
%_ld_as_needed_flags %{?_ld_as_needed:-Wl,--as-needed}
|
| |
|
| |
- %__global_compiler_flags -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches %{_hardened_cflags} %{_annotated_cflags}
|
| |
+ # Packages should use "%define _lto_cflags %{nil}" in their .spec
|
| |
+ # file to opt-out of LTO
|
| |
+ #
|
| |
+ # Packages that need special handling for archive libraries should
|
| |
+ # use something like this in their .spec file
|
| |
+ # "%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects -flto-partition=one"
|
| |
+ #
|
| |
+ %_lto_cflags -flto -ffat-lto-objects -flto-partition=one
|
| |
+
|
| |
+ %__global_compiler_flags -O2 %{?_lto_cflags} -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches %{_hardened_cflags} %{_annotated_cflags}
|
| |
|
| |
# Automatically trim changelog entries after 2 years
|
| |
%_changelog_trimtime %{lua:print(os.time() - 2 * 365 * 86400)}
|
| |
this example does not make sense to me since it won't change anything because all those optiosn are in %_lto_cflags already