Accepting request 284838 from devel:gcc

moved to new location

- add a gcc-PIE subpackage, which enables building PIE binaries
  by default using the defaults.spec file. bsc#912298 (forwarded request 284831 from msmeissn)

OBS-URL: https://build.opensuse.org/request/show/284838
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gcc?expand=0&rev=51
This commit is contained in:
Dominique Leuenberger 2015-02-20 11:00:09 +00:00 committed by Git OBS Bridge
commit a27df58de7
2 changed files with 67 additions and 1 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Wed Feb 4 07:29:43 UTC 2015 - meissner@suse.com
- add a gcc-PIE subpackage, which enables building PIE binaries
by default using the defaults.spec file. bsc#912298
-------------------------------------------------------------------
Mon Aug 4 13:29:20 UTC 2014 - rguenther@suse.com
- Add libstdc++-devel-32bit and libstdc++-devel-64bit packages.
[bnc#890226]
-------------------------------------------------------------------
Fri Mar 21 12:29:29 UTC 2014 - rguenther@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package gcc
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -180,6 +180,26 @@ Requires: libstdc++%{gcc_version}-devel
The system GNU C++ development files.
%package -n libstdc++-devel-32bit
Summary: The system GNU C++ 32bit development files
License: GPL-3.0-with-GCC-exception
Group: System/Libraries
Requires: libstdc++%{gcc_version}-devel-32bit
%description -n libstdc++-devel-32bit
The system GNU C++ 32bit development files.
%package -n libstdc++-devel-64bit
Summary: The system GNU C++ 64bit development files
License: GPL-3.0-with-GCC-exception
Group: System/Libraries
Requires: libstdc++%{gcc_version}-devel-64bit
%description -n libstdc++-devel-64bit
The system GNU C++ 64bit development files.
%package -n gcc-fortran
Summary: The system GNU Fortran Compiler
@ -321,6 +341,18 @@ Requires: gcc-objc = %{version}
%description -n gcc-obj-c++
The system GNU Objective C++ Compiler.
%package -n gcc-PIE
Summary: A default configuration to build all binaries in PIE mode
License: GPL-3.0+
Group: Development/Languages/Other
Requires: gcc
%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).
%if %{build_ada}
%package -n gcc-ada
@ -403,6 +435,14 @@ ln -sf gcc-%{gcc_suffix}.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/cc.1.gz
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/bfd-plugins
ln -s `gcc-%{gcc_suffix} -print-file-name=liblto_plugin.so.0.0.0` $RPM_BUILD_ROOT%{_prefix}/lib/bfd-plugins/liblto_plugin.so.0.0.0
dir=`gcc -print-prog-name=cc1`
dir=${dir%/cc1}
mkdir -p $RPM_BUILD_ROOT/$dir
cat > $RPM_BUILD_ROOT/$dir/defaults.spec <<EOF
*default_spec:
%%{pie|fpic|fPIC|fpie|fPIE|fno-pic|fno-PIC|fno-pie|fno-PIE|shared|static|nostdlib|nodefaultlibs|nostartfiles:;:-fPIE -pie}
EOF
%files
%defattr(-,root,root)
%{_prefix}/bin/gcc
@ -489,6 +529,10 @@ ln -s `gcc-%{gcc_suffix} -print-file-name=liblto_plugin.so.0.0.0` $RPM_BUILD_ROO
# empty - only for the dependency
%doc README
%files -n gcc-PIE
%defattr(-,root,root)
/usr/lib*/gcc/*-suse-linux*/*/defaults.spec
%files -n gcc-locale
%defattr(-,root,root)
# empty - only for the dependency
@ -543,6 +587,11 @@ ln -s `gcc-%{gcc_suffix} -print-file-name=liblto_plugin.so.0.0.0` $RPM_BUILD_ROO
# empty - only for the dependency
%doc README
%files -n libstdc++-devel-32bit
%defattr(-,root,root)
# empty - only for the dependency
%doc README
%files -n gcc-fortran-32bit
%defattr(-,root,root)
# empty - only for the dependency
@ -571,6 +620,11 @@ ln -s `gcc-%{gcc_suffix} -print-file-name=liblto_plugin.so.0.0.0` $RPM_BUILD_ROO
# empty - only for the dependency
%doc README
%files -n libstdc++-devel-64bit
%defattr(-,root,root)
# empty - only for the dependency
%doc README
%files -n gcc-fortran-64bit
%defattr(-,root,root)
# empty - only for the dependency