- Adjust specs for gcc-PIE to use -pie at link-time even when

-fPIE is set (but not -shared and friends).  [bsc#1185348]

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc?expand=0&rev=102
This commit is contained in:
Richard Biener 2021-04-29 08:37:56 +00:00 committed by Git OBS Bridge
parent f34a87065a
commit 5c0306a411
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Apr 29 08:36:04 UTC 2021 - Richard Biener <rguenther@suse.com>
- Adjust specs for gcc-PIE to use -pie at link-time even when
-fPIE is set (but not -shared and friends). [bsc#1185348]
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Nov 12 11:42:44 UTC 2020 - Richard Biener <rguenther@suse.com> Thu Nov 12 11:42:44 UTC 2020 - Richard Biener <rguenther@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package gcc # spec file for package gcc
# #
# Copyright (c) 2020 SUSE LLC # Copyright (c) 2021 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -486,7 +486,7 @@ dir=${dir%/cc1}
mkdir -p $RPM_BUILD_ROOT/$dir mkdir -p $RPM_BUILD_ROOT/$dir
cat > $RPM_BUILD_ROOT/$dir/defaults.spec <<EOF cat > $RPM_BUILD_ROOT/$dir/defaults.spec <<EOF
*default_spec: *default_spec:
%%{pie|fpic|fPIC|fpie|fPIE|no-pie|fno-pic|fno-PIC|fno-pie|fno-PIE|shared|static|nostdlib|nodefaultlibs|nostartfiles:;:-fPIE -pie} %%{fpic|fPIC|fpie|fPIE|fno-pic|fno-PIC|fno-pie|fno-PIE:;:-fPIE}%%{fno-pic|fno-PIC|fno-pie|fno-PIE|pie|no-pie|shared|static|nostdlib|nodefaultlibs|nostartfiles:;: -pie}
EOF EOF
%post -n gcc-go %post -n gcc-go