diff --git a/gcc-12.spec b/gcc-12.spec index ed80a26d86daf2b081196c1e4c2834024f63c55b..665e4b9760d21dc88c6077a3407617af0c8382da 100644 --- a/gcc-12.spec +++ b/gcc-12.spec @@ -12,7 +12,8 @@ %if 0%{?scl:1} %global scl_prefix gcc-toolset-12- %global _prefix /opt/openEuler/gcc-toolset-12/root/usr - +%global gcc_ver %{nil} +%define binsuffix %{nil} %define __provides_exclude ^lib.*$ %endif @@ -82,9 +83,9 @@ %endif Summary: Various compilers (C, C++, Objective-C, ...) -Name: %{?scl_prefix}gcc +Name: %{?scl_prefix}gcc%{gcc_ver} Version: 12.2.1 -Release: 9 +Release: 11 # libgcc, libgfortran, libgomp, libstdc++ and crtstuff have # GCC Runtime Exception. License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD @@ -114,14 +115,14 @@ BuildRequires: gcc-gdc >= 11.0.0, libgphobos-static >= 11.0.0 BuildRequires: libunwind >= 0.98 %endif -Requires: %{?scl_prefix}cpp = %{version}-%{release} +Requires: %{?scl_prefix}cpp%{gcc_ver} = %{version}-%{release} Requires: binutils >= 2.31 Conflicts: gdb < 5.1-2 Requires: glibc-devel >= 2.17 -Requires: %{?scl_prefix}libgcc >= %{version}-%{release} -Requires: %{?scl_prefix}libgomp = %{version}-%{release} +Requires: %{?scl_prefix}libgcc%{gcc_ver} >= %{version}-%{release} +Requires: %{?scl_prefix}libgomp%{gcc_ver} = %{version}-%{release} %if %{build_libasan} -Requires: %{?scl_prefix}libasan = %{version}-%{release} +Requires: %{?scl_prefix}libasan%{gcc_ver} = %{version}-%{release} %endif # lto-wrapper invokes make Requires: make @@ -129,7 +130,7 @@ AutoReq: true #Provides: bundled(libiberty) #Provides: bundled(libbacktrace) #Provides: bundled(libffi) -Provides: %{?scl_prefix}gcc(major) = %{gcc_major} +Provides: %{?scl_prefix}gcc%{gcc_ver}(major) = %{gcc_major} Patch0: 0001-change-gcc-version.patch @@ -179,21 +180,21 @@ chmod 755 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major} %description The gcc package contains the GNU Compiler Collection version 12. -%package -n %{?scl_prefix}libgcc +%package -n %{?scl_prefix}libgcc%{gcc_ver} Summary: GCC version 12 shared support library Autoreq: false -%description -n %{?scl_prefix}libgcc +%description -n %{?scl_prefix}libgcc%{gcc_ver} This package contains GCC shared support library which is needed e.g. for exception handling support. %package c++ Summary: C++ support for GCC -Requires: %{?scl_prefix}gcc = %{version}-%{release} -Requires: %{?scl_prefix}libstdc++ = %{version}-%{release} -Requires: %{?scl_prefix}libstdc++-devel = %{version}-%{release} -Provides: %{?scl_prefix}gcc-g++ = %{version}-%{release} -Provides: %{?scl_prefix}g++ = %{version}-%{release} +Requires: %{?scl_prefix}gcc%{gcc_ver} = %{version}-%{release} +Requires: %{?scl_prefix}libstdc++%{gcc_ver} = %{version}-%{release} +Requires: %{?scl_prefix}libstdc++%{gcc_ver}-devel = %{version}-%{release} +Provides: %{?scl_prefix}gcc-g++%{gcc_ver} = %{version}-%{release} +Provides: %{?scl_prefix}g++%{gcc_ver} = %{version}-%{release} Autoreq: true %description c++ @@ -201,45 +202,45 @@ This package adds C++ support to the GNU Compiler Collection. It includes support for most of the current C++ specification, including templates and exception handling. -%package -n %{?scl_prefix}libstdc++ +%package -n %{?scl_prefix}libstdc++%{gcc_ver} Summary: GNU Standard C++ Library Autoreq: true Requires: glibc >= 2.10.90-7 -%description -n %{?scl_prefix}libstdc++ +%description -n %{?scl_prefix}libstdc++%{gcc_ver} The libstdc++ package contains a rewritten standard compliant GCC Standard C++ Library. -%package -n %{?scl_prefix}libstdc++-devel +%package -n %{?scl_prefix}libstdc++%{gcc_ver}-devel Summary: Header files and libraries for C++ development -Requires: %{?scl_prefix}libstdc++%{?_isa} = %{version}-%{release} +Requires: %{?scl_prefix}libstdc++%{gcc_ver}%{?_isa} = %{version}-%{release} Autoreq: true -%description -n %{?scl_prefix}libstdc++-devel +%description -n %{?scl_prefix}libstdc++%{gcc_ver}-devel This is the GNU implementation of the standard C++ libraries. This package includes the header files and libraries needed for C++ development. This includes rewritten implementation of STL. -%package -n %{?scl_prefix}libstdc++-static +%package -n %{?scl_prefix}libstdc++%{gcc_ver}-static Summary: Static libraries for the GNU standard C++ library -Requires: %{?scl_prefix}libstdc++-devel = %{version}-%{release} +Requires: %{?scl_prefix}libstdc++%{gcc_ver}-devel = %{version}-%{release} Autoreq: true -%description -n %{?scl_prefix}libstdc++-static +%description -n %{?scl_prefix}libstdc++%{gcc_ver}-static Static libraries for the GNU standard C++ library. -%package -n %{?scl_prefix}libstdc++-docs +%package -n %{?scl_prefix}libstdc++%{gcc_ver}-docs Summary: Documentation for the GNU standard C++ library Autoreq: true -%description -n %{?scl_prefix}libstdc++-docs +%description -n %{?scl_prefix}libstdc++%{gcc_ver}-docs Manual, doxygen generated API information and Frequently Asked Questions for the GNU standard C++ library. %package objc Summary: Objective-C support for GCC -Requires: %{?scl_prefix}gcc = %{version}-%{release} -Requires: %{?scl_prefix}libobjc = %{version}-%{release} +Requires: %{?scl_prefix}gcc%{gcc_ver} = %{version}-%{release} +Requires: %{?scl_prefix}libobjc%{gcc_ver} = %{version}-%{release} Autoreq: true %description objc @@ -249,240 +250,240 @@ object-oriented derivative of the C language. %package objc++ Summary: Objective-C++ support for GCC -Requires: %{?scl_prefix}gcc-c++ = %{version}-%{release} -Requires: %{?scl_prefix}gcc-objc = %{version}-%{release} +Requires: %{?scl_prefix}gcc%{gcc_ver}-c++ = %{version}-%{release} +Requires: %{?scl_prefix}gcc%{gcc_ver}-objc = %{version}-%{release} Autoreq: true %description objc++ gcc-objc++ package provides Objective-C++ support for the GCC. -%package -n %{?scl_prefix}libobjc +%package -n %{?scl_prefix}libobjc%{gcc_ver} Summary: Objective-C runtime Autoreq: true -%description -n %{?scl_prefix}libobjc +%description -n %{?scl_prefix}libobjc%{gcc_ver} This package contains Objective-C shared library which is needed to run Objective-C dynamically linked programs. %package gfortran Summary: Fortran support -Requires: %{?scl_prefix}gcc = %{version}-%{release} -Requires: %{?scl_prefix}libgfortran = %{version}-%{release} +Requires: %{?scl_prefix}gcc%{gcc_ver} = %{version}-%{release} +Requires: %{?scl_prefix}libgfortran%{gcc_ver} = %{version}-%{release} %if %{build_libquadmath} -Requires: %{?scl_prefix}libquadmath = %{version}-%{release} -Requires: %{?scl_prefix}libquadmath-devel = %{version}-%{release} +Requires: %{?scl_prefix}libquadmath%{gcc_ver} = %{version}-%{release} +Requires: %{?scl_prefix}libquadmath%{gcc_ver}-devel = %{version}-%{release} %endif -Provides: %{?scl_prefix}gcc-fortran = %{version}-%{release} -Provides: %{?scl_prefix}gfortran = %{version}-%{release} +Provides: %{?scl_prefix}gcc%{gcc_ver}-fortran = %{version}-%{release} +Provides: %{?scl_prefix}gfortran%{gcc_ver} = %{version}-%{release} Autoreq: true %description gfortran The gcc-gfortran package provides support for compiling Fortran programs with the GNU Compiler Collection. -%package -n %{?scl_prefix}libgfortran +%package -n %{?scl_prefix}libgfortran%{gcc_ver} Summary: Fortran runtime Autoreq: true %if %{build_libquadmath} -Requires: %{?scl_prefix}libquadmath = %{version}-%{release} +Requires: %{?scl_prefix}libquadmath%{gcc_ver} = %{version}-%{release} %endif -%description -n %{?scl_prefix}libgfortran +%description -n %{?scl_prefix}libgfortran%{gcc_ver} This package contains Fortran shared library which is needed to run Fortran dynamically linked programs. -%package -n %{?scl_prefix}libgfortran-static +%package -n %{?scl_prefix}libgfortran%{gcc_ver}-static Summary: Static Fortran libraries -Requires: %{?scl_prefix}libgfortran = %{version}-%{release} -Requires: %{?scl_prefix}gcc = %{version}-%{release} +Requires: %{?scl_prefix}libgfortran%{gcc_ver} = %{version}-%{release} +Requires: %{?scl_prefix}gcc%{gcc_ver} = %{version}-%{release} %if %{build_libquadmath} -Requires: %{?scl_prefix}libquadmath-static = %{version}-%{release} +Requires: %{?scl_prefix}libquadmath%{gcc_ver}-static = %{version}-%{release} %endif -%description -n %{?scl_prefix}libgfortran-static +%description -n %{?scl_prefix}libgfortran%{gcc_ver}-static This package contains static Fortran libraries. %package gdc Summary: D support -Requires: %{?scl_prefix}gcc = %{version}-%{release} -Requires: %{?scl_prefix}libgphobos = %{version}-%{release} -Provides: %{?scl_prefix}gcc-d = %{version}-%{release} -Provides: %{?scl_prefix}gdc = %{version}-%{release} +Requires: %{?scl_prefix}gcc%{gcc_ver} = %{version}-%{release} +Requires: %{?scl_prefix}libgphobos%{gcc_ver} = %{version}-%{release} +Provides: %{?scl_prefix}gcc%{gcc_ver}-d = %{version}-%{release} +Provides: %{?scl_prefix}gdc%{gcc_ver} = %{version}-%{release} Autoreq: true %description gdc The gcc-gdc package provides support for compiling D programs with the GNU Compiler Collection. -%package -n %{?scl_prefix}libgphobos +%package -n %{?scl_prefix}libgphobos%{gcc_ver} Summary: D runtime Autoreq: true -%description -n %{?scl_prefix}libgphobos +%description -n %{?scl_prefix}libgphobos%{gcc_ver} This package contains D shared library which is needed to run D dynamically linked programs. -%package -n %{?scl_prefix}libgphobos-static +%package -n %{?scl_prefix}libgphobos%{gcc_ver}-static Summary: Static D libraries -Requires: %{?scl_prefix}libgphobos = %{version}-%{release} -Requires: %{?scl_prefix}gcc-gdc = %{version}-%{release} +Requires: %{?scl_prefix}libgphobos%{gcc_ver} = %{version}-%{release} +Requires: %{?scl_prefix}gcc%{gcc_ver}-gdc = %{version}-%{release} -%description -n %{?scl_prefix}libgphobos-static +%description -n %{?scl_prefix}libgphobos%{gcc_ver}-static This package contains static D libraries. -%package -n %{?scl_prefix}libgomp +%package -n %{?scl_prefix}libgomp%{gcc_ver} Summary: GCC OpenMP v4.5 shared support library -%description -n %{?scl_prefix}libgomp +%description -n %{?scl_prefix}libgomp%{gcc_ver} This package contains GCC shared support library which is needed for OpenMP v4.5 support. %package gdb-plugin Summary: GCC plugin for GDB -Requires: %{?scl_prefix}gcc = %{version}-%{release} +Requires: %{?scl_prefix}gcc%{gcc_ver} = %{version}-%{release} %description gdb-plugin This package contains GCC plugin for GDB C expression evaluation. -%package -n %{?scl_prefix}libgccjit +%package -n %{?scl_prefix}libgccjit%{gcc_ver} Summary: Library for embedding GCC inside programs and libraries -Requires: %{?scl_prefix}gcc = %{version}-%{release} +Requires: %{?scl_prefix}gcc%{gcc_ver} = %{version}-%{release} -%description -n %{?scl_prefix}libgccjit +%description -n %{?scl_prefix}libgccjit%{gcc_ver} This package contains shared library with GCC JIT front-end. -%package -n %{?scl_prefix}libgccjit-devel +%package -n %{?scl_prefix}libgccjit%{gcc_ver}-devel Summary: Support for embedding GCC inside programs and libraries BuildRequires: python3-sphinx -Requires: %{?scl_prefix}libgccjit = %{version}-%{release} +Requires: %{?scl_prefix}libgccjit%{gcc_ver} = %{version}-%{release} -%description -n %{?scl_prefix}libgccjit-devel +%description -n %{?scl_prefix}libgccjit%{gcc_ver}-devel This package contains header files and documentation for GCC JIT front-end. -%package -n %{?scl_prefix}libquadmath +%package -n %{?scl_prefix}libquadmath%{gcc_ver} Summary: GCC __float128 shared support library -%description -n %{?scl_prefix}libquadmath +%description -n %{?scl_prefix}libquadmath%{gcc_ver} This package contains GCC shared support library which is needed for __float128 math support and for Fortran REAL*16 support. -%package -n %{?scl_prefix}libquadmath-devel +%package -n %{?scl_prefix}libquadmath%{gcc_ver}-devel Summary: GCC __float128 support -Requires: %{?scl_prefix}libquadmath = %{version}-%{release} -Requires: %{?scl_prefix}gcc = %{version}-%{release} +Requires: %{?scl_prefix}libquadmath%{gcc_ver} = %{version}-%{release} +Requires: %{?scl_prefix}gcc%{gcc_ver} = %{version}-%{release} -%description -n %{?scl_prefix}libquadmath-devel +%description -n %{?scl_prefix}libquadmath%{gcc_ver}-devel This package contains headers for building Fortran programs using REAL*16 and programs using __float128 math. -%package -n %{?scl_prefix}libquadmath-static +%package -n %{?scl_prefix}libquadmath%{gcc_ver}-static Summary: Static libraries for __float128 support -Requires: %{?scl_prefix}libquadmath-devel = %{version}-%{release} +Requires: %{?scl_prefix}libquadmath%{gcc_ver}-devel = %{version}-%{release} -%description -n %{?scl_prefix}libquadmath-static +%description -n %{?scl_prefix}libquadmath%{gcc_ver}-static This package contains static libraries for building Fortran programs using REAL*16 and programs using __float128 math. -%package -n %{?scl_prefix}libitm +%package -n %{?scl_prefix}libitm%{gcc_ver} Summary: The GNU Transactional Memory library -%description -n %{?scl_prefix}libitm +%description -n %{?scl_prefix}libitm%{gcc_ver} This package contains the GNU Transactional Memory library which is a GCC transactional memory support runtime library. -%package -n %{?scl_prefix}libitm-devel +%package -n %{?scl_prefix}libitm%{gcc_ver}-devel Summary: The GNU Transactional Memory support -Requires: %{?scl_prefix}libitm = %{version}-%{release} -Requires: %{?scl_prefix}gcc = %{version}-%{release} +Requires: %{?scl_prefix}libitm%{gcc_ver} = %{version}-%{release} +Requires: %{?scl_prefix}gcc%{gcc_ver} = %{version}-%{release} -%description -n %{?scl_prefix}libitm-devel +%description -n %{?scl_prefix}libitm%{gcc_ver}-devel This package contains headers and support files for the GNU Transactional Memory library. -%package -n %{?scl_prefix}libitm-static +%package -n %{?scl_prefix}libitm%{gcc_ver}-static Summary: The GNU Transactional Memory static library -Requires: %{?scl_prefix}libitm-devel = %{version}-%{release} +Requires: %{?scl_prefix}libitm%{gcc_ver}-devel = %{version}-%{release} -%description -n %{?scl_prefix}libitm-static +%description -n %{?scl_prefix}libitm%{gcc_ver}-static This package contains GNU Transactional Memory static libraries. -%package -n %{?scl_prefix}libatomic +%package -n %{?scl_prefix}libatomic%{gcc_ver} Summary: The GNU Atomic library -%description -n %{?scl_prefix}libatomic +%description -n %{?scl_prefix}libatomic%{gcc_ver} This package contains the GNU Atomic library which is a GCC support runtime library for atomic operations not supported by hardware. -%package -n %{?scl_prefix}libatomic-static +%package -n %{?scl_prefix}libatomic%{gcc_ver}-static Summary: The GNU Atomic static library -Requires: %{?scl_prefix}libatomic = %{version}-%{release} +Requires: %{?scl_prefix}libatomic%{gcc_ver} = %{version}-%{release} -%description -n %{?scl_prefix}libatomic-static +%description -n %{?scl_prefix}libatomic%{gcc_ver}-static This package contains GNU Atomic static libraries. -%package -n %{?scl_prefix}libasan +%package -n %{?scl_prefix}libasan%{gcc_ver} Summary: The Address Sanitizer runtime library -%description -n %{?scl_prefix}libasan +%description -n %{?scl_prefix}libasan%{gcc_ver} This package contains the Address Sanitizer library which is used for -fsanitize=address instrumented programs. -%package -n %{?scl_prefix}libasan-static +%package -n %{?scl_prefix}libasan%{gcc_ver}-static Summary: The Address Sanitizer static library -Requires: %{?scl_prefix}libasan = %{version}-%{release} +Requires: %{?scl_prefix}libasan%{gcc_ver} = %{version}-%{release} -%description -n %{?scl_prefix}libasan-static +%description -n %{?scl_prefix}libasan%{gcc_ver}-static This package contains Address Sanitizer static runtime library. -%package -n %{?scl_prefix}libtsan +%package -n %{?scl_prefix}libtsan%{gcc_ver} Summary: The Thread Sanitizer runtime library -%description -n %{?scl_prefix}libtsan +%description -n %{?scl_prefix}libtsan%{gcc_ver} This package contains the Thread Sanitizer library which is used for -fsanitize=thread instrumented programs. -%package -n %{?scl_prefix}libtsan-static +%package -n %{?scl_prefix}libtsan%{gcc_ver}-static Summary: The Thread Sanitizer static library -Requires: %{?scl_prefix}libtsan = %{version}-%{release} +Requires: %{?scl_prefix}libtsan%{gcc_ver} = %{version}-%{release} -%description -n %{?scl_prefix}libtsan-static +%description -n %{?scl_prefix}libtsan%{gcc_ver}-static This package contains Thread Sanitizer static runtime library. -%package -n %{?scl_prefix}libubsan +%package -n %{?scl_prefix}libubsan%{gcc_ver} Summary: The Undefined Behavior Sanitizer runtime library -%description -n %{?scl_prefix}libubsan +%description -n %{?scl_prefix}libubsan%{gcc_ver} This package contains the Undefined Behavior Sanitizer library which is used for -fsanitize=undefined instrumented programs. -%package -n %{?scl_prefix}libubsan-static +%package -n %{?scl_prefix}libubsan%{gcc_ver}-static Summary: The Undefined Behavior Sanitizer static library -Requires: %{?scl_prefix}libubsan = %{version}-%{release} +Requires: %{?scl_prefix}libubsan%{gcc_ver} = %{version}-%{release} -%description -n %{?scl_prefix}libubsan-static +%description -n %{?scl_prefix}libubsan%{gcc_ver}-static This package contains Undefined Behavior Sanitizer static runtime library. -%package -n %{?scl_prefix}liblsan +%package -n %{?scl_prefix}liblsan%{gcc_ver} Summary: The Leak Sanitizer runtime library -%description -n %{?scl_prefix}liblsan +%description -n %{?scl_prefix}liblsan%{gcc_ver} This package contains the Leak Sanitizer library which is used for -fsanitize=leak instrumented programs. -%package -n %{?scl_prefix}liblsan-static +%package -n %{?scl_prefix}liblsan%{gcc_ver}-static Summary: The Leak Sanitizer static library -Requires: %{?scl_prefix}liblsan = %{version}-%{release} +Requires: %{?scl_prefix}liblsan%{gcc_ver} = %{version}-%{release} -%description -n %{?scl_prefix}liblsan-static +%description -n %{?scl_prefix}liblsan%{gcc_ver}-static This package contains Leak Sanitizer static runtime library. -%package -n %{?scl_prefix}cpp +%package -n %{?scl_prefix}cpp%{gcc_ver} Summary: The C Preprocessor Requires: filesystem >= 3 Autoreq: true -%description -n %{?scl_prefix}cpp +%description -n %{?scl_prefix}cpp%{gcc_ver} Cpp is the GNU C-Compatible Compiler Preprocessor. Cpp is a macro processor which is used automatically by the C compiler to transform your program before actual @@ -506,37 +507,37 @@ macros. %package gnat Summary: Ada 83, 95, 2005 and 2012 support for GCC -Requires: %{?scl_prefix}gcc = %{version}-%{release} -Requires: %{?scl_prefix}libgnat = %{version}-%{release} -Requires: %{?scl_prefix}libgnat-devel = %{version}-%{release} +Requires: %{?scl_prefix}gcc%{gcc_ver} = %{version}-%{release} +Requires: %{?scl_prefix}libgnat%{gcc_ver} = %{version}-%{release} +Requires: %{?scl_prefix}libgnat%{gcc_ver}-devel = %{version}-%{release} Autoreq: true %description gnat GNAT is a GNU Ada 83, 95, 2005 and 2012 front-end to GCC. This package includes development tools, the documents and Ada compiler. -%package -n %{?scl_prefix}libgnat +%package -n %{?scl_prefix}libgnat%{gcc_ver} Summary: GNU Ada 83, 95, 2005 and 2012 runtime shared libraries Autoreq: true -%description -n %{?scl_prefix}libgnat +%description -n %{?scl_prefix}libgnat%{gcc_ver} GNAT is a GNU Ada 83, 95, 2005 and 2012 front-end to GCC. This package includes shared libraries, which are required to run programs compiled with the GNAT. -%package -n %{?scl_prefix}libgnat-devel +%package -n %{?scl_prefix}libgnat%{gcc_ver}-devel Summary: GNU Ada 83, 95, 2005 and 2012 libraries Autoreq: true -%description -n %{?scl_prefix}libgnat-devel +%description -n %{?scl_prefix}libgnat%{gcc_ver}-devel GNAT is a GNU Ada 83, 95, 2005 and 2012 front-end to GCC. This package includes libraries, which are required to compile with the GNAT. -%package -n %{?scl_prefix}libgnat-static +%package -n %{?scl_prefix}libgnat%{gcc_ver}-static Summary: GNU Ada 83, 95, 2005 and 2012 static libraries -Requires: %{?scl_prefix}libgnat-devel = %{version}-%{release} +Requires: %{?scl_prefix}libgnat-devel%{gcc_ver} = %{version}-%{release} Autoreq: true -%description -n %{?scl_prefix}libgnat-static +%description -n %{?scl_prefix}libgnat%{gcc_ver}-static GNAT is a GNU Ada 83, 95, 2005 and 2012 front-end to GCC. This package includes static libraries. @@ -581,7 +582,7 @@ This package contains static Go libraries. %package plugin-devel Summary: Support for compiling GCC plugins -Requires: %{?scl_prefix}gcc = %{version}-%{release} +Requires: %{?scl_prefix}gcc%{gcc_ver} = %{version}-%{release} Requires: gmp-devel >= 4.1.2-8, mpfr-devel >= 3.1.0, libmpc-devel >= 0.8.1 %description plugin-devel @@ -696,6 +697,9 @@ CONFIGURE_OPTS="\ %endif %ifnarch sparc sparcv9 ppc --build=%{gcc_target_platform} \ +%endif +%if 0%{?scl:1} + --program-suffix=%{binsuffix} %endif " @@ -847,13 +851,13 @@ FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major} # fix some things -ln -sf gcc %{buildroot}%{_prefix}/bin/cc +ln -sf gcc%{binsuffix} %{buildroot}%{_prefix}/bin/cc rm -f %{buildroot}%{_prefix}/lib/cpp -ln -sf ../bin/cpp %{buildroot}/%{_prefix}/lib/cpp -ln -sf gfortran %{buildroot}%{_prefix}/bin/f95 +ln -sf ../bin/cpp%{binsuffix} %{buildroot}/%{_prefix}/lib/cpp +ln -sf gfortran%{binsuffix} %{buildroot}%{_prefix}/bin/f95 rm -f %{buildroot}%{_infodir}/dir gzip -9 %{buildroot}%{_infodir}/*.info* -ln -sf gcc %{buildroot}%{_prefix}/bin/gnatgcc +ln -sf gcc%{binsuffix} %{buildroot}%{_prefix}/bin/gnatgcc mkdir -p %{buildroot}%{_fmoddir} %if %{build_go} @@ -1584,18 +1588,18 @@ cd obj-%{gcc_target_platform} %post go %{_sbindir}/update-alternatives --install \ - %{_prefix}/bin/go go %{_prefix}/bin/go.gcc 92 \ + %{_prefix}/bin/go go %{_prefix}/bin/go%{binsuffix}.gcc 92 \ --slave %{_prefix}/bin/gofmt gofmt %{_prefix}/bin/gofmt.gcc %preun go if [ $1 = 0 ]; then - %{_sbindir}/update-alternatives --remove go %{_prefix}/bin/go.gcc + %{_sbindir}/update-alternatives --remove go %{_prefix}/bin/go%{binsuffix}.gcc fi # Because glibc Prereq's libgcc and /sbin/ldconfig # comes from glibc, it might not exist yet when # libgcc is installed -%post -n %{?scl_prefix}libgcc -p +%post -n %{?scl_prefix}libgcc%{gcc_ver} -p if posix.access ("/sbin/ldconfig", "x") then local pid = posix.fork () if pid == 0 then @@ -1605,7 +1609,7 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%postun -n %{?scl_prefix}libgcc -p +%postun -n %{?scl_prefix}libgcc%{gcc_ver} -p if posix.access ("/sbin/ldconfig", "x") then local pid = posix.fork () if pid == 0 then @@ -1615,66 +1619,65 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%ldconfig_scriptlets -n %{?scl_prefix}libstdc++ +%ldconfig_scriptlets -n %{?scl_prefix}libstdc++%{gcc_ver} -%ldconfig_scriptlets -n %{?scl_prefix}libobjc +%ldconfig_scriptlets -n %{?scl_prefix}libobjc%{gcc_ver} -%ldconfig_scriptlets -n %{?scl_prefix}libgfortran +%ldconfig_scriptlets -n %{?scl_prefix}libgfortran%{gcc_ver} -%ldconfig_scriptlets -n %{?scl_prefix}libgphobos +%ldconfig_scriptlets -n %{?scl_prefix}libgphobos%{gcc_ver} -%ldconfig_scriptlets -n %{?scl_prefix}libgnat +%ldconfig_scriptlets -n %{?scl_prefix}libgnat%{gcc_ver} -%ldconfig_scriptlets -n %{?scl_prefix}libgomp +%ldconfig_scriptlets -n %{?scl_prefix}libgomp%{gcc_ver} %ldconfig_scriptlets gdb-plugin -%ldconfig_scriptlets -n %{?scl_prefix}libgccjit +%ldconfig_scriptlets -n %{?scl_prefix}libgccjit%{gcc_ver} -%ldconfig_scriptlets -n %{?scl_prefix}libquadmath +%ldconfig_scriptlets -n %{?scl_prefix}libquadmath%{gcc_ver} -%ldconfig_scriptlets -n %{?scl_prefix}libitm +%ldconfig_scriptlets -n %{?scl_prefix}libitm%{gcc_ver} -%ldconfig_scriptlets -n %{?scl_prefix}libatomic +%ldconfig_scriptlets -n %{?scl_prefix}libatomic%{gcc_ver} -%ldconfig_scriptlets -n %{?scl_prefix}libasan +%ldconfig_scriptlets -n %{?scl_prefix}libasan%{gcc_ver} -%ldconfig_scriptlets -n %{?scl_prefix}libubsan +%ldconfig_scriptlets -n %{?scl_prefix}libubsan%{gcc_ver} -%ldconfig_scriptlets -n %{?scl_prefix}libtsan +%ldconfig_scriptlets -n %{?scl_prefix}libtsan%{gcc_ver} -%ldconfig_scriptlets -n %{?scl_prefix}liblsan +%ldconfig_scriptlets -n %{?scl_prefix}liblsan%{gcc_ver} -%ldconfig_scriptlets -n %{?scl_prefix}libgo +%ldconfig_scriptlets -n %{?scl_prefix}libgo%{gcc_ver} %files %{_prefix}/bin/cc %{_prefix}/bin/c89 %{_prefix}/bin/c99 -%{_prefix}/bin/gcc -%{_prefix}/bin/gcov -%{_prefix}/bin/gcov-tool -%{_prefix}/bin/gcov-dump -%{_prefix}/bin/gcc-ar -%{_prefix}/bin/gcc-nm -%{_prefix}/bin/gcc-ranlib -%{_prefix}/bin/lto-dump +%{_prefix}/bin/gcc%{binsuffix} +%{_prefix}/bin/gcov%{binsuffix} +%{_prefix}/bin/gcov-tool%{binsuffix} +%{_prefix}/bin/gcov-dump%{binsuffix} +%{_prefix}/bin/gcc-ar%{binsuffix} +%{_prefix}/bin/gcc-nm%{binsuffix} +%{_prefix}/bin/gcc-ranlib%{binsuffix} +%{_prefix}/bin/lto-dump%{binsuffix} %ifarch ppc -%{_prefix}/bin/%{_target_platform}-gcc +%{_prefix}/bin/%{_target_platform}-gcc%{binsuffix} %endif %ifarch sparc64 sparcv9 -%{_prefix}/bin/sparc-%{_vendor}-%{_target_os}-gcc +%{_prefix}/bin/sparc-%{_vendor}-%{_target_os}-gcc%{binsuffix} %endif %ifarch ppc64 ppc64p7 -%{_prefix}/bin/ppc-%{_vendor}-%{_target_os}-gcc -%endif -%{_prefix}/bin/%{gcc_target_platform}-gcc -%{_prefix}/bin/%{gcc_target_platform}-gcc-%{gcc_major} -%{_mandir}/man1/gcc.1* -%{_mandir}/man1/gcov.1* -%{_mandir}/man1/gcov-tool.1* -%{_mandir}/man1/gcov-dump.1* -%{_mandir}/man1/lto-dump.1* +%{_prefix}/bin/ppc-%{_vendor}-%{_target_os}-gcc%{binsuffix} +%endif +%{_prefix}/bin/%{gcc_target_platform}-gcc* +%{_mandir}/man1/gcc%{binsuffix}.1* +%{_mandir}/man1/gcov%{binsuffix}.1* +%{_mandir}/man1/gcov-tool%{binsuffix}.1* +%{_mandir}/man1/gcov-dump%{binsuffix}.1* +%{_mandir}/man1/lto-dump%{binsuffix}.1* %{_infodir}/gcc* %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} @@ -1973,27 +1976,27 @@ end %{!?_licensedir:%global license %%doc} %license gcc/COPYING* COPYING.RUNTIME -%files -n %{?scl_prefix}cpp +%files -n %{?scl_prefix}cpp%{gcc_ver} %{_prefix}/lib/cpp -%{_prefix}/bin/cpp -%{_mandir}/man1/cpp.1* +%{_prefix}/bin/cpp%{binsuffix} +%{_mandir}/man1/cpp%{binsuffix}.1* %{_infodir}/cpp* %dir %{_prefix}/libexec/gcc %dir %{_prefix}/libexec/gcc/%{gcc_target_platform} %dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major} %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cc1 -%files -n %{?scl_prefix}libgcc +%files -n %{?scl_prefix}libgcc%{gcc_ver} %{_prefix}/%{_lib}/libgcc_s-%{gcc_major}.so.1 %{_prefix}/%{_lib}/libgcc_s.so.1 %{!?_licensedir:%global license %%doc} %license gcc/COPYING* COPYING.RUNTIME %files c++ -%{_prefix}/bin/%{gcc_target_platform}-*++ -%{_prefix}/bin/g++ -%{_prefix}/bin/c++ -%{_mandir}/man1/g++.1* +%{_prefix}/bin/%{gcc_target_platform}-*++%{binsuffix} +%{_prefix}/bin/g++%{binsuffix} +%{_prefix}/bin/c++%{binsuffix} +%{_mandir}/man1/g++%{binsuffix}.1* %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} @@ -2029,7 +2032,7 @@ end %endif %doc rpm.doc/changelogs/gcc/cp/ChangeLog* -%files -n %{?scl_prefix}libstdc++ +%files -n %{?scl_prefix}libstdc++%{gcc_ver} %{_prefix}/%{_lib}/libstdc++.so.6* %dir %{_datadir}/gdb %dir %{_datadir}/gdb/auto-load @@ -2045,7 +2048,7 @@ end %dir %{_prefix}/share/gcc-%{gcc_major}/python %{_prefix}/share/gcc-%{gcc_major}/python/libstdcxx -%files -n %{?scl_prefix}libstdc++-devel +%files -n %{?scl_prefix}libstdc++%{gcc_ver}-devel %dir %{_prefix}/include/c++ %{_prefix}/include/c++/%{gcc_major} %dir %{_prefix}/lib/gcc @@ -2070,7 +2073,7 @@ end %endif %doc rpm.doc/changelogs/libstdc++-v3/ChangeLog* libstdc++-v3/README* -%files -n %{?scl_prefix}libstdc++-static +%files -n %{?scl_prefix}libstdc++%{gcc_ver}-static %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} @@ -2121,14 +2124,14 @@ end %dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major} %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cc1objplus -%files -n %{?scl_prefix}libobjc +%files -n %{?scl_prefix}libobjc%{gcc_ver} %{_prefix}/%{_lib}/libobjc.so.4* %endif %files gfortran -%{_prefix}/bin/gfortran +%{_prefix}/bin/gfortran%{binsuffix} %{_prefix}/bin/f95 -%{_mandir}/man1/gfortran.1* +%{_mandir}/man1/gfortran%{binsuffix}.1* %{_infodir}/gfortran* %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} @@ -2174,10 +2177,10 @@ end %dir %{_fmoddir} %doc rpm.doc/gfortran/* -%files -n %{?scl_prefix}libgfortran +%files -n %{?scl_prefix}libgfortran%{gcc_ver} %{_prefix}/%{_lib}/libgfortran.so.5* -%files -n %{?scl_prefix}libgfortran-static +%files -n %{?scl_prefix}libgfortran%{gcc_ver}-static %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} @@ -2230,12 +2233,12 @@ end %endif %doc rpm.doc/gdc/* -%files -n %{?scl_prefix}libgphobos +%files -n %{?scl_prefix}libgphobos%{gcc_ver} %{_prefix}/%{_lib}/libgdruntime.so.3* %{_prefix}/%{_lib}/libgphobos.so.3* %doc rpm.doc/libphobos/* -%files -n %{?scl_prefix}libgphobos-static +%files -n %{?scl_prefix}libgphobos%{gcc_ver}-static %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} @@ -2286,11 +2289,11 @@ end %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/gnat1 %doc rpm.doc/changelogs/gcc/ada/ChangeLog* -%files -n %{?scl_prefix}libgnat +%files -n %{?scl_prefix}libgnat%{gcc_ver} %{_prefix}/%{_lib}/libgnat-*.so %{_prefix}/%{_lib}/libgnarl-*.so -%files -n %{?scl_prefix}libgnat-devel +%files -n %{?scl_prefix}libgnat%{gcc_ver}-devel %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} @@ -2315,7 +2318,7 @@ end %exclude %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/adalib/libgnarl.a %endif -%files -n %{?scl_prefix}libgnat-static +%files -n %{?scl_prefix}libgnat%{gcc_ver}-static %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} @@ -2338,19 +2341,19 @@ end %endif %endif -%files -n %{?scl_prefix}libgomp +%files -n %{?scl_prefix}libgomp%{gcc_ver} %{_prefix}/%{_lib}/libgomp.so.1* %{_infodir}/libgomp.info* %doc rpm.doc/changelogs/libgomp/ChangeLog* %if %{build_libquadmath} -%files -n %{?scl_prefix}libquadmath +%files -n %{?scl_prefix}libquadmath%{gcc_ver} %{_prefix}/%{_lib}/libquadmath.so.0* %{_infodir}/libquadmath.info* %{!?_licensedir:%global license %%doc} %license rpm.doc/libquadmath/COPYING* -%files -n %{?scl_prefix}libquadmath-devel +%files -n %{?scl_prefix}libquadmath%{gcc_ver}-devel %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} @@ -2362,7 +2365,7 @@ end %endif %doc rpm.doc/libquadmath/ChangeLog* -%files -n %{?scl_prefix}libquadmath-static +%files -n %{?scl_prefix}libquadmath%{gcc_ver}-static %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} @@ -2380,11 +2383,11 @@ end %endif %if %{build_libitm} -%files -n %{?scl_prefix}libitm +%files -n %{?scl_prefix}libitm%{gcc_ver} %{_prefix}/%{_lib}/libitm.so.1* %{_infodir}/libitm.info* -%files -n %{?scl_prefix}libitm-devel +%files -n %{?scl_prefix}libitm%{gcc_ver}-devel %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} @@ -2396,7 +2399,7 @@ end %endif %doc rpm.doc/libitm/ChangeLog* -%files -n %{?scl_prefix}libitm-static +%files -n %{?scl_prefix}libitm%{gcc_ver}-static %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} @@ -2414,7 +2417,7 @@ end %endif %if %{build_libatomic} -%files -n %{?scl_prefix}libatomic +%files -n %{?scl_prefix}libatomic%{gcc_ver} %{_prefix}/%{_lib}/libatomic.so.1* %ifarch sparcv9 ppc %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libatomic.so @@ -2424,7 +2427,7 @@ end %endif %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic.so -%files -n %{?scl_prefix}libatomic-static +%files -n %{?scl_prefix}libatomic%{gcc_ver}-static %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} @@ -2443,10 +2446,10 @@ end %endif %if %{build_libasan} -%files -n %{?scl_prefix}libasan +%files -n %{?scl_prefix}libasan%{gcc_ver} %{_prefix}/%{_lib}/libasan.so.8* -%files -n %{?scl_prefix}libasan-static +%files -n %{?scl_prefix}libasan%{gcc_ver}-static %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} @@ -2467,7 +2470,7 @@ end %endif %if %{build_libubsan} -%files -n %{?scl_prefix}libubsan +%files -n %{?scl_prefix}libubsan%{gcc_ver} %{_prefix}/%{_lib}/libubsan.so.1* %ifarch sparcv9 ppc %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libubsan.so @@ -2477,7 +2480,7 @@ end %endif %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libubsan.so -%files -n %{?scl_prefix}libubsan-static +%files -n %{?scl_prefix}libubsan%{gcc_ver}-static %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} @@ -2498,10 +2501,10 @@ end %endif %if %{build_libtsan} -%files -n %{?scl_prefix}libtsan +%files -n %{?scl_prefix}libtsan%{gcc_ver} %{_prefix}/%{_lib}/libtsan.so.2* -%files -n %{?scl_prefix}libtsan-static +%files -n %{?scl_prefix}libtsan%{gcc_ver}-static %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} @@ -2512,10 +2515,10 @@ end %endif %if %{build_liblsan} -%files -n %{?scl_prefix}liblsan +%files -n %{?scl_prefix}liblsan%{gcc_ver} %{_prefix}/%{_lib}/liblsan.so.0* -%files -n %{?scl_prefix}liblsan-static +%files -n %{?scl_prefix}liblsan%{gcc_ver}-static %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} @@ -2621,11 +2624,11 @@ end %endif %endif -%files -n %{?scl_prefix}libgccjit +%files -n %{?scl_prefix}libgccjit%{gcc_ver} %{_prefix}/%{_lib}/libgccjit.so.* %doc rpm.doc/changelogs/gcc/jit/ChangeLog* -%files -n %{?scl_prefix}libgccjit-devel +%files -n %{?scl_prefix}libgccjit%{gcc_ver}-devel %{_prefix}/%{_lib}/libgccjit.so %{_prefix}/include/libgccjit*.h %{_infodir}/libgccjit.info* @@ -2655,6 +2658,12 @@ end %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Fri Nov 18 2022 Chenxi Mao 12.2.1-11 +- Support --program-suffix configuration + +* Thu Nov 17 2022 Chenxi Mao 12.2.1-10 +- Customized package name + * Mon Nov 14 2022 Chenxi Mao 12.2.1-9 - Fix invalid link file issue