Sync from SUSE:ALP:Source:Standard:1.0 gcc revision 512dd8902886bb3c5305acf2c9a2a978

This commit is contained in:
Adrian Schröter 2024-03-08 16:37:46 +01:00
commit e83ae2dab1
5 changed files with 1208 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<flavor>build</flavor>
</multibuild>

3
cpp Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
# Traditionally, /lib/cpp only knew about C.
exec /usr/bin/cpp -xc "$@"

484
gcc.changes Normal file
View File

@ -0,0 +1,484 @@
-------------------------------------------------------------------
Wed Feb 14 09:27:54 UTC 2024 - Richard Biener <rguenther@suse.com>
- Add gcc-build flavor for building ALP packages, but disabled for
openSUSE.
-------------------------------------------------------------------
Tue Feb 13 14:46:11 UTC 2024 - Richard Biener <rguenther@suse.com>
- Support building suffixed packages, but only allow installing one
variant at the same time.
- Remove obsolete obsoletes.
-------------------------------------------------------------------
Thu Jan 19 11:30:13 UTC 2023 - Richard Biener <rguenther@suse.com>
- Switch gcc to default 13.
-------------------------------------------------------------------
Fri May 20 09:41:16 UTC 2022 - Martin Liška <mliska@suse.cz>
- Add lto-dump binary and link it similarly to e.g. gcov-dump.
-------------------------------------------------------------------
Wed Apr 6 07:37:13 UTC 2022 - Martin Liška <mliska@suse.cz>
- Switch gcc to default 12.
- Remove 2 Ada binaries.
-------------------------------------------------------------------
Mon Apr 4 07:44:16 UTC 2022 - Richard Biener <rguenther@suse.com>
- Rename libgccjit0-devel to libgccjit-devel.
-------------------------------------------------------------------
Thu Feb 10 12:33:25 UTC 2022 - Richard Biener <rguenther@suse.com>
- Move gcc-PIE contents to gccVER-PIE and only require that from
the gcc-PIE package. [bsc#1195628]
-------------------------------------------------------------------
Wed Sep 29 13:02:30 UTC 2021 - Richard Biener <rguenther@suse.com>
- Move /lib/cpp to /usr/lib/cpp for the usr merge. [bsc#1191060]
-------------------------------------------------------------------
Fri Aug 27 17:41:23 UTC 2021 - Andreas Schwab <schwab@suse.de>
- Add libgccjit%{libgccjit_sover}-devel package
-------------------------------------------------------------------
Fri Jul 9 07:41:14 UTC 2021 - Richard Biener <rguenther@suse.com>
- With gcc-PIE add -pie even when -fPIC is specified but we are
not linking a shared library. [boo#1185348]
-------------------------------------------------------------------
Wed May 5 12:48:07 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
- Change bfd-plugins to be installed in %_libdir
-------------------------------------------------------------------
Thu Apr 29 08:45:13 UTC 2021 - Richard Biener <rguenther@suse.com>
- Switch gcc to default 11.
- Adjust liblto_plugin.so naming for GCC 11.
-------------------------------------------------------------------
Thu Nov 12 11:42:44 UTC 2020 - Richard Biener <rguenther@suse.com>
- BuildRequire packages we build symlinks to. [bsc#1178675]
-------------------------------------------------------------------
Mon Aug 31 12:48:21 UTC 2020 - Andreas Schwab <schwab@suse.de>
- Remove gnatbl and gprmake links
-------------------------------------------------------------------
Mon May 18 09:08:26 UTC 2020 - Richard Biener <rguenther@suse.com>
- Sync separate_bi{32,64} macros with the GCC side, honoring
%disable_32bit. [bsc#1170466]
-------------------------------------------------------------------
Tue Mar 31 08:46:16 UTC 2020 - Richard Biener <rguenther@suse.com>
- Switch gcc to default 10.
-------------------------------------------------------------------
Thu May 16 13:23:19 UTC 2019 - Andreas Schwab <schwab@suse.de>
- Add ada links on riscv64
-------------------------------------------------------------------
Fri May 10 07:23:58 UTC 2019 - rguenther@suse.com
- Package default D compiler.
-------------------------------------------------------------------
Tue Apr 30 09:09:39 UTC 2019 - Martin Liška <mliska@suse.cz>
- Switch gcc to default 9.
-------------------------------------------------------------------
Wed Jun 13 07:13:07 UTC 2018 - rguenther@suse.com
- Add gccgo symlink, add go and gofmt as alternatives to support
parallel install of golang. [bnc#1096677]
-------------------------------------------------------------------
Tue Jun 5 10:19:50 UTC 2018 - rguenther@suse.com
- Fix gcc-PIE spec to properly honor -no-pie at link time.
[bnc#1096008]
-------------------------------------------------------------------
Tue Mar 6 10:13:50 UTC 2018 - rguenther@suse.com
- Switch gcc to default 8.
-------------------------------------------------------------------
Fri Jun 9 11:19:29 UTC 2017 - rguenther@suse.com
- Fix gcc-devel guard to use %sle_version. [bnc#1043590]
-------------------------------------------------------------------
Wed Jun 7 11:39:55 UTC 2017 - rguenther@suse.com
- Guard gcc-devel so it is only built on Tumbleweed.
- Remove bogus link to versioned g++.info file which doesn't exist.
Instead refer to gcc.info from the g++ info directory entry.
[bnc#922419]
-------------------------------------------------------------------
Tue Jun 6 09:55:59 UTC 2017 - mliska@suse.cz
- Include gcov-tool and gcov-dump binaries.
-------------------------------------------------------------------
Thu Apr 13 08:52:35 UTC 2017 - rguenther@suse.com
- Remove README in empty packages only required for SLE11 and older.
- Remove now empty %build section.
-------------------------------------------------------------------
Tue Apr 4 07:16:09 UTC 2017 - rguenther@suse.com
- Fix dependencies of libstdc++-devel-{32,64}-bit.
-------------------------------------------------------------------
Thu Mar 23 12:56:31 UTC 2017 - rguenther@suse.com
- Switch gcc to default 7.
- Remove unrelated README.packaging.
-------------------------------------------------------------------
Fri Feb 10 10:24:49 UTC 2017 - rguenther@suse.com
- Enable Ada for s390x.
-------------------------------------------------------------------
Mon Jan 23 12:36:58 UTC 2017 - rguenther@suse.com
- Remove java related packages, those are in a separate gcc-java now.
-------------------------------------------------------------------
Thu Aug 18 07:32:25 UTC 2016 - rguenther@suse.com
- Add gcc-devel package.
-------------------------------------------------------------------
Wed Apr 27 11:11:52 UTC 2016 - rguenther@suse.com
- Switch gcc to default 6.
-------------------------------------------------------------------
Thu Apr 14 11:01:22 UTC 2016 - rguenther@suse.com
- Enable Ada for ppc64le and aarch64.
-------------------------------------------------------------------
Thu May 21 09:25:10 UTC 2015 - rguenther@suse.com
- Properly query gcc-%gcc_suffix for paths.
-------------------------------------------------------------------
Tue May 19 12:11:27 UTC 2015 - rguenther@suse.com
- Fix bogus requires to gcc5-c++-{32,64}bit.
-------------------------------------------------------------------
Fri May 8 13:00:15 UTC 2015 - rguenther@suse.com
- Adjust for GCC 5 package renames.
-------------------------------------------------------------------
Mon Apr 20 10:24:01 UTC 2015 - rguenther@suse.com
- Switch gcc to default 5.
- Add gcc-go{,-32bit,-64bit} packages.
-------------------------------------------------------------------
Mon Mar 2 13:34:23 UTC 2015 - schwab@suse.de
- Add gcc-ada-32bit and gcc-ada-64bit packages only if building Ada
-------------------------------------------------------------------
Wed Feb 25 14:21:45 UTC 2015 - rguenther@suse.com
- Add gcc-ada-32bit and gcc-ada-64bit packages.
-------------------------------------------------------------------
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
- Link to the system compiler LTO plugin from /usr/lib/bfd-plugins.
-------------------------------------------------------------------
Tue Feb 4 10:08:54 UTC 2014 - rguenther@suse.com
- Remove gcc-z9 wrapper which is obsolete.
-------------------------------------------------------------------
Mon Dec 2 15:34:27 UTC 2013 - rguenther@suse.com
- Move gcc-ar, gcc-nm and gcc-ranlib to the gcc package instead
of packaging them separately.
-------------------------------------------------------------------
Wed Jun 19 12:24:24 UTC 2013 - rguenther@suse.com
- Package gcc-ar, gcc-nm and gcc-ranlib wrapping ar, nm and ranlib
in a plugin-aware fashion.
-------------------------------------------------------------------
Mon May 27 12:55:02 UTC 2013 - rguenther@suse.com
- Switch gcc to default 4.8.
-------------------------------------------------------------------
Mon Jan 7 09:10:36 UTC 2013 - rguenther@suse.com
- Re-enable Ada for ppc64.
-------------------------------------------------------------------
Thu Dec 13 14:15:21 UTC 2012 - rguenther@suse.com
- Add BuildRequires to gcc$version, required for cc1 path detection.
-------------------------------------------------------------------
Wed Nov 28 14:03:29 UTC 2012 - rguenther@suse.com
- Rework gcc-info.
* Install symlinks to the versioned info files and adjust
install_info calls. [bnc#756182]
* Provide uninstall hook that removes the alias entries.
-------------------------------------------------------------------
Thu Oct 4 18:21:01 UTC 2012 - dmueller@suse.com
- remove gcc-ada subpackage for those architectures that
don't have a gccXX-ada package
-------------------------------------------------------------------
Wed Apr 18 11:26:15 UTC 2012 - rguenther@suse.com
- Switch gcc to default 4.7.
-------------------------------------------------------------------
Fri Jan 27 15:30:38 UTC 2012 - rguenther@suse.com
- Change licenses to follow SPDX convention.
-------------------------------------------------------------------
Mon Sep 26 13:41:02 CEST 2011 - dmueller@suse.de
- use the target gcc binary for finding the right cc1 path
-------------------------------------------------------------------
Wed May 11 08:15:44 UTC 2011 - rguenther@novell.com
- Switch gcc to default 4.6.
-------------------------------------------------------------------
Thu Feb 10 10:06:12 UTC 2011 - rguenther@novell.com
- Fix licenses to match those of the system compiler. [bnc#670658]
-------------------------------------------------------------------
Tue Jan 25 10:36:30 UTC 2011 - rguenther@novell.com
- Fix string quoting. [bnc#666416]
-------------------------------------------------------------------
Wed Jan 12 11:53:29 UTC 2011 - rguenther@novell.com
- Uglify spec file formatting.
-------------------------------------------------------------------
Fri Dec 10 11:53:06 UTC 2010 - rguenther@novell.com
- Add info directory aliases for unversioned variants of the
GCC user manuals. [bnc#635355]
-------------------------------------------------------------------
Mon Nov 29 12:24:23 UTC 2010 - rguenther@novell.com
- Drop libffi packages.
-------------------------------------------------------------------
Fri Feb 26 11:30:14 CET 2010 - rguenther@novell.com
- Fix gcc-c++-32bit and gcc-c++-64bit again.
-------------------------------------------------------------------
Thu Feb 25 14:01:36 CET 2010 - rguenther@suse.de
- Drop c++_compiler provides from gcc-c++-32bit and gcc-c++-64bit.
-------------------------------------------------------------------
Thu Feb 25 13:03:44 CET 2010 - rguenther@suse.de
- Re-add gcc-c++-32bit and gcc-c++-64bit packages.
-------------------------------------------------------------------
Tue Feb 16 15:45:20 UTC 2010 - coolo@novell.com
- Switch gcc to default 4.5.
-------------------------------------------------------------------
Mon Apr 27 17:01:13 CEST 2009 - rguenther@suse.de
- Switch gcc default to 4.4.
-------------------------------------------------------------------
Mon Feb 16 11:03:38 CET 2009 - rguenther@suse.de
- Enable links for classpath binaries and manpages again.
-------------------------------------------------------------------
Fri Jan 9 15:35:45 CET 2009 - rguenther@suse.de
- On ppc64 obsolete gcc-objc-64bit by gcc-objc.
-------------------------------------------------------------------
Thu Dec 4 18:26:30 CET 2008 - matz@suse.de
- Add new gcc-z9 package on s390 and s390x to change the
default -march and -mtune settings.
-------------------------------------------------------------------
Wed May 7 11:18:00 CEST 2008 - rguenther@suse.de
- Make dependencies between the gcc subpackages versioned. [bnc#385305]
-------------------------------------------------------------------
Fri Nov 23 14:53:40 CET 2007 - rguenther@suse.de
- Make gcc-gij dependency of gcc-java a recommendation, all java
tools are back to the gcc-java package. Require libgcj-devel
from gcc-java.
- Revert /lib/cpp changes.
-------------------------------------------------------------------
Fri Nov 16 16:15:54 CET 2007 - rguenther@suse.de
- For now disable symlinking of binaries and manpages that
conflict with the classpath package.
-------------------------------------------------------------------
Tue Nov 13 14:38:25 CET 2007 - rguenther@suse.de
- Make /lib/cpp traditional and avoid GCC and target specific
defines.
-------------------------------------------------------------------
Tue Oct 30 11:19:36 CET 2007 - rguenther@suse.de
- Add gcc-gij dependency to gcc-java as it contains many of the
tools formerly packaged in the gcc-java package.
-------------------------------------------------------------------
Mon Sep 24 11:21:52 CEST 2007 - rguenther@suse.de
- Switch gcc default to 4.3.
-------------------------------------------------------------------
Fri Jul 27 20:35:04 CEST 2007 - rguenther@suse.de
- Fix typo.
-------------------------------------------------------------------
Tue Jul 24 11:14:03 CEST 2007 - rguenther@suse.de
- Add 32bit and 64bit variants of gcc-gij. [#293423]
-------------------------------------------------------------------
Fri Jul 6 15:10:24 CEST 2007 - rguenther@suse.de
- Mark ppc64 as separate bi-32.
-------------------------------------------------------------------
Thu Jun 14 18:39:23 CEST 2007 - ro@suse.de
- Do not mark README.packaging as NoSource. (again)
-------------------------------------------------------------------
Fri Jun 8 16:19:40 CEST 2007 - rguenther@suse.de
- Switch gcc default to 4.2. [#275939]
-------------------------------------------------------------------
Tue Apr 24 18:35:21 CEST 2007 - rguenther@suse.de
- Do not link to grmic and grmiregistry, they conflict with
the classpath package versions.
-------------------------------------------------------------------
Tue Jan 16 17:05:32 CET 2007 - rguenther@suse.de
- Do not mark README.packaging as NoSource.
-------------------------------------------------------------------
Thu Nov 9 17:40:49 CET 2006 - rguenther@suse.de
- Remove gcc-c++-32bit and gcc-c++-64bit packages.
-------------------------------------------------------------------
Tue Oct 31 15:03:02 CET 2006 - dmueller@suse.de
- don't build as root
-------------------------------------------------------------------
Mon Oct 30 12:11:34 CET 2006 - rguenther@suse.de
- Make gcc architecture dependent again. [#215971]
-------------------------------------------------------------------
Thu Oct 26 11:40:43 CEST 2006 - rguenther@suse.de
- Add dependencies to the gcc and non-32/64bit packages. [#215217]
-------------------------------------------------------------------
Tue Sep 19 16:27:15 CEST 2006 - rguenther@suse.de
- New gcc-gij package.
-------------------------------------------------------------------
Fri Aug 25 10:37:29 CEST 2006 - rguenther@suse.de
- Add 32bit and 64bit support packages to gcc, gcc-c++, gcc-fortran,
gcc-objc and libffi-devel.
-------------------------------------------------------------------
Thu Aug 24 08:24:20 CEST 2006 - rguenther@suse.de
- Make gcc require cpp to pull in /lib/cpp.
-------------------------------------------------------------------
Fri Aug 18 10:54:23 CEST 2006 - rguenther@suse.de
- gcc obsoletes gcc-mudflap which is no longer.
-------------------------------------------------------------------
Mon Aug 7 11:28:34 CEST 2006 - rguenther@suse.de
- Provide gcc-mudflap, gcc-info and gcc-locale packages [#197515].
-------------------------------------------------------------------
Fri Jul 14 14:46:31 CEST 2006 - rguenther@suse.de
- New package.

695
gcc.spec Normal file
View File

@ -0,0 +1,695 @@
#
# spec file
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "build"
%define gccsuffix -build
%define gcc_version 13
%define gcc_suffix 13
%else
%define gccsuffix %{nil}
%define gcc_version 13
%define gcc_suffix 13
%endif
Name: gcc%{gccsuffix}
%define separate_bi32 0
%define separate_bi64 0
%if 0%{!?disable_32bit:1}
%ifarch ppc sparcv9
%define separate_bi64 1
%endif
%ifarch x86_64 s390x ppc64 sparc64
%define separate_bi32 1
%endif
%endif
# Ada currently fails to build on a few platforms, enable it only
# on those that work
# Note that AdaCore only supports %%ix86, x86_64 and ia64
%ifarch %ix86 x86_64 ppc ppc64 ppc64le s390 s390x ia64 aarch64 riscv64
%define build_ada 1
%else
# alpha hppa arm
%define build_ada 0
%endif
%ifarch x86_64 %ix86 %arm aarch64 riscv64 s390x
%define build_d 1
%else
%define build_d 0
%endif
%define libgccjit_sover 0
URL: http://gcc.gnu.org/
Version: %{gcc_version}
Release: 0
Summary: The system GNU C Compiler
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Provides: c_compiler
Requires: cpp%{gccsuffix}
Requires: gcc%{gcc_version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc%{gcc_version}
BuildRequires: gcc%{gcc_version}-c++
BuildRequires: gcc%{gcc_version}-fortran
BuildRequires: gcc%{gcc_version}-go
%if %{build_ada}
BuildRequires: gcc%{gcc_version}-ada
%endif
%if %{build_d}
BuildRequires: gcc%{gcc_version}-d
%endif
Source: cpp
%if "%{gccsuffix}" != "" && 0%{?is_opensuse}
ExclusiveArch: do-not-build
%endif
%description -n gcc%{gccsuffix}
The system GNU C Compiler.
%package -n gcc%{gccsuffix}-32bit
Summary: The system GNU C Compiler
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc%{gcc_version}-32bit
Requires: gcc%{gccsuffix} = %{version}
%description -n gcc%{gccsuffix}-32bit
The system GNU C Compiler.
%package -n gcc%{gccsuffix}-64bit
Summary: The system GNU C Compiler
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc%{gcc_version}-64bit
Requires: gcc%{gccsuffix} = %{version}
%description -n gcc%{gccsuffix}-64bit
The system GNU C Compiler.
%package -n cpp%{gccsuffix}
Summary: The system GNU Preprocessor
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: cpp%{gcc_version}
# Only one of the symlink packages can be installed at the same time
Provides: cpp = %{version}-%{release}
Conflicts: cpp
%description -n cpp%{gccsuffix}
The system GNU Preprocessor.
%package -n gcc%{gccsuffix}-devel
Summary: The system GNU C Compiler Plugin development files
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc%{gcc_version}-devel
Requires: gcc%{gccsuffix} = %{version}
%description -n gcc%{gccsuffix}-devel
The system GNU C Compiler Plugin development files.
%package -n gcc%{gccsuffix}-locale
Summary: The system GNU Compiler locale files
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc%{gcc_version}-locale
%description -n gcc%{gccsuffix}-locale
The system GNU Compiler locale files.
%package -n gcc%{gccsuffix}-info
Summary: The system GNU Compiler documentation
License: GFDL-1.2-only
Group: Development/Languages/C and C++
PreReq: %{install_info_prereq}
PreReq: gcc%{gcc_version}-info
%description -n gcc%{gccsuffix}-info
The system GNU Compiler documentation.
# install / update the entries
%post -n gcc%{gccsuffix}-info
%install_info --info-dir=%{_infodir} --name=cpp --description='The GNU C preprocessor.' %{_infodir}/cpp.info.gz
%install_info --info-dir=%{_infodir} --name=gcc --description='The GNU Compiler Collection.' %{_infodir}/gcc.info.gz
%install_info --info-dir=%{_infodir} --name=g++ --description='The GNU C++ compiler.' %{_infodir}/gcc.info.gz
%install_info --info-dir=%{_infodir} --name=gfortran --description='The GNU Fortran compiler.' %{_infodir}/gfortran.info.gz
# if we uninstall, clean the entries
%preun -n gcc%{gccsuffix}-info
if [ "$1" -eq "0" ] ; then
%install_info --delete --info-dir=%{_infodir} --name=cpp %{_infodir}/cpp.info.gz
%install_info --delete --info-dir=%{_infodir} --name=gcc %{_infodir}/gcc.info.gz
%install_info --delete --info-dir=%{_infodir} --name=g++ %{_infodir}/gcc.info.gz
%install_info --delete --info-dir=%{_infodir} --name=gfortran %{_infodir}/gfortran.info.gz
fi
%package -n gcc%{gccsuffix}-c++
Summary: The system GNU C++ Compiler
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Provides: c++_compiler
Requires: gcc%{gcc_version}-c++
Requires: gcc%{gccsuffix} = %{version}
%description -n gcc%{gccsuffix}-c++
The system GNU C++ Compiler.
%package -n gcc%{gccsuffix}-c++-32bit
Summary: The system GNU C++ Compiler
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc%{gcc_version}-c++-32bit
Requires: gcc%{gccsuffix}-32bit = %{version}
Requires: gcc%{gccsuffix}-c++ = %{version}
%description -n gcc%{gccsuffix}-c++-32bit
The system GNU C++ Compiler 32 bit support.
%package -n gcc%{gccsuffix}-c++-64bit
Summary: The system GNU C++ Compiler
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc%{gcc_version}-c++-64bit
Requires: gcc%{gccsuffix}-64bit = %{version}
Requires: gcc%{gccsuffix}-c++ = %{version}
%description -n gcc%{gccsuffix}-c++-64bit
The system GNU C++ Compiler 64 bit support.
%package -n libstdc++%{gccsuffix}-devel
Summary: The system GNU C++ development files
License: GPL-3.0-only WITH GCC-exception-3.1
Group: System/Libraries
Requires: libstdc++6-devel-gcc%{gcc_version}
%description -n libstdc++%{gccsuffix}-devel
The system GNU C++ development files.
%package -n libstdc++%{gccsuffix}-devel-32bit
Summary: The system GNU C++ 32bit development files
License: GPL-3.0-only WITH GCC-exception-3.1
Group: System/Libraries
Requires: libstdc++%{gccsuffix}-devel
Requires: libstdc++6-devel-gcc%{gcc_version}-32bit
%description -n libstdc++%{gccsuffix}-devel-32bit
The system GNU C++ 32bit development files.
%package -n libstdc++%{gccsuffix}-devel-64bit
Summary: The system GNU C++ 64bit development files
License: GPL-3.0-only WITH GCC-exception-3.1
Group: System/Libraries
Requires: libstdc++%{gccsuffix}-devel
Requires: libstdc++6-devel-gcc%{gcc_version}-64bit
%description -n libstdc++%{gccsuffix}-devel-64bit
The system GNU C++ 64bit development files.
%package -n gcc%{gccsuffix}-fortran
Summary: The system GNU Fortran Compiler
License: GPL-3.0-or-later
Group: Development/Languages/Fortran
Requires: gcc%{gcc_version}-fortran
Requires: gcc%{gccsuffix} = %{version}
%description -n gcc%{gccsuffix}-fortran
The system GNU Fortran Compiler.
%package -n gcc%{gccsuffix}-fortran-32bit
Summary: The system GNU Fortran Compiler
License: GPL-3.0-or-later
Group: Development/Languages/Fortran
Requires: gcc%{gcc_version}-fortran-32bit
Requires: gcc%{gccsuffix}-fortran = %{version}
%description -n gcc%{gccsuffix}-fortran-32bit
The system GNU Fortran Compiler 32 bit support.
%package -n gcc%{gccsuffix}-fortran-64bit
Summary: The system GNU Fortran Compiler
License: GPL-3.0-or-later
Group: Development/Languages/Fortran
Requires: gcc%{gcc_version}-fortran-64bit
Requires: gcc%{gccsuffix}-fortran = %{version}
%description -n gcc%{gccsuffix}-fortran-64bit
The system GNU Fortran Compiler 64 bit support.
%package -n gcc%{gccsuffix}-objc
Summary: The system GNU Objective C Compiler
License: GPL-3.0-or-later
Group: Development/Languages/Other
Requires: gcc%{gcc_version}-objc
Requires: gcc%{gccsuffix} = %{version}
%ifarch ppc64
Obsoletes: gcc%{gccsuffix}-objc-64bit
%endif
%description -n gcc%{gccsuffix}-objc
The system GNU Objective C Compiler.
%package -n gcc%{gccsuffix}-objc-32bit
Summary: The system GNU Objective C Compiler
License: GPL-3.0-or-later
Group: Development/Languages/Other
Requires: gcc%{gcc_version}-objc-32bit
Requires: gcc%{gccsuffix}-objc = %{version}
%description -n gcc%{gccsuffix}-objc-32bit
The system GNU Objective C Compiler 32 bit support.
%package -n gcc%{gccsuffix}-objc-64bit
Summary: The system GNU Objective C Compiler
License: GPL-3.0-or-later
Group: Development/Languages/Other
Requires: gcc%{gcc_version}-objc-64bit
Requires: gcc%{gccsuffix}-objc = %{version}
%description -n gcc%{gccsuffix}-objc-64bit
The system GNU Objective C Compiler 64 bit support.
%package -n gcc%{gccsuffix}-obj-c++
Summary: The system GNU Objective C++ Compiler
License: GPL-3.0-or-later
Group: Development/Languages/Other
Requires: gcc%{gcc_version}-obj-c++
Requires: gcc%{gccsuffix}-objc = %{version}
%description -n gcc%{gccsuffix}-obj-c++
The system GNU Objective C++ Compiler.
%package -n gcc%{gccsuffix}-PIE
Summary: A default configuration to build all binaries in PIE mode
License: GPL-3.0-or-later
Group: Development/Languages/Other
Requires: gcc%{gcc_version}-PIE
%description -n gcc%{gccsuffix}-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 -n gcc%{gccsuffix}-ada
Summary: The system GNU Ada Compiler
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc%{gcc_version}-ada
Requires: gcc%{gccsuffix} = %{version}
%description -n gcc%{gccsuffix}-ada
The system GNU Ada Compiler.
%package -n gcc%{gccsuffix}-ada-32bit
Summary: The system GNU Ada Compiler
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc%{gcc_version}-ada-32bit
Requires: gcc%{gccsuffix}-ada = %{version}
%description -n gcc%{gccsuffix}-ada-32bit
The system GNU Ada Compiler 32 bit support.
%package -n gcc%{gccsuffix}-ada-64bit
Summary: The system GNU Ada Compiler
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc%{gcc_version}-ada-64bit
Requires: gcc%{gccsuffix}-ada = %{version}
%description -n gcc%{gccsuffix}-ada-64bit
The system GNU Ada Compiler 64 bit support.
%package -n gcc%{gccsuffix}-go
Summary: The system GNU Go Compiler
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc%{gcc_version}-go
Requires: gcc%{gccsuffix} = %{version}
Requires(post): update-alternatives
Requires(postun):update-alternatives
%description -n gcc%{gccsuffix}-go
The system GNU Go Compiler.
%package -n gcc%{gccsuffix}-go-32bit
Summary: The system GNU Go Compiler
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc%{gcc_version}-go-32bit
Requires: gcc%{gccsuffix}-go = %{version}
%description -n gcc%{gccsuffix}-go-32bit
The system GNU Go Compiler 32bit support.
%package -n gcc%{gccsuffix}-go-64bit
Summary: The system GNU Go Compiler
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc%{gcc_version}-go-64bit
Requires: gcc%{gccsuffix}-go = %{version}
%description -n gcc%{gccsuffix}-go-64bit
The system GNU Go Compiler 64bit support.
%package -n gcc%{gccsuffix}-d
Summary: The system GNU D Compiler
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc%{gcc_version}-d
Requires: gcc%{gccsuffix} = %{version}
Requires(post): update-alternatives
Requires(postun):update-alternatives
%description -n gcc%{gccsuffix}-d
The system GNU D Compiler.
%package -n gcc%{gccsuffix}-d-32bit
Summary: The system GNU D Compiler
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc%{gcc_version}-d-32bit
Requires: gcc%{gccsuffix}-d = %{version}
%description -n gcc%{gccsuffix}-d-32bit
The system GNU D Compiler 32bit support.
%package -n gcc%{gccsuffix}-d-64bit
Summary: The system GNU D Compiler
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc%{gcc_version}-d-64bit
Requires: gcc%{gccsuffix}-d = %{version}
%description -n gcc%{gccsuffix}-d-64bit
The system GNU D Compiler 64bit support.
%package -n libgccjit%{gccsuffix}-devel
Summary: Support for embedding GCC inside programs and libraries
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: libgccjit%{libgccjit_sover}-devel-gcc%{gcc_version}
%description -n libgccjit%{gccsuffix}-devel
Package contains header files and documentation for GCC JIT front-end.
%prep
%install
mkdir -p $RPM_BUILD_ROOT/lib
mkdir -p $RPM_BUILD_ROOT%{_prefix}/bin
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
mkdir -p $RPM_BUILD_ROOT%{_infodir}
mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/doc/packages/gcc-objc/
mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/doc/packages/gcc-obj-c++/
# Link all the binaries
for program in \
gcc gcov gcov-dump gcov-tool lto-dump \
g++ \
cpp \
gfortran \
gccgo \
%if %{build_ada}
gnat gnatbind gnatchop gnatclean gnatkr \
gnatlink gnatls gnatmake gnatname gnatprep \
%endif
%if %{build_d}
gdc \
%endif
gcc-ar gcc-nm gcc-ranlib \
; do
ln -sf $program-%{gcc_suffix} $RPM_BUILD_ROOT%{_prefix}/bin/$program
done
# For go and gofmt use alternatives since they are shared with golang
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
ln -sf %{_sysconfdir}/alternatives/go %{buildroot}%{_bindir}/go
ln -sf %{_sysconfdir}/alternatives/gofmt %{buildroot}%{_bindir}/gofmt
# Link section 1 manpages
for man1 in \
gcc gcov gcov-dump gcov-tool lto-dump \
g++ \
cpp \
gfortran \
gccgo \
%if %{build_d}
gdc \
%endif
; do
ln -sf $man1-%{gcc_suffix}.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/$man1.1.gz
done
# Link info pages
for info in cpp gcc gfortran ; do
ln -sf $info-%{gcc_suffix}.info.gz $RPM_BUILD_ROOT%{_infodir}/$info.info.gz
done
# Provide the traditional /lib/cpp (as /usr/lib/cpp on usrmerged systems)
# that only handles C
%if 0%{?suse_version} < 1550
cp $RPM_SOURCE_DIR/cpp $RPM_BUILD_ROOT/lib/
chmod 755 $RPM_BUILD_ROOT/lib/cpp
%else
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib
cp $RPM_SOURCE_DIR/cpp $RPM_BUILD_ROOT%{_prefix}/lib/
chmod 755 $RPM_BUILD_ROOT%{_prefix}/lib/cpp
%endif
# Provide extra symlinks
ln -sf g++-%{gcc_suffix} $RPM_BUILD_ROOT%{_prefix}/bin/c++
ln -sf gcc-%{gcc_suffix} $RPM_BUILD_ROOT%{_prefix}/bin/cc
ln -sf g++-%{gcc_suffix}.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/c++.1.gz
ln -sf gcc-%{gcc_suffix}.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/cc.1.gz
# Install the LTO linker plugin so it is auto-loaded by BFD
mkdir -p $RPM_BUILD_ROOT%{_libdir}/bfd-plugins
ln -s `gcc-%{gcc_suffix} -print-file-name=liblto_plugin.so` $RPM_BUILD_ROOT%{_libdir}/bfd-plugins/liblto_plugin.so
%post -n gcc%{gccsuffix}-go
# we don't want a BuildRequires on gccN-go but otherwise the install
# step of the build fails, so simply skip the script when gccN-go isn't there
if [ -f %{_bindir}/go-%{gcc_suffix} ] ; then
update-alternatives \
--install %{_bindir}/go go %{_bindir}/go-%{gcc_suffix} 100 \
--slave %{_bindir}/gofmt gofmt %{_bindir}/gofmt-%{gcc_suffix}
fi
%postun -n gcc%{gccsuffix}-go
if [ $1 -eq 0 ] ; then
update-alternatives --remove go %{_bindir}/go-%{gcc_suffix}
fi
%files -n gcc%{gccsuffix}
%defattr(-,root,root)
%{_prefix}/bin/gcc
%{_prefix}/bin/cc
%{_prefix}/bin/gcov
%{_prefix}/bin/gcov-dump
%{_prefix}/bin/gcov-tool
%{_prefix}/bin/lto-dump
%{_prefix}/bin/gcc-ar
%{_prefix}/bin/gcc-nm
%{_prefix}/bin/gcc-ranlib
%dir %{_libdir}/bfd-plugins
%{_libdir}/bfd-plugins/liblto_plugin.so
%doc %{_mandir}/man1/gcc.1.gz
%doc %{_mandir}/man1/cc.1.gz
%doc %{_mandir}/man1/gcov.1.gz
%doc %{_mandir}/man1/gcov-dump.1.gz
%doc %{_mandir}/man1/gcov-tool.1.gz
%doc %{_mandir}/man1/lto-dump.1.gz
%files -n cpp%{gccsuffix}
%defattr(-,root,root)
%if 0%{?suse_version} < 1550
/lib/cpp
%else
%{_prefix}/lib/cpp
%endif
%{_prefix}/bin/cpp
%doc %{_mandir}/man1/cpp.1.gz
# Plugins are only enabled for Tumbleweed
%if 0%{!?sle_version:1}
%files -n gcc%{gccsuffix}-devel
%defattr(-,root,root)
# empty - only for the dependency
%endif
%files -n gcc%{gccsuffix}-c++
%defattr(-,root,root)
%{_prefix}/bin/g++
%{_prefix}/bin/c++
%doc %{_mandir}/man1/g++.1.gz
%doc %{_mandir}/man1/c++.1.gz
%files -n gcc%{gccsuffix}-fortran
%defattr(-,root,root)
%{_prefix}/bin/gfortran
%doc %{_mandir}/man1/gfortran.1.gz
%files -n gcc%{gccsuffix}-objc
%defattr(-,root,root)
# empty - only for the dependency
%files -n gcc%{gccsuffix}-obj-c++
%defattr(-,root,root)
# empty - only for the dependency
%files -n gcc%{gccsuffix}-PIE
%defattr(-,root,root)
# empty - only for the dependency
%files -n gcc%{gccsuffix}-locale
%defattr(-,root,root)
# empty - only for the dependency
%files -n gcc%{gccsuffix}-info
%defattr(-,root,root)
%{_infodir}/cpp.info.gz
%{_infodir}/gcc.info.gz
%{_infodir}/gfortran.info.gz
%if %{build_ada}
%files -n gcc%{gccsuffix}-ada
%defattr(-,root,root)
%{_prefix}/bin/gnat
%{_prefix}/bin/gnatbind
%{_prefix}/bin/gnatchop
%{_prefix}/bin/gnatclean
%{_prefix}/bin/gnatkr
%{_prefix}/bin/gnatlink
%{_prefix}/bin/gnatls
%{_prefix}/bin/gnatmake
%{_prefix}/bin/gnatname
%{_prefix}/bin/gnatprep
%endif
%files -n libstdc++%{gccsuffix}-devel
%defattr(-,root,root)
# empty - only for the dependency
%files -n gcc%{gccsuffix}-go
%defattr(-,root,root)
%{_bindir}/gccgo
%{_bindir}/go
%{_bindir}/gofmt
%ghost %{_sysconfdir}/alternatives/go
%ghost %{_sysconfdir}/alternatives/gofmt
%doc %{_mandir}/man1/gccgo.1.gz
%if %{build_d}
%files -n gcc%{gccsuffix}-d
%defattr(-,root,root)
%{_bindir}/gdc
%doc %{_mandir}/man1/gdc.1.gz
%endif
%if %{separate_bi32}
%files -n gcc%{gccsuffix}-32bit
%defattr(-,root,root)
# empty - only for the dependency
%files -n gcc%{gccsuffix}-c++-32bit
%defattr(-,root,root)
# empty - only for the dependency
%files -n libstdc++%{gccsuffix}-devel-32bit
%defattr(-,root,root)
# empty - only for the dependency
%files -n gcc%{gccsuffix}-fortran-32bit
%defattr(-,root,root)
# empty - only for the dependency
%files -n gcc%{gccsuffix}-objc-32bit
%defattr(-,root,root)
# empty - only for the dependency
%if %{build_ada}
%files -n gcc%{gccsuffix}-ada-32bit
%defattr(-,root,root)
# empty - only for the dependency
%endif
%files -n gcc%{gccsuffix}-go-32bit
%defattr(-,root,root)
# empty - only for the dependency
%if %{build_d}
%files -n gcc%{gccsuffix}-d-32bit
%defattr(-,root,root)
# empty - only for the dependency
%endif
%endif
%if %{separate_bi64}
%files -n gcc%{gccsuffix}-64bit
%defattr(-,root,root)
# empty - only for the dependency
%files -n gcc%{gccsuffix}-c++-64bit
%defattr(-,root,root)
# empty - only for the dependency
%files -n libstdc++%{gccsuffix}-devel-64bit
%defattr(-,root,root)
# empty - only for the dependency
%files -n gcc%{gccsuffix}-fortran-64bit
%defattr(-,root,root)
# empty - only for the dependency
%files -n gcc%{gccsuffix}-objc-64bit
%defattr(-,root,root)
# empty - only for the dependency
%if %{build_ada}
%files -n gcc%{gccsuffix}-ada-64bit
%defattr(-,root,root)
# empty - only for the dependency
%endif
%files -n gcc%{gccsuffix}-go-64bit
%defattr(-,root,root)
# empty - only for the dependency
%if %{build_d}
%files -n gcc%{gccsuffix}-d-64bit
%defattr(-,root,root)
# empty - only for the dependency
%endif
%endif
%files -n libgccjit%{gccsuffix}-devel
%defattr(-,root,root)
# empty - only for the dependency
%changelog