- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=380
This commit is contained in:
Richard Biener 2022-02-10 12:35:38 +00:00 committed by Git OBS Bridge
parent fe1c36e927
commit 78133c2e90
30 changed files with 187 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -472,6 +472,19 @@ Locale data for the GNU Compiler Collection (GCC) to give error message
in the current locale.
%package PIE
Summary: A default configuration to build all binaries in PIE mode
License: GPL-3.0-or-later
Group: Development/Languages/Other
Requires: gcc@base_ver@ = %{version}-%{release}
%description -n gcc-PIE
This package contains a configuration file (spec) that changes the
compilers default setting to build all ELF binaries in the Position
Independend Executable (PIE) variant. This enables better address
space randomization (ASLR).
# PACKAGE-BEGIN
%package c++@variant@
Summary: The GNU C++ Compiler
@ -1832,6 +1845,12 @@ for l in `find %{buildroot} -name '*.la'`; do
mv $l.new $l
done
# The spec for the PIE subpackage
cat > %{buildroot}/%{libsubdir}/defaults.spec <<EOF
*default_spec:
%%{pie|fpic|fPIC|fpie|fPIE|no-pie|fno-pic|fno-PIC|fno-pie|fno-PIE|shared|static|nostdlib|nodefaultlibs|nostartfiles:;:-fPIE}%%{fno-pic|fno-PIC|fno-pie|fno-PIE|pie|no-pie|shared|static|nostdlib|nodefaultlibs|nostartfiles:;: -pie}
EOF
# GCC-TESTSUITE-DELETE-END
%if 0%{?run_tests:1}
cp `find . -name "*.sum"` ../testresults/
@ -2283,6 +2302,11 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc@base_ver@-locale.lang
%files -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale -f libstdc++.lang
%files PIE
%defattr(-,root,root)
%dir %{libsubdir}
%{libsubdir}/defaults.spec
%if %{build_cp}
%files c++
%defattr(-,root,root)

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -460,6 +460,18 @@ Requires: gcc11 = %{version}-%{release}
Locale data for the GNU Compiler Collection (GCC) to give error message
in the current locale.
%package PIE
Summary: A default configuration to build all binaries in PIE mode
License: GPL-3.0-or-later
Group: Development/Languages/Other
Requires: gcc11 = %{version}-%{release}
%description -n gcc-PIE
This package contains a configuration file (spec) that changes the
compilers default setting to build all ELF binaries in the Position
Independend Executable (PIE) variant. This enables better address
space randomization (ASLR).
%package c++
Summary: The GNU C++ Compiler
License: GPL-3.0-or-later
@ -2624,6 +2636,12 @@ for l in `find %{buildroot} -name '*.la'`; do
mv $l.new $l
done
# The spec for the PIE subpackage
cat > %{buildroot}/%{libsubdir}/defaults.spec <<EOF
*default_spec:
%%{pie|fpic|fPIC|fpie|fPIE|no-pie|fno-pic|fno-PIC|fno-pie|fno-PIE|shared|static|nostdlib|nodefaultlibs|nostartfiles:;:-fPIE}%%{fno-pic|fno-PIC|fno-pie|fno-PIE|pie|no-pie|shared|static|nostdlib|nodefaultlibs|nostartfiles:;: -pie}
EOF
%if 0%{?run_tests:1}
cp `find . -name "*.sum"` ../testresults/
cp `find . -name "*.log" \! -name "config.log" | grep -v 'acats.\?/tests' | grep -v libbacktrace` ../testresults/
@ -3071,6 +3089,11 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc11-locale.lang
%files -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale -f libstdc++.lang
%files PIE
%defattr(-,root,root)
%dir %{libsubdir}
%{libsubdir}/defaults.spec
%if %{build_cp}
%files c++
%defattr(-,root,root)