From 26fd6236c368ccade3812e851c4e7e98745e3e6f Mon Sep 17 00:00:00 2001 From: Matti Viljanen Date: Sat, 30 Nov 2024 11:25:45 +0200 Subject: [PATCH 1/8] Clear some rpmbuild warnings --- rpm/cross-aarch64-gcc.spec | 33 +++++++++++++++++++-------------- rpm/cross-armv7hl-gcc.spec | 33 +++++++++++++++++++-------------- rpm/cross-i486-gcc.spec | 33 +++++++++++++++++++-------------- rpm/cross-x86_64-gcc.spec | 33 +++++++++++++++++++-------------- rpm/gcc.spec | 33 +++++++++++++++++++-------------- 5 files changed, 95 insertions(+), 70 deletions(-) diff --git a/rpm/cross-aarch64-gcc.spec b/rpm/cross-aarch64-gcc.spec index 39974bb..cea7ec1 100644 --- a/rpm/cross-aarch64-gcc.spec +++ b/rpm/cross-aarch64-gcc.spec @@ -246,14 +246,15 @@ Requires: %{name} = %{version}-%{release} %description doc Man and info pages for %{name}. -%endif # !crossbuild +# !crossbuild +%endif %package -n libgcc Summary: GCC version 13.3 shared support library Obsoletes: libgcc < %{version}-%{release} Autoreq: true %if "%{version}" != "%{gcc_version}" -Provides: libgcc = %{gcc_provides} +Provides: libgcc = %{gcc_version} %endif %description -n libgcc @@ -313,7 +314,8 @@ Autoreq: true %description -n libstdc++-doc Manual, doxygen generated API information and Frequently Asked Questions for the GNU standard C++ library. -%endif # !crossbuild +# !crossbuild +%endif %package -n libgomp Summary: GCC OpenMP v4.5 shared support library @@ -1279,7 +1281,8 @@ set +x #install -m0644 -t %{buildroot}%{_docdir}/libquadmath-%{version} \ # rpm.doc/libquadmath/ChangeLog* #%endif -%endif # !crossbuild +# !crossbuild +%endif %if !%{crossbuild} # checking and split packaging for native ... @@ -1386,11 +1389,11 @@ end %{_prefix}/bin/gcc-nm %{_prefix}/bin/gcc-ranlib %{_prefix}/bin/lto-dump -#%ifnarch %{arm} aarch64 mipsel -#%{_prefix}/bin/%{gcc_target_platform}-gcc -#%{_prefix}/bin/%{gcc_target_platform}-gcc-ar -#%{_prefix}/bin/%{gcc_target_platform}-gcc-nm -#%{_prefix}/bin/%{gcc_target_platform}-gcc-ranlib +#%ifnarch %%{arm} aarch64 mipsel +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ar +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-nm +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ranlib #%endif %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1401,8 +1404,8 @@ end %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/* -#%if !%{crossbuild} +#%%{_prefix}/libexec/gcc/%%{gcc_target_platform}/%%{gcc_version}/* +#%if !%%{crossbuild} %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.so* @@ -1415,7 +1418,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include/* # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/* +#%%{_prefix}/%%{_lib}/gcc/%%{gcc_target_platform}/%%{gcc_version}/include/* %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/rpmver %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stddef.h %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdarg.h @@ -1709,7 +1712,8 @@ end %{_mandir}/man1/g++.1* %{_mandir}/man1/lto-dump.1* %{_mandir}/man7/* -%endif # !crossbuild +# !crossbuild +%endif %files -n cpp -f cpplib.lang %defattr(-,root,root,-) @@ -1799,7 +1803,8 @@ end %{_mandir}/man3/* %{_docdir}/libstdc++-%{version} %endif -%endif # !crossbuild +# !crossbuild +%endif %files -n libgomp %defattr(-,root,root,-) diff --git a/rpm/cross-armv7hl-gcc.spec b/rpm/cross-armv7hl-gcc.spec index 1fe659d..0465361 100644 --- a/rpm/cross-armv7hl-gcc.spec +++ b/rpm/cross-armv7hl-gcc.spec @@ -246,14 +246,15 @@ Requires: %{name} = %{version}-%{release} %description doc Man and info pages for %{name}. -%endif # !crossbuild +# !crossbuild +%endif %package -n libgcc Summary: GCC version 13.3 shared support library Obsoletes: libgcc < %{version}-%{release} Autoreq: true %if "%{version}" != "%{gcc_version}" -Provides: libgcc = %{gcc_provides} +Provides: libgcc = %{gcc_version} %endif %description -n libgcc @@ -313,7 +314,8 @@ Autoreq: true %description -n libstdc++-doc Manual, doxygen generated API information and Frequently Asked Questions for the GNU standard C++ library. -%endif # !crossbuild +# !crossbuild +%endif %package -n libgomp Summary: GCC OpenMP v4.5 shared support library @@ -1279,7 +1281,8 @@ set +x #install -m0644 -t %{buildroot}%{_docdir}/libquadmath-%{version} \ # rpm.doc/libquadmath/ChangeLog* #%endif -%endif # !crossbuild +# !crossbuild +%endif %if !%{crossbuild} # checking and split packaging for native ... @@ -1386,11 +1389,11 @@ end %{_prefix}/bin/gcc-nm %{_prefix}/bin/gcc-ranlib %{_prefix}/bin/lto-dump -#%ifnarch %{arm} aarch64 mipsel -#%{_prefix}/bin/%{gcc_target_platform}-gcc -#%{_prefix}/bin/%{gcc_target_platform}-gcc-ar -#%{_prefix}/bin/%{gcc_target_platform}-gcc-nm -#%{_prefix}/bin/%{gcc_target_platform}-gcc-ranlib +#%ifnarch %%{arm} aarch64 mipsel +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ar +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-nm +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ranlib #%endif %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1401,8 +1404,8 @@ end %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/* -#%if !%{crossbuild} +#%%{_prefix}/libexec/gcc/%%{gcc_target_platform}/%%{gcc_version}/* +#%if !%%{crossbuild} %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.so* @@ -1415,7 +1418,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include/* # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/* +#%%{_prefix}/%%{_lib}/gcc/%%{gcc_target_platform}/%%{gcc_version}/include/* %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/rpmver %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stddef.h %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdarg.h @@ -1709,7 +1712,8 @@ end %{_mandir}/man1/g++.1* %{_mandir}/man1/lto-dump.1* %{_mandir}/man7/* -%endif # !crossbuild +# !crossbuild +%endif %files -n cpp -f cpplib.lang %defattr(-,root,root,-) @@ -1799,7 +1803,8 @@ end %{_mandir}/man3/* %{_docdir}/libstdc++-%{version} %endif -%endif # !crossbuild +# !crossbuild +%endif %files -n libgomp %defattr(-,root,root,-) diff --git a/rpm/cross-i486-gcc.spec b/rpm/cross-i486-gcc.spec index 80fb0e4..911ac0c 100644 --- a/rpm/cross-i486-gcc.spec +++ b/rpm/cross-i486-gcc.spec @@ -246,14 +246,15 @@ Requires: %{name} = %{version}-%{release} %description doc Man and info pages for %{name}. -%endif # !crossbuild +# !crossbuild +%endif %package -n libgcc Summary: GCC version 13.3 shared support library Obsoletes: libgcc < %{version}-%{release} Autoreq: true %if "%{version}" != "%{gcc_version}" -Provides: libgcc = %{gcc_provides} +Provides: libgcc = %{gcc_version} %endif %description -n libgcc @@ -313,7 +314,8 @@ Autoreq: true %description -n libstdc++-doc Manual, doxygen generated API information and Frequently Asked Questions for the GNU standard C++ library. -%endif # !crossbuild +# !crossbuild +%endif %package -n libgomp Summary: GCC OpenMP v4.5 shared support library @@ -1279,7 +1281,8 @@ set +x #install -m0644 -t %{buildroot}%{_docdir}/libquadmath-%{version} \ # rpm.doc/libquadmath/ChangeLog* #%endif -%endif # !crossbuild +# !crossbuild +%endif %if !%{crossbuild} # checking and split packaging for native ... @@ -1386,11 +1389,11 @@ end %{_prefix}/bin/gcc-nm %{_prefix}/bin/gcc-ranlib %{_prefix}/bin/lto-dump -#%ifnarch %{arm} aarch64 mipsel -#%{_prefix}/bin/%{gcc_target_platform}-gcc -#%{_prefix}/bin/%{gcc_target_platform}-gcc-ar -#%{_prefix}/bin/%{gcc_target_platform}-gcc-nm -#%{_prefix}/bin/%{gcc_target_platform}-gcc-ranlib +#%ifnarch %%{arm} aarch64 mipsel +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ar +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-nm +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ranlib #%endif %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1401,8 +1404,8 @@ end %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/* -#%if !%{crossbuild} +#%%{_prefix}/libexec/gcc/%%{gcc_target_platform}/%%{gcc_version}/* +#%if !%%{crossbuild} %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.so* @@ -1415,7 +1418,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include/* # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/* +#%%{_prefix}/%%{_lib}/gcc/%%{gcc_target_platform}/%%{gcc_version}/include/* %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/rpmver %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stddef.h %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdarg.h @@ -1709,7 +1712,8 @@ end %{_mandir}/man1/g++.1* %{_mandir}/man1/lto-dump.1* %{_mandir}/man7/* -%endif # !crossbuild +# !crossbuild +%endif %files -n cpp -f cpplib.lang %defattr(-,root,root,-) @@ -1799,7 +1803,8 @@ end %{_mandir}/man3/* %{_docdir}/libstdc++-%{version} %endif -%endif # !crossbuild +# !crossbuild +%endif %files -n libgomp %defattr(-,root,root,-) diff --git a/rpm/cross-x86_64-gcc.spec b/rpm/cross-x86_64-gcc.spec index 9ac763d..d6a112d 100644 --- a/rpm/cross-x86_64-gcc.spec +++ b/rpm/cross-x86_64-gcc.spec @@ -246,14 +246,15 @@ Requires: %{name} = %{version}-%{release} %description doc Man and info pages for %{name}. -%endif # !crossbuild +# !crossbuild +%endif %package -n libgcc Summary: GCC version 13.3 shared support library Obsoletes: libgcc < %{version}-%{release} Autoreq: true %if "%{version}" != "%{gcc_version}" -Provides: libgcc = %{gcc_provides} +Provides: libgcc = %{gcc_version} %endif %description -n libgcc @@ -313,7 +314,8 @@ Autoreq: true %description -n libstdc++-doc Manual, doxygen generated API information and Frequently Asked Questions for the GNU standard C++ library. -%endif # !crossbuild +# !crossbuild +%endif %package -n libgomp Summary: GCC OpenMP v4.5 shared support library @@ -1279,7 +1281,8 @@ set +x #install -m0644 -t %{buildroot}%{_docdir}/libquadmath-%{version} \ # rpm.doc/libquadmath/ChangeLog* #%endif -%endif # !crossbuild +# !crossbuild +%endif %if !%{crossbuild} # checking and split packaging for native ... @@ -1386,11 +1389,11 @@ end %{_prefix}/bin/gcc-nm %{_prefix}/bin/gcc-ranlib %{_prefix}/bin/lto-dump -#%ifnarch %{arm} aarch64 mipsel -#%{_prefix}/bin/%{gcc_target_platform}-gcc -#%{_prefix}/bin/%{gcc_target_platform}-gcc-ar -#%{_prefix}/bin/%{gcc_target_platform}-gcc-nm -#%{_prefix}/bin/%{gcc_target_platform}-gcc-ranlib +#%ifnarch %%{arm} aarch64 mipsel +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ar +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-nm +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ranlib #%endif %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1401,8 +1404,8 @@ end %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/* -#%if !%{crossbuild} +#%%{_prefix}/libexec/gcc/%%{gcc_target_platform}/%%{gcc_version}/* +#%if !%%{crossbuild} %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.so* @@ -1415,7 +1418,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include/* # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/* +#%%{_prefix}/%%{_lib}/gcc/%%{gcc_target_platform}/%%{gcc_version}/include/* %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/rpmver %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stddef.h %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdarg.h @@ -1709,7 +1712,8 @@ end %{_mandir}/man1/g++.1* %{_mandir}/man1/lto-dump.1* %{_mandir}/man7/* -%endif # !crossbuild +# !crossbuild +%endif %files -n cpp -f cpplib.lang %defattr(-,root,root,-) @@ -1799,7 +1803,8 @@ end %{_mandir}/man3/* %{_docdir}/libstdc++-%{version} %endif -%endif # !crossbuild +# !crossbuild +%endif %files -n libgomp %defattr(-,root,root,-) diff --git a/rpm/gcc.spec b/rpm/gcc.spec index 427d9a5..d9467b2 100644 --- a/rpm/gcc.spec +++ b/rpm/gcc.spec @@ -245,14 +245,15 @@ Requires: %{name} = %{version}-%{release} %description doc Man and info pages for %{name}. -%endif # !crossbuild +# !crossbuild +%endif %package -n libgcc Summary: GCC version 13.3 shared support library Obsoletes: libgcc < %{version}-%{release} Autoreq: true %if "%{version}" != "%{gcc_version}" -Provides: libgcc = %{gcc_provides} +Provides: libgcc = %{gcc_version} %endif %description -n libgcc @@ -312,7 +313,8 @@ Autoreq: true %description -n libstdc++-doc Manual, doxygen generated API information and Frequently Asked Questions for the GNU standard C++ library. -%endif # !crossbuild +# !crossbuild +%endif %package -n libgomp Summary: GCC OpenMP v4.5 shared support library @@ -1278,7 +1280,8 @@ set +x #install -m0644 -t %{buildroot}%{_docdir}/libquadmath-%{version} \ # rpm.doc/libquadmath/ChangeLog* #%endif -%endif # !crossbuild +# !crossbuild +%endif %if !%{crossbuild} # checking and split packaging for native ... @@ -1385,11 +1388,11 @@ end %{_prefix}/bin/gcc-nm %{_prefix}/bin/gcc-ranlib %{_prefix}/bin/lto-dump -#%ifnarch %{arm} aarch64 mipsel -#%{_prefix}/bin/%{gcc_target_platform}-gcc -#%{_prefix}/bin/%{gcc_target_platform}-gcc-ar -#%{_prefix}/bin/%{gcc_target_platform}-gcc-nm -#%{_prefix}/bin/%{gcc_target_platform}-gcc-ranlib +#%ifnarch %%{arm} aarch64 mipsel +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ar +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-nm +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ranlib #%endif %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1400,8 +1403,8 @@ end %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/* -#%if !%{crossbuild} +#%%{_prefix}/libexec/gcc/%%{gcc_target_platform}/%%{gcc_version}/* +#%if !%%{crossbuild} %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.so* @@ -1414,7 +1417,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include/* # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/* +#%%{_prefix}/%%{_lib}/gcc/%%{gcc_target_platform}/%%{gcc_version}/include/* %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/rpmver %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stddef.h %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdarg.h @@ -1708,7 +1711,8 @@ end %{_mandir}/man1/g++.1* %{_mandir}/man1/lto-dump.1* %{_mandir}/man7/* -%endif # !crossbuild +# !crossbuild +%endif %files -n cpp -f cpplib.lang %defattr(-,root,root,-) @@ -1798,7 +1802,8 @@ end %{_mandir}/man3/* %{_docdir}/libstdc++-%{version} %endif -%endif # !crossbuild +# !crossbuild +%endif %files -n libgomp %defattr(-,root,root,-) From 6370b0f7425c00cceda2d331d3f9ebfbdf37461b Mon Sep 17 00:00:00 2001 From: Matti Viljanen Date: Sat, 30 Nov 2024 11:30:06 +0200 Subject: [PATCH 2/8] Bump missed .so version --- rpm/cross-aarch64-gcc.spec | 4 ++-- rpm/cross-armv7hl-gcc.spec | 4 ++-- rpm/cross-i486-gcc.spec | 4 ++-- rpm/cross-x86_64-gcc.spec | 4 ++-- rpm/gcc.spec | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/rpm/cross-aarch64-gcc.spec b/rpm/cross-aarch64-gcc.spec index cea7ec1..2b7270e 100644 --- a/rpm/cross-aarch64-gcc.spec +++ b/rpm/cross-aarch64-gcc.spec @@ -1120,8 +1120,8 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.* chmod 755 %{buildroot}%{_prefix}/%{_lib}/libquadmath.so.0.* %endif %if %{build_d} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.1.* -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.1.* +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.4.* +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.4.* %endif %if %{build_libitm} chmod 755 %{buildroot}%{_prefix}/%{_lib}/libitm.so.1.* diff --git a/rpm/cross-armv7hl-gcc.spec b/rpm/cross-armv7hl-gcc.spec index 0465361..d4f3446 100644 --- a/rpm/cross-armv7hl-gcc.spec +++ b/rpm/cross-armv7hl-gcc.spec @@ -1120,8 +1120,8 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.* chmod 755 %{buildroot}%{_prefix}/%{_lib}/libquadmath.so.0.* %endif %if %{build_d} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.1.* -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.1.* +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.4.* +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.4.* %endif %if %{build_libitm} chmod 755 %{buildroot}%{_prefix}/%{_lib}/libitm.so.1.* diff --git a/rpm/cross-i486-gcc.spec b/rpm/cross-i486-gcc.spec index 911ac0c..7d974c2 100644 --- a/rpm/cross-i486-gcc.spec +++ b/rpm/cross-i486-gcc.spec @@ -1120,8 +1120,8 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.* chmod 755 %{buildroot}%{_prefix}/%{_lib}/libquadmath.so.0.* %endif %if %{build_d} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.1.* -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.1.* +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.4.* +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.4.* %endif %if %{build_libitm} chmod 755 %{buildroot}%{_prefix}/%{_lib}/libitm.so.1.* diff --git a/rpm/cross-x86_64-gcc.spec b/rpm/cross-x86_64-gcc.spec index d6a112d..bda25c7 100644 --- a/rpm/cross-x86_64-gcc.spec +++ b/rpm/cross-x86_64-gcc.spec @@ -1120,8 +1120,8 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.* chmod 755 %{buildroot}%{_prefix}/%{_lib}/libquadmath.so.0.* %endif %if %{build_d} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.1.* -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.1.* +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.4.* +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.4.* %endif %if %{build_libitm} chmod 755 %{buildroot}%{_prefix}/%{_lib}/libitm.so.1.* diff --git a/rpm/gcc.spec b/rpm/gcc.spec index d9467b2..49beb8f 100644 --- a/rpm/gcc.spec +++ b/rpm/gcc.spec @@ -1119,8 +1119,8 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.* chmod 755 %{buildroot}%{_prefix}/%{_lib}/libquadmath.so.0.* %endif %if %{build_d} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.1.* -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.1.* +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.4.* +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.4.* %endif %if %{build_libitm} chmod 755 %{buildroot}%{_prefix}/%{_lib}/libitm.so.1.* From 05919cb9ba7b9dff628f24d72a37c687dcbf6456 Mon Sep 17 00:00:00 2001 From: Matti Viljanen Date: Sat, 30 Nov 2024 11:33:33 +0200 Subject: [PATCH 3/8] [gcc] Enable gcc-go frontend and libraries. Contributes to JB#62642 Since we don't use update-alternatives, make gcc-go always provide symlinks to go and gofmt. Checks that such binaries don't yet exist. This makes it possible to have gcc-go and go installed at the same time. Some distros however make gcc-go and go mutually exclusive. --- rpm/cross-aarch64-gcc.spec | 169 ++++++++++++++++++++++++++++++++++--- rpm/cross-armv7hl-gcc.spec | 169 ++++++++++++++++++++++++++++++++++--- rpm/cross-i486-gcc.spec | 169 ++++++++++++++++++++++++++++++++++--- rpm/cross-x86_64-gcc.spec | 169 ++++++++++++++++++++++++++++++++++--- rpm/gcc.spec | 169 ++++++++++++++++++++++++++++++++++--- 5 files changed, 775 insertions(+), 70 deletions(-) diff --git a/rpm/cross-aarch64-gcc.spec b/rpm/cross-aarch64-gcc.spec index 2b7270e..cbd9ae4 100644 --- a/rpm/cross-aarch64-gcc.spec +++ b/rpm/cross-aarch64-gcc.spec @@ -109,7 +109,7 @@ ExclusiveArch: %ix86 x86_64 %global _performance_build 1 %global build_ada 0 %global build_objc 0 -%global build_go 0 +%global build_go 1 %global build_d 0 %global include_gappletviewer 0 %global build_libstdcxx_doc 0 @@ -224,6 +224,10 @@ Requires: binutils >= 2.25 Requires: glibc64bit-helper %endif +%if %{build_go} +BuildRequires: net-tools, procps +%endif + Obsoletes: gcc < %{version}-%{release} AutoReq: true # /!crossbuild @@ -479,6 +483,43 @@ Autoreq: true This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. +%package go +Summary: Go support +Requires: gcc = %{version}-%{release} +Requires: libgo = %{version}-%{release} +Requires: libgo-devel = %{version}-%{release} +Provides: gccgo = %{version}-%{release} +Autoreq: true + +%description go +The gcc-go package provides support for compiling Go programs +with the GNU Compiler Collection. + +%package -n libgo +Summary: Go runtime +Autoreq: true + +%description -n libgo +This package contains Go shared library which is needed to run +Go dynamically linked programs. + +%package -n libgo-devel +Summary: Go development libraries +Requires: libgo = %{version}-%{release} +Autoreq: true + +%description -n libgo-devel +This package includes libraries and support files for compiling +Go programs. + +%package -n libgo-static +Summary: Static Go libraries +Requires: libgo = %{version}-%{release} +Requires: gcc = %{version}-%{release} + +%description -n libgo-static +This package contains static Go libraries. + %package plugin-devel Summary: Support for compiling GCC plugins Requires: gcc = %{version}-%{release} @@ -603,6 +644,12 @@ esac #export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s/-O2/-O2 -fkeep-inline-functions/g"` export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s/-fstack-protector//g"` +%if %{build_go} +enablelgo=,go +%else +enablelgo= +%endif + %if %{crossbuild} # cross build export PATH=/opt/cross/bin:$PATH @@ -678,7 +725,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" --enable-linker-build-id \ --disable-libmpx \ %if %{bootstrap} == 0 - --enable-languages=c,c++,lto \ + --enable-languages=c,c++${enablelgo},lto \ --enable-threads=posix \ --enable-shared \ %endif @@ -732,6 +779,11 @@ make doc-man-doxygen cd ../.. %endif +# Clean any old compressed docs +if [ -d rpm.doc ]; then + find rpm.doc -name "*.bz2" -delete +fi + # Copy various doc files here and there cd .. mkdir -p rpm.doc/gfortran rpm.doc/objc rpm.doc/gdc rpm.doc/libphobos @@ -817,6 +869,11 @@ ln -sf gcc %{buildroot}%{_prefix}/bin/cc mkdir -p %{buildroot}/%{_lib} ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp +%if %{build_go} +mv %{buildroot}%{_prefix}/bin/go{,.gcc} +mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc} +%endif + cxxconfig="`find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h`" for i in `find %{gcc_target_platform}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do if ! diff -up $cxxconfig $i; then @@ -1014,6 +1071,9 @@ mv ../../../../%{_lib}/libasan_preinit.o libasan_preinit.o %if %{build_libubsan} ln -sf ../../../../%{_lib}/libubsan.so.1.* libubsan.so %endif +%if %{build_go} +ln -sf ../../../../%{_lib}/libgo.so.22.* libgo.so +%endif %if %{build_libtsan} rm -f libtsan.so echo 'INPUT ( %{_prefix}/%{_lib}/'`echo ../../../../%{_lib}/libtsan.so.2.* | sed 's,^.*libt,libt,'`' )' > libtsan.so @@ -1085,6 +1145,11 @@ ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libs %if %{build_libquadmath} ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libquadmath.a 32/libquadmath.a %endif +%if %{build_go} +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgo.a 32/libgo.a +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgobegin.a 32/libgobegin.a +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgolibbegin.a 32/libgolibbegin.a +%endif %endif # If we are building a debug package then copy all of the static archives @@ -1110,9 +1175,9 @@ for d in . $FULLLSUBDIR; do done %endif -# Strip debug info from Fortran/ObjC/Java static libraries +# Strip debug info from Fortran/ObjC/Java/Go static libraries strip -g `find . \( -name libobjc.a -o -name libgomp.a \ - -o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a \) -a -type f` + -o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a -o -name libgo.a \) -a -type f` popd chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgomp.so.1.* chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.* @@ -1141,16 +1206,6 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libtsan.so.2.* %if %{build_liblsan} chmod 755 %{buildroot}%{_prefix}/%{_lib}/liblsan.so.0.* %endif -%if %{build_go} -# Avoid stripping these libraries and binaries. -chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.22.* -chmod 644 %{buildroot}%{_prefix}/bin/go.gcc -chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cgo -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/buildid -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/test2json -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/vet -%endif %if %{build_objc} chmod 755 %{buildroot}%{_prefix}/%{_lib}/libobjc.so.4.* %endif @@ -1340,6 +1395,26 @@ if posix.access ("/sbin/ldconfig", "x") then end end +%post go +pushd %{_bindir} +if [ ! -f go ] ; then + ln -s go.gcc go +fi +if [ ! -f gofmt ] ; then + ln -s gofmt.gcc gofmt +fi +popd + +%preun go +pushd %{_bindir} +if [ -L go ]; then + rm go +fi +if [ -L gofmt ]; then + rm gofmt +fi +popd + %post -n libstdc++ -p /sbin/ldconfig %postun -n libstdc++ -p /sbin/ldconfig @@ -1944,6 +2019,72 @@ end %license libsanitizer/LICENSE.TXT %endif +%if %{build_go} +%files go +%ghost %{_prefix}/bin/go +%attr(755,root,root) %{_prefix}/bin/go.gcc +%{_prefix}/bin/gccgo +%ghost %{_prefix}/bin/gofmt +%attr(755,root,root) %{_prefix}/bin/gofmt.gcc +%{_mandir}/man1/gccgo.1* +%{_mandir}/man1/go.1* +%{_mandir}/man1/gofmt.1* +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/libexec/gcc +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/go1 +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cgo +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/buildid +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/test2json +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/vet +%ifarch %{multilib_64_archs} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgo.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgo.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgobegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgolibbegin.a +%endif +%ifarch sparcv9 ppc %{multilib_64_archs} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so +%endif +%doc rpm.doc/go/* + +%files -n libgo +%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.22* +%doc rpm.doc/libgo/* + +%files -n libgo-devel +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/%{_lib}/go +%dir %{_prefix}/%{_lib}/go/%{gcc_version} +%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform} +%ifarch %{multilib_64_archs} +%ifnarch sparc64 ppc64 ppc64p7 +%dir %{_prefix}/%{_lib}/go +%dir %{_prefix}/%{_lib}/go/%{gcc_version} +%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform} +%endif +%endif +%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgobegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgolibbegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so +%endif + +%files -n libgo-static +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.a +%endif +%endif + %files plugin-devel %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc diff --git a/rpm/cross-armv7hl-gcc.spec b/rpm/cross-armv7hl-gcc.spec index d4f3446..693684c 100644 --- a/rpm/cross-armv7hl-gcc.spec +++ b/rpm/cross-armv7hl-gcc.spec @@ -109,7 +109,7 @@ ExclusiveArch: %ix86 x86_64 %global _performance_build 1 %global build_ada 0 %global build_objc 0 -%global build_go 0 +%global build_go 1 %global build_d 0 %global include_gappletviewer 0 %global build_libstdcxx_doc 0 @@ -224,6 +224,10 @@ Requires: binutils >= 2.25 Requires: glibc64bit-helper %endif +%if %{build_go} +BuildRequires: net-tools, procps +%endif + Obsoletes: gcc < %{version}-%{release} AutoReq: true # /!crossbuild @@ -479,6 +483,43 @@ Autoreq: true This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. +%package go +Summary: Go support +Requires: gcc = %{version}-%{release} +Requires: libgo = %{version}-%{release} +Requires: libgo-devel = %{version}-%{release} +Provides: gccgo = %{version}-%{release} +Autoreq: true + +%description go +The gcc-go package provides support for compiling Go programs +with the GNU Compiler Collection. + +%package -n libgo +Summary: Go runtime +Autoreq: true + +%description -n libgo +This package contains Go shared library which is needed to run +Go dynamically linked programs. + +%package -n libgo-devel +Summary: Go development libraries +Requires: libgo = %{version}-%{release} +Autoreq: true + +%description -n libgo-devel +This package includes libraries and support files for compiling +Go programs. + +%package -n libgo-static +Summary: Static Go libraries +Requires: libgo = %{version}-%{release} +Requires: gcc = %{version}-%{release} + +%description -n libgo-static +This package contains static Go libraries. + %package plugin-devel Summary: Support for compiling GCC plugins Requires: gcc = %{version}-%{release} @@ -603,6 +644,12 @@ esac #export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s/-O2/-O2 -fkeep-inline-functions/g"` export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s/-fstack-protector//g"` +%if %{build_go} +enablelgo=,go +%else +enablelgo= +%endif + %if %{crossbuild} # cross build export PATH=/opt/cross/bin:$PATH @@ -678,7 +725,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" --enable-linker-build-id \ --disable-libmpx \ %if %{bootstrap} == 0 - --enable-languages=c,c++,lto \ + --enable-languages=c,c++${enablelgo},lto \ --enable-threads=posix \ --enable-shared \ %endif @@ -732,6 +779,11 @@ make doc-man-doxygen cd ../.. %endif +# Clean any old compressed docs +if [ -d rpm.doc ]; then + find rpm.doc -name "*.bz2" -delete +fi + # Copy various doc files here and there cd .. mkdir -p rpm.doc/gfortran rpm.doc/objc rpm.doc/gdc rpm.doc/libphobos @@ -817,6 +869,11 @@ ln -sf gcc %{buildroot}%{_prefix}/bin/cc mkdir -p %{buildroot}/%{_lib} ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp +%if %{build_go} +mv %{buildroot}%{_prefix}/bin/go{,.gcc} +mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc} +%endif + cxxconfig="`find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h`" for i in `find %{gcc_target_platform}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do if ! diff -up $cxxconfig $i; then @@ -1014,6 +1071,9 @@ mv ../../../../%{_lib}/libasan_preinit.o libasan_preinit.o %if %{build_libubsan} ln -sf ../../../../%{_lib}/libubsan.so.1.* libubsan.so %endif +%if %{build_go} +ln -sf ../../../../%{_lib}/libgo.so.22.* libgo.so +%endif %if %{build_libtsan} rm -f libtsan.so echo 'INPUT ( %{_prefix}/%{_lib}/'`echo ../../../../%{_lib}/libtsan.so.2.* | sed 's,^.*libt,libt,'`' )' > libtsan.so @@ -1085,6 +1145,11 @@ ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libs %if %{build_libquadmath} ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libquadmath.a 32/libquadmath.a %endif +%if %{build_go} +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgo.a 32/libgo.a +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgobegin.a 32/libgobegin.a +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgolibbegin.a 32/libgolibbegin.a +%endif %endif # If we are building a debug package then copy all of the static archives @@ -1110,9 +1175,9 @@ for d in . $FULLLSUBDIR; do done %endif -# Strip debug info from Fortran/ObjC/Java static libraries +# Strip debug info from Fortran/ObjC/Java/Go static libraries strip -g `find . \( -name libobjc.a -o -name libgomp.a \ - -o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a \) -a -type f` + -o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a -o -name libgo.a \) -a -type f` popd chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgomp.so.1.* chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.* @@ -1141,16 +1206,6 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libtsan.so.2.* %if %{build_liblsan} chmod 755 %{buildroot}%{_prefix}/%{_lib}/liblsan.so.0.* %endif -%if %{build_go} -# Avoid stripping these libraries and binaries. -chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.22.* -chmod 644 %{buildroot}%{_prefix}/bin/go.gcc -chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cgo -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/buildid -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/test2json -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/vet -%endif %if %{build_objc} chmod 755 %{buildroot}%{_prefix}/%{_lib}/libobjc.so.4.* %endif @@ -1340,6 +1395,26 @@ if posix.access ("/sbin/ldconfig", "x") then end end +%post go +pushd %{_bindir} +if [ ! -f go ] ; then + ln -s go.gcc go +fi +if [ ! -f gofmt ] ; then + ln -s gofmt.gcc gofmt +fi +popd + +%preun go +pushd %{_bindir} +if [ -L go ]; then + rm go +fi +if [ -L gofmt ]; then + rm gofmt +fi +popd + %post -n libstdc++ -p /sbin/ldconfig %postun -n libstdc++ -p /sbin/ldconfig @@ -1944,6 +2019,72 @@ end %license libsanitizer/LICENSE.TXT %endif +%if %{build_go} +%files go +%ghost %{_prefix}/bin/go +%attr(755,root,root) %{_prefix}/bin/go.gcc +%{_prefix}/bin/gccgo +%ghost %{_prefix}/bin/gofmt +%attr(755,root,root) %{_prefix}/bin/gofmt.gcc +%{_mandir}/man1/gccgo.1* +%{_mandir}/man1/go.1* +%{_mandir}/man1/gofmt.1* +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/libexec/gcc +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/go1 +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cgo +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/buildid +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/test2json +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/vet +%ifarch %{multilib_64_archs} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgo.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgo.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgobegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgolibbegin.a +%endif +%ifarch sparcv9 ppc %{multilib_64_archs} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so +%endif +%doc rpm.doc/go/* + +%files -n libgo +%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.22* +%doc rpm.doc/libgo/* + +%files -n libgo-devel +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/%{_lib}/go +%dir %{_prefix}/%{_lib}/go/%{gcc_version} +%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform} +%ifarch %{multilib_64_archs} +%ifnarch sparc64 ppc64 ppc64p7 +%dir %{_prefix}/%{_lib}/go +%dir %{_prefix}/%{_lib}/go/%{gcc_version} +%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform} +%endif +%endif +%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgobegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgolibbegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so +%endif + +%files -n libgo-static +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.a +%endif +%endif + %files plugin-devel %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc diff --git a/rpm/cross-i486-gcc.spec b/rpm/cross-i486-gcc.spec index 7d974c2..de0239e 100644 --- a/rpm/cross-i486-gcc.spec +++ b/rpm/cross-i486-gcc.spec @@ -109,7 +109,7 @@ ExclusiveArch: %ix86 x86_64 %global _performance_build 1 %global build_ada 0 %global build_objc 0 -%global build_go 0 +%global build_go 1 %global build_d 0 %global include_gappletviewer 0 %global build_libstdcxx_doc 0 @@ -224,6 +224,10 @@ Requires: binutils >= 2.25 Requires: glibc64bit-helper %endif +%if %{build_go} +BuildRequires: net-tools, procps +%endif + Obsoletes: gcc < %{version}-%{release} AutoReq: true # /!crossbuild @@ -479,6 +483,43 @@ Autoreq: true This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. +%package go +Summary: Go support +Requires: gcc = %{version}-%{release} +Requires: libgo = %{version}-%{release} +Requires: libgo-devel = %{version}-%{release} +Provides: gccgo = %{version}-%{release} +Autoreq: true + +%description go +The gcc-go package provides support for compiling Go programs +with the GNU Compiler Collection. + +%package -n libgo +Summary: Go runtime +Autoreq: true + +%description -n libgo +This package contains Go shared library which is needed to run +Go dynamically linked programs. + +%package -n libgo-devel +Summary: Go development libraries +Requires: libgo = %{version}-%{release} +Autoreq: true + +%description -n libgo-devel +This package includes libraries and support files for compiling +Go programs. + +%package -n libgo-static +Summary: Static Go libraries +Requires: libgo = %{version}-%{release} +Requires: gcc = %{version}-%{release} + +%description -n libgo-static +This package contains static Go libraries. + %package plugin-devel Summary: Support for compiling GCC plugins Requires: gcc = %{version}-%{release} @@ -603,6 +644,12 @@ esac #export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s/-O2/-O2 -fkeep-inline-functions/g"` export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s/-fstack-protector//g"` +%if %{build_go} +enablelgo=,go +%else +enablelgo= +%endif + %if %{crossbuild} # cross build export PATH=/opt/cross/bin:$PATH @@ -678,7 +725,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" --enable-linker-build-id \ --disable-libmpx \ %if %{bootstrap} == 0 - --enable-languages=c,c++,lto \ + --enable-languages=c,c++${enablelgo},lto \ --enable-threads=posix \ --enable-shared \ %endif @@ -732,6 +779,11 @@ make doc-man-doxygen cd ../.. %endif +# Clean any old compressed docs +if [ -d rpm.doc ]; then + find rpm.doc -name "*.bz2" -delete +fi + # Copy various doc files here and there cd .. mkdir -p rpm.doc/gfortran rpm.doc/objc rpm.doc/gdc rpm.doc/libphobos @@ -817,6 +869,11 @@ ln -sf gcc %{buildroot}%{_prefix}/bin/cc mkdir -p %{buildroot}/%{_lib} ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp +%if %{build_go} +mv %{buildroot}%{_prefix}/bin/go{,.gcc} +mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc} +%endif + cxxconfig="`find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h`" for i in `find %{gcc_target_platform}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do if ! diff -up $cxxconfig $i; then @@ -1014,6 +1071,9 @@ mv ../../../../%{_lib}/libasan_preinit.o libasan_preinit.o %if %{build_libubsan} ln -sf ../../../../%{_lib}/libubsan.so.1.* libubsan.so %endif +%if %{build_go} +ln -sf ../../../../%{_lib}/libgo.so.22.* libgo.so +%endif %if %{build_libtsan} rm -f libtsan.so echo 'INPUT ( %{_prefix}/%{_lib}/'`echo ../../../../%{_lib}/libtsan.so.2.* | sed 's,^.*libt,libt,'`' )' > libtsan.so @@ -1085,6 +1145,11 @@ ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libs %if %{build_libquadmath} ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libquadmath.a 32/libquadmath.a %endif +%if %{build_go} +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgo.a 32/libgo.a +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgobegin.a 32/libgobegin.a +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgolibbegin.a 32/libgolibbegin.a +%endif %endif # If we are building a debug package then copy all of the static archives @@ -1110,9 +1175,9 @@ for d in . $FULLLSUBDIR; do done %endif -# Strip debug info from Fortran/ObjC/Java static libraries +# Strip debug info from Fortran/ObjC/Java/Go static libraries strip -g `find . \( -name libobjc.a -o -name libgomp.a \ - -o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a \) -a -type f` + -o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a -o -name libgo.a \) -a -type f` popd chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgomp.so.1.* chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.* @@ -1141,16 +1206,6 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libtsan.so.2.* %if %{build_liblsan} chmod 755 %{buildroot}%{_prefix}/%{_lib}/liblsan.so.0.* %endif -%if %{build_go} -# Avoid stripping these libraries and binaries. -chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.22.* -chmod 644 %{buildroot}%{_prefix}/bin/go.gcc -chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cgo -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/buildid -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/test2json -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/vet -%endif %if %{build_objc} chmod 755 %{buildroot}%{_prefix}/%{_lib}/libobjc.so.4.* %endif @@ -1340,6 +1395,26 @@ if posix.access ("/sbin/ldconfig", "x") then end end +%post go +pushd %{_bindir} +if [ ! -f go ] ; then + ln -s go.gcc go +fi +if [ ! -f gofmt ] ; then + ln -s gofmt.gcc gofmt +fi +popd + +%preun go +pushd %{_bindir} +if [ -L go ]; then + rm go +fi +if [ -L gofmt ]; then + rm gofmt +fi +popd + %post -n libstdc++ -p /sbin/ldconfig %postun -n libstdc++ -p /sbin/ldconfig @@ -1944,6 +2019,72 @@ end %license libsanitizer/LICENSE.TXT %endif +%if %{build_go} +%files go +%ghost %{_prefix}/bin/go +%attr(755,root,root) %{_prefix}/bin/go.gcc +%{_prefix}/bin/gccgo +%ghost %{_prefix}/bin/gofmt +%attr(755,root,root) %{_prefix}/bin/gofmt.gcc +%{_mandir}/man1/gccgo.1* +%{_mandir}/man1/go.1* +%{_mandir}/man1/gofmt.1* +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/libexec/gcc +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/go1 +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cgo +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/buildid +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/test2json +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/vet +%ifarch %{multilib_64_archs} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgo.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgo.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgobegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgolibbegin.a +%endif +%ifarch sparcv9 ppc %{multilib_64_archs} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so +%endif +%doc rpm.doc/go/* + +%files -n libgo +%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.22* +%doc rpm.doc/libgo/* + +%files -n libgo-devel +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/%{_lib}/go +%dir %{_prefix}/%{_lib}/go/%{gcc_version} +%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform} +%ifarch %{multilib_64_archs} +%ifnarch sparc64 ppc64 ppc64p7 +%dir %{_prefix}/%{_lib}/go +%dir %{_prefix}/%{_lib}/go/%{gcc_version} +%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform} +%endif +%endif +%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgobegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgolibbegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so +%endif + +%files -n libgo-static +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.a +%endif +%endif + %files plugin-devel %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc diff --git a/rpm/cross-x86_64-gcc.spec b/rpm/cross-x86_64-gcc.spec index bda25c7..cb535a0 100644 --- a/rpm/cross-x86_64-gcc.spec +++ b/rpm/cross-x86_64-gcc.spec @@ -109,7 +109,7 @@ ExclusiveArch: %ix86 x86_64 %global _performance_build 1 %global build_ada 0 %global build_objc 0 -%global build_go 0 +%global build_go 1 %global build_d 0 %global include_gappletviewer 0 %global build_libstdcxx_doc 0 @@ -224,6 +224,10 @@ Requires: binutils >= 2.25 Requires: glibc64bit-helper %endif +%if %{build_go} +BuildRequires: net-tools, procps +%endif + Obsoletes: gcc < %{version}-%{release} AutoReq: true # /!crossbuild @@ -479,6 +483,43 @@ Autoreq: true This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. +%package go +Summary: Go support +Requires: gcc = %{version}-%{release} +Requires: libgo = %{version}-%{release} +Requires: libgo-devel = %{version}-%{release} +Provides: gccgo = %{version}-%{release} +Autoreq: true + +%description go +The gcc-go package provides support for compiling Go programs +with the GNU Compiler Collection. + +%package -n libgo +Summary: Go runtime +Autoreq: true + +%description -n libgo +This package contains Go shared library which is needed to run +Go dynamically linked programs. + +%package -n libgo-devel +Summary: Go development libraries +Requires: libgo = %{version}-%{release} +Autoreq: true + +%description -n libgo-devel +This package includes libraries and support files for compiling +Go programs. + +%package -n libgo-static +Summary: Static Go libraries +Requires: libgo = %{version}-%{release} +Requires: gcc = %{version}-%{release} + +%description -n libgo-static +This package contains static Go libraries. + %package plugin-devel Summary: Support for compiling GCC plugins Requires: gcc = %{version}-%{release} @@ -603,6 +644,12 @@ esac #export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s/-O2/-O2 -fkeep-inline-functions/g"` export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s/-fstack-protector//g"` +%if %{build_go} +enablelgo=,go +%else +enablelgo= +%endif + %if %{crossbuild} # cross build export PATH=/opt/cross/bin:$PATH @@ -678,7 +725,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" --enable-linker-build-id \ --disable-libmpx \ %if %{bootstrap} == 0 - --enable-languages=c,c++,lto \ + --enable-languages=c,c++${enablelgo},lto \ --enable-threads=posix \ --enable-shared \ %endif @@ -732,6 +779,11 @@ make doc-man-doxygen cd ../.. %endif +# Clean any old compressed docs +if [ -d rpm.doc ]; then + find rpm.doc -name "*.bz2" -delete +fi + # Copy various doc files here and there cd .. mkdir -p rpm.doc/gfortran rpm.doc/objc rpm.doc/gdc rpm.doc/libphobos @@ -817,6 +869,11 @@ ln -sf gcc %{buildroot}%{_prefix}/bin/cc mkdir -p %{buildroot}/%{_lib} ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp +%if %{build_go} +mv %{buildroot}%{_prefix}/bin/go{,.gcc} +mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc} +%endif + cxxconfig="`find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h`" for i in `find %{gcc_target_platform}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do if ! diff -up $cxxconfig $i; then @@ -1014,6 +1071,9 @@ mv ../../../../%{_lib}/libasan_preinit.o libasan_preinit.o %if %{build_libubsan} ln -sf ../../../../%{_lib}/libubsan.so.1.* libubsan.so %endif +%if %{build_go} +ln -sf ../../../../%{_lib}/libgo.so.22.* libgo.so +%endif %if %{build_libtsan} rm -f libtsan.so echo 'INPUT ( %{_prefix}/%{_lib}/'`echo ../../../../%{_lib}/libtsan.so.2.* | sed 's,^.*libt,libt,'`' )' > libtsan.so @@ -1085,6 +1145,11 @@ ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libs %if %{build_libquadmath} ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libquadmath.a 32/libquadmath.a %endif +%if %{build_go} +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgo.a 32/libgo.a +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgobegin.a 32/libgobegin.a +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgolibbegin.a 32/libgolibbegin.a +%endif %endif # If we are building a debug package then copy all of the static archives @@ -1110,9 +1175,9 @@ for d in . $FULLLSUBDIR; do done %endif -# Strip debug info from Fortran/ObjC/Java static libraries +# Strip debug info from Fortran/ObjC/Java/Go static libraries strip -g `find . \( -name libobjc.a -o -name libgomp.a \ - -o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a \) -a -type f` + -o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a -o -name libgo.a \) -a -type f` popd chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgomp.so.1.* chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.* @@ -1141,16 +1206,6 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libtsan.so.2.* %if %{build_liblsan} chmod 755 %{buildroot}%{_prefix}/%{_lib}/liblsan.so.0.* %endif -%if %{build_go} -# Avoid stripping these libraries and binaries. -chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.22.* -chmod 644 %{buildroot}%{_prefix}/bin/go.gcc -chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cgo -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/buildid -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/test2json -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/vet -%endif %if %{build_objc} chmod 755 %{buildroot}%{_prefix}/%{_lib}/libobjc.so.4.* %endif @@ -1340,6 +1395,26 @@ if posix.access ("/sbin/ldconfig", "x") then end end +%post go +pushd %{_bindir} +if [ ! -f go ] ; then + ln -s go.gcc go +fi +if [ ! -f gofmt ] ; then + ln -s gofmt.gcc gofmt +fi +popd + +%preun go +pushd %{_bindir} +if [ -L go ]; then + rm go +fi +if [ -L gofmt ]; then + rm gofmt +fi +popd + %post -n libstdc++ -p /sbin/ldconfig %postun -n libstdc++ -p /sbin/ldconfig @@ -1944,6 +2019,72 @@ end %license libsanitizer/LICENSE.TXT %endif +%if %{build_go} +%files go +%ghost %{_prefix}/bin/go +%attr(755,root,root) %{_prefix}/bin/go.gcc +%{_prefix}/bin/gccgo +%ghost %{_prefix}/bin/gofmt +%attr(755,root,root) %{_prefix}/bin/gofmt.gcc +%{_mandir}/man1/gccgo.1* +%{_mandir}/man1/go.1* +%{_mandir}/man1/gofmt.1* +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/libexec/gcc +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/go1 +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cgo +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/buildid +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/test2json +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/vet +%ifarch %{multilib_64_archs} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgo.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgo.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgobegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgolibbegin.a +%endif +%ifarch sparcv9 ppc %{multilib_64_archs} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so +%endif +%doc rpm.doc/go/* + +%files -n libgo +%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.22* +%doc rpm.doc/libgo/* + +%files -n libgo-devel +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/%{_lib}/go +%dir %{_prefix}/%{_lib}/go/%{gcc_version} +%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform} +%ifarch %{multilib_64_archs} +%ifnarch sparc64 ppc64 ppc64p7 +%dir %{_prefix}/%{_lib}/go +%dir %{_prefix}/%{_lib}/go/%{gcc_version} +%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform} +%endif +%endif +%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgobegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgolibbegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so +%endif + +%files -n libgo-static +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.a +%endif +%endif + %files plugin-devel %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc diff --git a/rpm/gcc.spec b/rpm/gcc.spec index 49beb8f..07970a3 100644 --- a/rpm/gcc.spec +++ b/rpm/gcc.spec @@ -108,7 +108,7 @@ ExclusiveArch: %ix86 x86_64 %global _performance_build 1 %global build_ada 0 %global build_objc 0 -%global build_go 0 +%global build_go 1 %global build_d 0 %global include_gappletviewer 0 %global build_libstdcxx_doc 0 @@ -223,6 +223,10 @@ Requires: binutils >= 2.25 Requires: glibc64bit-helper %endif +%if %{build_go} +BuildRequires: net-tools, procps +%endif + Obsoletes: gcc < %{version}-%{release} AutoReq: true # /!crossbuild @@ -478,6 +482,43 @@ Autoreq: true This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. +%package go +Summary: Go support +Requires: gcc = %{version}-%{release} +Requires: libgo = %{version}-%{release} +Requires: libgo-devel = %{version}-%{release} +Provides: gccgo = %{version}-%{release} +Autoreq: true + +%description go +The gcc-go package provides support for compiling Go programs +with the GNU Compiler Collection. + +%package -n libgo +Summary: Go runtime +Autoreq: true + +%description -n libgo +This package contains Go shared library which is needed to run +Go dynamically linked programs. + +%package -n libgo-devel +Summary: Go development libraries +Requires: libgo = %{version}-%{release} +Autoreq: true + +%description -n libgo-devel +This package includes libraries and support files for compiling +Go programs. + +%package -n libgo-static +Summary: Static Go libraries +Requires: libgo = %{version}-%{release} +Requires: gcc = %{version}-%{release} + +%description -n libgo-static +This package contains static Go libraries. + %package plugin-devel Summary: Support for compiling GCC plugins Requires: gcc = %{version}-%{release} @@ -602,6 +643,12 @@ esac #export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s/-O2/-O2 -fkeep-inline-functions/g"` export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s/-fstack-protector//g"` +%if %{build_go} +enablelgo=,go +%else +enablelgo= +%endif + %if %{crossbuild} # cross build export PATH=/opt/cross/bin:$PATH @@ -677,7 +724,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" --enable-linker-build-id \ --disable-libmpx \ %if %{bootstrap} == 0 - --enable-languages=c,c++,lto \ + --enable-languages=c,c++${enablelgo},lto \ --enable-threads=posix \ --enable-shared \ %endif @@ -731,6 +778,11 @@ make doc-man-doxygen cd ../.. %endif +# Clean any old compressed docs +if [ -d rpm.doc ]; then + find rpm.doc -name "*.bz2" -delete +fi + # Copy various doc files here and there cd .. mkdir -p rpm.doc/gfortran rpm.doc/objc rpm.doc/gdc rpm.doc/libphobos @@ -816,6 +868,11 @@ ln -sf gcc %{buildroot}%{_prefix}/bin/cc mkdir -p %{buildroot}/%{_lib} ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp +%if %{build_go} +mv %{buildroot}%{_prefix}/bin/go{,.gcc} +mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc} +%endif + cxxconfig="`find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h`" for i in `find %{gcc_target_platform}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do if ! diff -up $cxxconfig $i; then @@ -1013,6 +1070,9 @@ mv ../../../../%{_lib}/libasan_preinit.o libasan_preinit.o %if %{build_libubsan} ln -sf ../../../../%{_lib}/libubsan.so.1.* libubsan.so %endif +%if %{build_go} +ln -sf ../../../../%{_lib}/libgo.so.22.* libgo.so +%endif %if %{build_libtsan} rm -f libtsan.so echo 'INPUT ( %{_prefix}/%{_lib}/'`echo ../../../../%{_lib}/libtsan.so.2.* | sed 's,^.*libt,libt,'`' )' > libtsan.so @@ -1084,6 +1144,11 @@ ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libs %if %{build_libquadmath} ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libquadmath.a 32/libquadmath.a %endif +%if %{build_go} +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgo.a 32/libgo.a +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgobegin.a 32/libgobegin.a +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgolibbegin.a 32/libgolibbegin.a +%endif %endif # If we are building a debug package then copy all of the static archives @@ -1109,9 +1174,9 @@ for d in . $FULLLSUBDIR; do done %endif -# Strip debug info from Fortran/ObjC/Java static libraries +# Strip debug info from Fortran/ObjC/Java/Go static libraries strip -g `find . \( -name libobjc.a -o -name libgomp.a \ - -o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a \) -a -type f` + -o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a -o -name libgo.a \) -a -type f` popd chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgomp.so.1.* chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.* @@ -1140,16 +1205,6 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libtsan.so.2.* %if %{build_liblsan} chmod 755 %{buildroot}%{_prefix}/%{_lib}/liblsan.so.0.* %endif -%if %{build_go} -# Avoid stripping these libraries and binaries. -chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.22.* -chmod 644 %{buildroot}%{_prefix}/bin/go.gcc -chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cgo -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/buildid -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/test2json -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/vet -%endif %if %{build_objc} chmod 755 %{buildroot}%{_prefix}/%{_lib}/libobjc.so.4.* %endif @@ -1339,6 +1394,26 @@ if posix.access ("/sbin/ldconfig", "x") then end end +%post go +pushd %{_bindir} +if [ ! -f go ] ; then + ln -s go.gcc go +fi +if [ ! -f gofmt ] ; then + ln -s gofmt.gcc gofmt +fi +popd + +%preun go +pushd %{_bindir} +if [ -L go ]; then + rm go +fi +if [ -L gofmt ]; then + rm gofmt +fi +popd + %post -n libstdc++ -p /sbin/ldconfig %postun -n libstdc++ -p /sbin/ldconfig @@ -1943,6 +2018,72 @@ end %license libsanitizer/LICENSE.TXT %endif +%if %{build_go} +%files go +%ghost %{_prefix}/bin/go +%attr(755,root,root) %{_prefix}/bin/go.gcc +%{_prefix}/bin/gccgo +%ghost %{_prefix}/bin/gofmt +%attr(755,root,root) %{_prefix}/bin/gofmt.gcc +%{_mandir}/man1/gccgo.1* +%{_mandir}/man1/go.1* +%{_mandir}/man1/gofmt.1* +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/libexec/gcc +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/go1 +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cgo +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/buildid +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/test2json +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/vet +%ifarch %{multilib_64_archs} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgo.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgo.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgobegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgolibbegin.a +%endif +%ifarch sparcv9 ppc %{multilib_64_archs} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so +%endif +%doc rpm.doc/go/* + +%files -n libgo +%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.22* +%doc rpm.doc/libgo/* + +%files -n libgo-devel +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/%{_lib}/go +%dir %{_prefix}/%{_lib}/go/%{gcc_version} +%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform} +%ifarch %{multilib_64_archs} +%ifnarch sparc64 ppc64 ppc64p7 +%dir %{_prefix}/%{_lib}/go +%dir %{_prefix}/%{_lib}/go/%{gcc_version} +%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform} +%endif +%endif +%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgobegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgolibbegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so +%endif + +%files -n libgo-static +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.a +%endif +%endif + %files plugin-devel %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc From a81d0ae2c2ed912dc3c71ac4b432fcc7c349d235 Mon Sep 17 00:00:00 2001 From: Matti Viljanen Date: Fri, 13 Dec 2024 11:57:09 +0200 Subject: [PATCH 4/8] Don't provide go and gofmt binaries --- rpm/cross-aarch64-gcc.spec | 22 ---------------------- rpm/cross-armv7hl-gcc.spec | 22 ---------------------- rpm/cross-i486-gcc.spec | 22 ---------------------- rpm/cross-x86_64-gcc.spec | 22 ---------------------- rpm/gcc.spec | 22 ---------------------- 5 files changed, 110 deletions(-) diff --git a/rpm/cross-aarch64-gcc.spec b/rpm/cross-aarch64-gcc.spec index cbd9ae4..330627a 100644 --- a/rpm/cross-aarch64-gcc.spec +++ b/rpm/cross-aarch64-gcc.spec @@ -1395,26 +1395,6 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%post go -pushd %{_bindir} -if [ ! -f go ] ; then - ln -s go.gcc go -fi -if [ ! -f gofmt ] ; then - ln -s gofmt.gcc gofmt -fi -popd - -%preun go -pushd %{_bindir} -if [ -L go ]; then - rm go -fi -if [ -L gofmt ]; then - rm gofmt -fi -popd - %post -n libstdc++ -p /sbin/ldconfig %postun -n libstdc++ -p /sbin/ldconfig @@ -2021,10 +2001,8 @@ popd %if %{build_go} %files go -%ghost %{_prefix}/bin/go %attr(755,root,root) %{_prefix}/bin/go.gcc %{_prefix}/bin/gccgo -%ghost %{_prefix}/bin/gofmt %attr(755,root,root) %{_prefix}/bin/gofmt.gcc %{_mandir}/man1/gccgo.1* %{_mandir}/man1/go.1* diff --git a/rpm/cross-armv7hl-gcc.spec b/rpm/cross-armv7hl-gcc.spec index 693684c..2027b23 100644 --- a/rpm/cross-armv7hl-gcc.spec +++ b/rpm/cross-armv7hl-gcc.spec @@ -1395,26 +1395,6 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%post go -pushd %{_bindir} -if [ ! -f go ] ; then - ln -s go.gcc go -fi -if [ ! -f gofmt ] ; then - ln -s gofmt.gcc gofmt -fi -popd - -%preun go -pushd %{_bindir} -if [ -L go ]; then - rm go -fi -if [ -L gofmt ]; then - rm gofmt -fi -popd - %post -n libstdc++ -p /sbin/ldconfig %postun -n libstdc++ -p /sbin/ldconfig @@ -2021,10 +2001,8 @@ popd %if %{build_go} %files go -%ghost %{_prefix}/bin/go %attr(755,root,root) %{_prefix}/bin/go.gcc %{_prefix}/bin/gccgo -%ghost %{_prefix}/bin/gofmt %attr(755,root,root) %{_prefix}/bin/gofmt.gcc %{_mandir}/man1/gccgo.1* %{_mandir}/man1/go.1* diff --git a/rpm/cross-i486-gcc.spec b/rpm/cross-i486-gcc.spec index de0239e..51ea516 100644 --- a/rpm/cross-i486-gcc.spec +++ b/rpm/cross-i486-gcc.spec @@ -1395,26 +1395,6 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%post go -pushd %{_bindir} -if [ ! -f go ] ; then - ln -s go.gcc go -fi -if [ ! -f gofmt ] ; then - ln -s gofmt.gcc gofmt -fi -popd - -%preun go -pushd %{_bindir} -if [ -L go ]; then - rm go -fi -if [ -L gofmt ]; then - rm gofmt -fi -popd - %post -n libstdc++ -p /sbin/ldconfig %postun -n libstdc++ -p /sbin/ldconfig @@ -2021,10 +2001,8 @@ popd %if %{build_go} %files go -%ghost %{_prefix}/bin/go %attr(755,root,root) %{_prefix}/bin/go.gcc %{_prefix}/bin/gccgo -%ghost %{_prefix}/bin/gofmt %attr(755,root,root) %{_prefix}/bin/gofmt.gcc %{_mandir}/man1/gccgo.1* %{_mandir}/man1/go.1* diff --git a/rpm/cross-x86_64-gcc.spec b/rpm/cross-x86_64-gcc.spec index cb535a0..be82af3 100644 --- a/rpm/cross-x86_64-gcc.spec +++ b/rpm/cross-x86_64-gcc.spec @@ -1395,26 +1395,6 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%post go -pushd %{_bindir} -if [ ! -f go ] ; then - ln -s go.gcc go -fi -if [ ! -f gofmt ] ; then - ln -s gofmt.gcc gofmt -fi -popd - -%preun go -pushd %{_bindir} -if [ -L go ]; then - rm go -fi -if [ -L gofmt ]; then - rm gofmt -fi -popd - %post -n libstdc++ -p /sbin/ldconfig %postun -n libstdc++ -p /sbin/ldconfig @@ -2021,10 +2001,8 @@ popd %if %{build_go} %files go -%ghost %{_prefix}/bin/go %attr(755,root,root) %{_prefix}/bin/go.gcc %{_prefix}/bin/gccgo -%ghost %{_prefix}/bin/gofmt %attr(755,root,root) %{_prefix}/bin/gofmt.gcc %{_mandir}/man1/gccgo.1* %{_mandir}/man1/go.1* diff --git a/rpm/gcc.spec b/rpm/gcc.spec index 07970a3..3aec84b 100644 --- a/rpm/gcc.spec +++ b/rpm/gcc.spec @@ -1394,26 +1394,6 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%post go -pushd %{_bindir} -if [ ! -f go ] ; then - ln -s go.gcc go -fi -if [ ! -f gofmt ] ; then - ln -s gofmt.gcc gofmt -fi -popd - -%preun go -pushd %{_bindir} -if [ -L go ]; then - rm go -fi -if [ -L gofmt ]; then - rm gofmt -fi -popd - %post -n libstdc++ -p /sbin/ldconfig %postun -n libstdc++ -p /sbin/ldconfig @@ -2020,10 +2000,8 @@ popd %if %{build_go} %files go -%ghost %{_prefix}/bin/go %attr(755,root,root) %{_prefix}/bin/go.gcc %{_prefix}/bin/gccgo -%ghost %{_prefix}/bin/gofmt %attr(755,root,root) %{_prefix}/bin/gofmt.gcc %{_mandir}/man1/gccgo.1* %{_mandir}/man1/go.1* From c9582672bcd5438bb0a073eec849373d26578c72 Mon Sep 17 00:00:00 2001 From: Matti Viljanen Date: Thu, 12 Dec 2024 14:54:50 +0200 Subject: [PATCH 5/8] Change (base) name to gcc13, use --program-suffix --- rpm/cross-aarch64-gcc13.spec | 2089 +++++++++++++++++ ...v7hl-gcc.spec => cross-armv7hl-gcc13.spec} | 62 +- ...ss-i486-gcc.spec => cross-i486-gcc13.spec} | 62 +- ...86_64-gcc.spec => cross-x86_64-gcc13.spec} | 62 +- rpm/gcc.spec | 2086 ---------------- rpm/{gcc-rpmlintrc => gcc13-rpmlintrc} | 0 rpm/{gcc.changes => gcc13.changes} | 0 rpm/{cross-aarch64-gcc.spec => gcc13.spec} | 63 +- rpm/precheckin.sh | 2 +- 9 files changed, 2218 insertions(+), 2208 deletions(-) create mode 100644 rpm/cross-aarch64-gcc13.spec rename rpm/{cross-armv7hl-gcc.spec => cross-armv7hl-gcc13.spec} (98%) rename rpm/{cross-i486-gcc.spec => cross-i486-gcc13.spec} (98%) rename rpm/{cross-x86_64-gcc.spec => cross-x86_64-gcc13.spec} (98%) delete mode 100644 rpm/gcc.spec rename rpm/{gcc-rpmlintrc => gcc13-rpmlintrc} (100%) rename rpm/{gcc.changes => gcc13.changes} (100%) rename rpm/{cross-aarch64-gcc.spec => gcc13.spec} (98%) diff --git a/rpm/cross-aarch64-gcc13.spec b/rpm/cross-aarch64-gcc13.spec new file mode 100644 index 0000000..7aff9a7 --- /dev/null +++ b/rpm/cross-aarch64-gcc13.spec @@ -0,0 +1,2089 @@ +# Combined gcc / cross-armv*-gccNN) specfile +Name: cross-aarch64-gcc13 +%define crossarch aarch64 +# Keep Name on top ! + +%if "%{?bootstrap}" == "" +%define bootstrap 0 +%else +%if "%{bootstrap}" != "0" && "%{bootstrap}" != "1" && "%{bootstrap}" != "2" +%{error:Bootstrap parameter should me one of: 0, 1, 2} +%endif +%endif + +%ifarch aarch64 x86_64 +%define _libdir /usr/lib64 +%define _lib lib64 +%endif + +%global isl_version 0.24 + +# crossbuild / accelerator section +# \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ +%define crossbuild 0 +%if "%{name}" != "gcc13" +# this is the ix86 -> arm cross compiler (cross-armv*-gccNN) +# +# We set requires/provides by hand and disable post-build-checks. +# Captain Trunk: Sledge, you cannot disarm that nuclear bomb! +# Sledge Hammer: Trust me, I know what I'm doing. +AutoReqProv: 0 +AutoReq: false +#!BuildIgnore: rpmlint-Moblin +#!BuildIgnore: rpmlint-mini +#!BuildIgnore: post-build-checks +# cross platform +%if %(echo %{crossarch} | grep -q "^arm" && echo 1 || echo 0) +%define cross_gcc_target_platform %{crossarch}-%{_vendor}-linux-gnueabi +%else +%define cross_gcc_target_platform %{crossarch}-%{_vendor}-linux-gnu +%endif +# gcc_target_platform holds the host (executing the compiler) +# cross_gcc_target_platform holds the target (for which the compiler is producing binaries) +# prefix for cross compiler +%define _prefix /opt/cross +# strip of 'foreign arch' symbols fails +%define __strip /bin/true +# sysroot for cross-compiler +%define crosssysroot %{_prefix}/%{cross_gcc_target_platform}/sys-root +# flag +%define crossbuild 1 +# macros in buildrequires is hard to expand for the scheduler (e.g. crossarch) which would make this easier. +%if %{bootstrap} == 2 +%define cross_deps cross-%{crossarch}-glibc-headers cross-%{crossarch}-libxcrypt-devel cross-%{crossarch}-kernel-headers cross-%{crossarch}-binutils +%endif +%if %{bootstrap} == 0 +%define cross_deps cross-%{crossarch}-glibc cross-%{crossarch}-glibc-devel cross-%{crossarch}-libxcrypt cross-%{crossarch}-libxcrypt-devel cross-%{crossarch}-glibc-headers cross-%{crossarch}-kernel-headers cross-%{crossarch}-binutils +%endif +%if %{bootstrap} == 1 +%define cross_deps cross-%{crossarch}-kernel-headers cross-%{crossarch}-binutils +%endif + +BuildRequires: %{cross_deps} + +# Fixme: find way to make this without listing every package +%if "%{crossarch}" == "armv5tel" +%define crossextraconfig %{nil} +%endif +%if "%{crossarch}" == "armv6l" +%define crossextraconfig --with-fpu=vfp --with-arch=armv6 +%endif +%if "%{crossarch}" == "armv7l" +%define crossextraconfig --with-fpu=vfpv3-d16 --with-arch=armv7-a +%endif +%if "%{crossarch}" == "armv7hl" +%define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a --with-mode=thumb +%endif +%if "%{crossarch}" == "armv7nhl" +%define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a +%endif +%if "%{crossarch}" == "armv7thl" +%define crossextraconfig --with-float=hard --with-fpu=vfpv3-d16 --with-arch=armv7-a --with-mode=thumb +%endif +%if "%{crossarch}" == "armv7tnhl" +%define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a --with-mode=thumb +%endif +%if "%{crossarch}" == "mipsel" +%define crossextraconfig --disable-fixed-point --disable-ssp --disable-libstdcxx-pch --with-arch=mips32 +%endif +%if "%{crossarch}" == "i486" +%define crossextraconfig --disable-libstdcxx-pch --with-arch=i686 --with-fpmatch=sse --with-gnu-as=/opt/cross/bin/i486-meego-linux-gnu-as --with-gnu-ld=/opt/cross/bin/i486-meego-linux-gnu-ld --with-as=/opt/cross/bin/i486-meego-linux-gnu-as --with-ld=/opt/cross/bin/i486-meego-linux-gnu-ld +%endif +%if "%{crossarch}" == "x86_64" +%define crossextraconfig --disable-libstdcxx-pch +%endif +%if "%{crossarch}" == "aarch64" +%define crossextraconfig --with-arch=armv8-a +%endif + +# single target atm. +ExclusiveArch: %ix86 x86_64 +# +# /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ +# end crossbuild / accelerator section +%endif + +%global binsuffix -13 +%global gcc_version 13.3.1 +%global gcc_release 1 +%global _unpackaged_files_terminate_build 0 +%global _performance_build 1 +%global build_ada 0 +%global build_objc 0 +%global build_go 1 +%global build_d 0 +%global include_gappletviewer 0 +%global build_libstdcxx_doc 0 +%global multilib_64_archs %{nil} +%ifarch x86_64 +%global multilib_32_arch i686 +%endif +%global build_64bit_multilib 0 +%ifarch %{ix86} x86_64 +%global build_libquadmath 1 +%else +%global build_libquadmath 0 +%endif +%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 +%global build_libasan 1 +%else +%global build_libasan 0 +%endif +%ifarch x86_64 ppc64 ppc64le aarch64 +%global build_libtsan 1 +%else +%global build_libtsan 0 +%endif +%ifarch x86_64 ppc64 ppc64le aarch64 +%global build_liblsan 1 +%else +%global build_liblsan 0 +%endif +%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 +%global build_libubsan 1 +%else +%global build_libubsan 0 +%endif +%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips} +%global build_libatomic 1 +%else +%global build_libatomic 0 +%endif +%ifarch %{ix86} x86_64 %{arm} alpha ppc ppc64 ppc64le ppc64p7 s390 s390x aarch64 +%global build_libitm 1 +%else +%global build_libitm 0 +%endif +%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips} +%global attr_ifunc 1 +%else +%global attr_ifunc 0 +%endif +#GCC Graphite needs isl +%global build_isl 1 + +Summary: Various compilers (C, C++, Objective-C, Java, ...) +Version: 13.3.1 +%if %{bootstrap} +Release: 0.%{bootstrap}.%{gcc_release} +%else +Release: %{gcc_release} +%endif +License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD +URL: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads +Source0: %{name}-%{version}.tar.xz +Source1: isl-0.24.tar.bz2 +Source3: gcc-rpmlintrc +Source4: baselibs.conf +Source5: precheckin.sh +Source6: aaa_README.PACKAGER +Patch0: gcc13-hack.patch +Patch2: gcc13-sparc-config-detection.patch +Patch3: gcc13-libgomp-omp_h-multilib.patch +Patch4: gcc13-libtool-no-rpath.patch +Patch5: gcc13-isl-dl.patch +Patch6: gcc13-isl-dl2.patch +Patch7: gcc13-libstdc++-docs.patch +Patch8: gcc13-no-add-needed.patch +Patch9: gcc13-Wno-format-security.patch +Patch10: gcc13-rh1574936.patch +Patch11: gcc13-d-shared-libphobos.patch +Patch12: gcc13-reproducible-builds.patch +Patch13: gcc13-reproducible-builds-buildid-for-checksum.patch + +Patch50: isl-rh2155127.patch + +Patch100: gcc13-fortran-fdec-duplicates.patch + +BuildRequires: binutils >= 2.31 +BuildRequires: glibc-static +BuildRequires: zlib-devel, gettext, bison, flex +BuildRequires: mpc-devel +BuildRequires: glibc-devel >= 2.4.90-13 +BuildRequires: elfutils-devel >= 0.147 +BuildRequires: libstdc++-devel +BuildRequires: libgomp +BuildRequires: libxcrypt-devel +BuildRequires: libzstd-devel + +%if %{build_libstdcxx_doc} +BuildRequires: doxygen +BuildRequires: graphviz +%endif + +%if !%{crossbuild} +Requires: cpp = %{version}-%{release} +Requires: libgcc >= %{version}-%{release} +Requires: libgomp = %{version}-%{release} +Requires: glibc-devel +Requires: binutils >= 2.25 +%endif + +%if !%{crossbuild} + +%if %{build_64bit_multilib} +Requires: glibc64bit-helper +%endif + +%if %{build_go} +BuildRequires: net-tools, procps +%endif + +Obsoletes: gcc < %{version}-%{release} +AutoReq: true +# /!crossbuild +%endif + +#We need -gnueabi indicator for ARM +%ifnarch %{arm} aarch64 +%global _gnu %{nil} +%endif +%global gcc_target_platform %{_target_platform} + +%description +The gcc package contains the GNU Compiler Collection version 4.9. +You'll need this package in order to compile C code. + +%if !%{crossbuild} +%package doc +Summary: Documentation for %{name} +Requires: %{name} = %{version}-%{release} + +%description doc +Man and info pages for %{name}. +# !crossbuild +%endif + +%package -n libgcc +Summary: GCC version 13.3 shared support library +Obsoletes: libgcc < %{version}-%{release} +Autoreq: true +%if "%{version}" != "%{gcc_version}" +Provides: libgcc = %{gcc_version} +%endif + +%description -n libgcc +This package contains GCC shared support library which is needed +e.g. for exception handling support. + +%package c++ +Summary: C++ support for GCC +Requires: gcc = %{version}-%{release} +Requires: libstdc++ = %{version}-%{release} +Requires: libstdc++-devel = %{version}-%{release} +Obsoletes: gcc-c++ < %{version}-%{release} +Autoreq: true + +%description c++ +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 libstdc++ +Summary: GNU Standard C++ Library +Obsoletes: libstdc++ < %{version}-%{release} +Obsoletes: libstdc++6 < %{version}-%{release} +Autoreq: true +Requires: glibc + +%description -n libstdc++ +The libstdc++ package contains a rewritten standard compliant GCC Standard +C++ Library. + +%package -n libstdc++-devel +Summary: Header files and libraries for C++ development +Requires: libstdc++ = %{version}-%{release} +Obsoletes: libstdc++-devel < %{version}-%{release} +Autoreq: true + +%description -n libstdc++-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 libstdc++-static +Summary: Static libraries for the GNU standard C++ library +Requires: libstdc++-devel = %{version}-%{release} +Autoreq: true + +%description -n libstdc++-static +Static libraries for the GNU standard C++ library. + +%if !%{crossbuild} +%package -n libstdc++-doc +Summary: Documentation for the GNU standard C++ library +Requires: libstdc++ = %{version}-%{release} +Obsoletes: libstdc++-docs +Autoreq: true + +%description -n libstdc++-doc +Manual, doxygen generated API information and Frequently Asked Questions +for the GNU standard C++ library. +# !crossbuild +%endif + +%package -n libgomp +Summary: GCC OpenMP v4.5 shared support library +Obsoletes: libgomp < %{version}-%{release} + +%description -n libgomp +This package contains GCC shared support library which is needed +for OpenMP v3.0 support. + +%package -n libquadmath +Summary: GCC __float128 shared support library + +%description -n libquadmath +This package contains GCC shared support library which is needed +for __float128 math support and for Fortran REAL*16 support. + +%package -n libquadmath-devel +Summary: GCC __float128 support +Requires: libquadmath = %{version}-%{release} +Requires: gcc = %{version}-%{release} + +%description -n libquadmath-devel +This package contains headers for building Fortran programs using +REAL*16 and programs using __float128 math. + +%package -n libquadmath-static +Summary: Static libraries for __float128 support +Requires: libquadmath-devel = %{version}-%{release} + +%description -n libquadmath-static +This package contains static libraries for building Fortran programs +using REAL*16 and programs using __float128 math. + +%package -n libitm +Summary: The GNU Transactional Memory library + +%description -n libitm +This package contains the GNU Transactional Memory library +which is a GCC transactional memory support runtime library. + +%package -n libitm-devel +Summary: The GNU Transactional Memory support +Requires: libitm = %{version}-%{release} +Requires: gcc = %{version}-%{release} + +%description -n libitm-devel +This package contains headers and support files for the +GNU Transactional Memory library. + +%package -n libitm-static +Summary: The GNU Transactional Memory static library +Requires: libitm-devel = %{version}-%{release} + +%description -n libitm-static +This package contains GNU Transactional Memory static libraries. + +%package -n libatomic +Summary: The GNU Atomic library + +%description -n libatomic +This package contains the GNU Atomic library +which is a GCC support runtime library for atomic operations not supported +by hardware. + +%package -n libatomic-static +Summary: The GNU Atomic static library +Requires: libatomic = %{version}-%{release} + +%description -n libatomic-static +This package contains GNU Atomic static libraries. + +%package -n libasan +Summary: The Address Sanitizer runtime library + +%description -n libasan +This package contains the Address Sanitizer library +which is used for -fsanitize=address instrumented programs. + +%package -n libasan-static +Summary: The Address Sanitizer static library +Requires: libasan = %{version}-%{release} + +%description -n libasan-static +This package contains Address Sanitizer static runtime library. + +%package -n libtsan +Summary: The Thread Sanitizer runtime library + +%description -n libtsan +This package contains the Thread Sanitizer library +which is used for -fsanitize=thread instrumented programs. + +%package -n libtsan-static +Summary: The Thread Sanitizer static library +Requires: libtsan = %{version}-%{release} + +%description -n libtsan-static +This package contains Thread Sanitizer static runtime library. + +%package -n libubsan +Summary: The Undefined Behavior Sanitizer runtime library + +%description -n libubsan +This package contains the Undefined Behavior Sanitizer library +which is used for -fsanitize=undefined instrumented programs. + +%package -n libubsan-static +Summary: The Undefined Behavior Sanitizer static library +Requires: libubsan = %{version}-%{release} + +%description -n libubsan-static +This package contains Undefined Behavior Sanitizer static runtime library. + +%package -n liblsan +Summary: The Leak Sanitizer runtime library + +%description -n liblsan +This package contains the Leak Sanitizer library +which is used for -fsanitize=leak instrumented programs. + +%package -n liblsan-static +Summary: The Leak Sanitizer static library +Requires: liblsan = %{version}-%{release} + +%description -n liblsan-static +This package contains Leak Sanitizer static runtime library. + +%package -n cpp +Summary: The C Preprocessor +Requires: mpc +Obsoletes: cpp < %{version}-%{release} +Autoreq: true + +%description -n cpp +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 +compilation. It is called a macro processor because it allows +you to define macros, abbreviations for longer +constructs. + +The C preprocessor provides four separate functionalities: the +inclusion of header files (files of declarations that can be +substituted into your program); macro expansion (you can define macros, +and the C preprocessor will replace the macros with their definitions +throughout the program); conditional compilation (using special +preprocessing directives, you can include or exclude parts of the +program according to various conditions); and line control (if you use +a program to combine or rearrange source files into an intermediate +file which is then compiled, you can use line control to inform the +compiler about where each source line originated). + +You should install this package if you are a C programmer and you use +macros. + +%package -n gcc-multilib +Summary: for 64bit multilib support +Autoreq: true + +%description -n gcc-multilib +This is one set of libraries which support 64bit multilib on top of +32bit enviroment from compiler side. + +%package go +Summary: Go support +Requires: gcc = %{version}-%{release} +Requires: libgo = %{version}-%{release} +Requires: libgo-devel = %{version}-%{release} +Provides: gccgo = %{version}-%{release} +Autoreq: true + +%description go +The gcc-go package provides support for compiling Go programs +with the GNU Compiler Collection. + +%package -n libgo +Summary: Go runtime +Autoreq: true + +%description -n libgo +This package contains Go shared library which is needed to run +Go dynamically linked programs. + +%package -n libgo-devel +Summary: Go development libraries +Requires: libgo = %{version}-%{release} +Autoreq: true + +%description -n libgo-devel +This package includes libraries and support files for compiling +Go programs. + +%package -n libgo-static +Summary: Static Go libraries +Requires: libgo = %{version}-%{release} +Requires: gcc = %{version}-%{release} + +%description -n libgo-static +This package contains static Go libraries. + +%package plugin-devel +Summary: Support for compiling GCC plugins +Requires: gcc = %{version}-%{release} +Requires: gmp-devel >= 4.1.2-8, mpfr-devel >= 3.1.0, libmpc-devel >= 0.8.1 + +%description plugin-devel +This package contains header files and other support files +for compiling GCC plugins. The GCC plugin ABI is currently +not stable, so plugins must be rebuilt any time GCC is updated. + +%prep +%setup -q -n %{name}-%{version}/upstream + +# Extract isl sources +tar xfj %{SOURCE1} + +%patch0 -p0 -b .hack~ +%patch2 -p0 -b .sparc-config-detection~ +%patch3 -p0 -b .libgomp-omp_h-multilib~ +%patch4 -p0 -b .libtool-no-rpath~ +%patch5 -p0 -b .isl-dl~ +%patch6 -p0 -b .isl-dl2~ +%patch7 -p0 -b .libstdc++-docs~ +%patch8 -p0 -b .no-add-needed~ +%patch9 -p0 -b .Wno-format-security~ +%patch10 -p0 -b .rh1574936~ +%patch11 -p0 -b .d-shared-libphobos~ +%patch12 -p0 -b .reproducible-builds~ +%patch13 -p1 -b .reproducible-builds-buildid-for-checksum~ + +%patch50 -p0 -b .rh2155127~ +touch -r isl-0.24/m4/ax_prog_cxx_for_build.m4 isl-0.24/m4/ax_prog_cc_for_build.m4 + +%patch100 -p1 -b .fortran-fdec-duplicates~ + +echo 'Sailfish OS gcc %{version}-%{gcc_release}' > gcc/DEV-PHASE + +cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h + +./contrib/gcc_update --touch + +LC_ALL=C sed -i -e 's/\xa0/ /' gcc/doc/options.texi + +%build + +rm -fr obj-%{gcc_target_platform} +mkdir obj-%{gcc_target_platform} +cd obj-%{gcc_target_platform} + +%if %{build_isl} +mkdir isl-build isl-install +%ifarch s390 s390x +ISL_FLAG_PIC=-fPIC +%else +ISL_FLAG_PIC=-fpic +%endif +cd isl-build +../../isl-%{isl_version}/configure --disable-shared \ + CC=/usr/bin/gcc CXX=/usr/bin/g++ \ + CFLAGS="${CFLAGS:-%optflags} $ISL_FLAG_PIC" --prefix=`cd ..; pwd`/isl-install +make %{?_smp_mflags} +make %{?_smp_mflags} install +cd .. +%endif + +CC=gcc +OPT_FLAGS="%{optflags}" +OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=[123]//g'` +OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[123]//g'` +OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/\(-Wp,\)\?-U_FORTIFY_SOURCE//g'` +OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'` +%ifarch %{ix86} +OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-march=i.86//g'` +%endif +OPT_FLAGS=`echo $OPT_FLAGS| sed -e 's/[[:blank:]]\+/ /g'` +OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-fno-omit-frame-pointer//g;s/-mbackchain//g;s/-mno-omit-leaf-frame-pointer//g'` +OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-Werror=format-security/-Wformat-security/g'` +case "$OPT_FLAGS" in + *-fasynchronous-unwind-tables*) + sed -i -e 's/-fno-exceptions /-fno-exceptions -fno-asynchronous-unwind-tables/' \ + ../gcc/Makefile.in + ;; +esac + +%ifarch mipsel +# Apply this in case you ever need to qemu bootstrap --cvm +# +# export OPT_FLAGS="$OPT_FLAGS --param ggc-min-expand=0 --param ggc-min-heapsize=65536" +%endif + +%ifarch %arm aarch64 + +%define ARM_EXTRA_CONFIGURE "" +# for armv7hl reset the gcc specs +%ifarch armv6l +%define ARM_EXTRA_CONFIGURE --with-fpu=vfp --with-arch=armv6 +%endif +%ifarch armv7l +%define ARM_EXTRA_CONFIGURE --with-fpu=vfpv3-d16 --with-arch=armv7-a +%endif +%ifarch armv7hl +%define ARM_EXTRA_CONFIGURE --with-float=hard --with-fpu=neon --with-mode=thumb --with-arch=armv7-a +%endif +# for armv7nhl reset the gcc specs +%ifarch armv7nhl +%define ARM_EXTRA_CONFIGURE --with-float=hard --with-fpu=neon --with-arch=armv7-a +%endif +# for armv7thl reset the gcc specs +%ifarch armv7thl +%define ARM_EXTRA_CONFIGURE --with-float=hard --with-fpu=vfpv3-d16 --with-arch=armv7-a --with-mode=thumb +%endif +# for armv7tnhl reset the gcc specs +%ifarch armv7tnhl +%define ARM_EXTRA_CONFIGURE --with-float=hard --with-fpu=neon --with-arch=armv7-a --with-mode=thumb +%endif +# aarch64 +%ifarch aarch64 +%define ARM_EXTRA_CONFIGURE --with-arch=armv8-a +%endif +%endif + +#export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s/-O2/-O2 -fkeep-inline-functions/g"` +export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s/-fstack-protector//g"` + +%if %{build_go} +enablelgo=,go +%else +enablelgo= +%endif + +%if %{crossbuild} +# cross build +export PATH=/opt/cross/bin:$PATH +# strip all after -march . no arch specific options in cross-compiler build . +# -march=core2 -mssse3 -mtune=atom -mfpmath=sse -fasynchronous-unwi +export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g" | sed -e 's#\-mtune=.*##g` +%endif + +CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ + GCJFLAGS="$OPT_FLAGS" \ + ../configure --prefix=%{_prefix} --mandir=%{_mandir} \ +%if !%{crossbuild} +%if ! 0%{?qemu_user_space_build} + --enable-bootstrap \ +%else + --disable-bootstrap \ +%endif +%else + --disable-bootstrap \ +%endif + --with-bugurl=https://git.sailfishos.org/ \ + --build=%{gcc_target_platform} \ +%if %{build_isl} + --with-isl=`pwd`/isl-install \ +%endif +%if %{crossbuild} + --host=%{gcc_target_platform} \ + --target=%{cross_gcc_target_platform} \ + --with-sysroot=%{crosssysroot} \ + --disable-multilib \ +%else +%ifarch mipsel + --disable-fixed-point \ + --disable-ssp \ + --disable-libstdcxx-pch \ + --with-arch=mips32 \ +%endif + --enable-plugin --enable-initfini-array\ +%ifarch %{arm} aarch64 + %ARM_EXTRA_CONFIGURE \ + --disable-sjlj-exceptions \ + --enable-gold \ + --with-plugin-ld=gold \ +%endif +%ifarch aarch64 x86_64 + --libdir=/usr/lib64 \ +%endif +%ifarch %{ix86} x86_64 + --with-tune=generic \ +%endif +%ifarch i586 + --with-arch=core2 --with-tune=atom --with-fpmath=sse \ +%endif +%ifarch i486 + --with-arch=i686 --with-fpmath=sse \ +%endif +%ifarch x86_64 + --disable-libstdcxx-pch \ +%endif +%endif +%if %{build_64bit_multilib} + --enable-targets=all \ + --enable-multilib \ +%else + --disable-multilib \ +%endif + --enable-checking=release \ + --disable-fixed-point \ + --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions \ + --enable-libstdcxx-backtrace --with-libstdcxx-zoneinfo=%{_datadir}/zoneinfo \ + --enable-gnu-unique-object \ + --enable-lto \ + --enable-linker-build-id \ + --disable-libmpx \ + --program-suffix=%{binsuffix} \ +%if %{bootstrap} == 0 + --enable-languages=c,c++${enablelgo},lto \ + --enable-threads=posix \ + --enable-shared \ +%endif +%if %{bootstrap} == 1 + --enable-languages=c \ + --without-headers \ + --with-newlib \ + --disable-decimal-float \ + --disable-fixed-point \ + --disable-threads \ + --disable-shared \ + --disable-libssp \ + --disable-libgomp \ + --disable-libquadmath \ +%endif +%if %{bootstrap} == 2 + --enable-languages=c \ + --with-sysroot=%{crosssysroot} \ + --disable-libssp \ + --disable-libgomp \ + --disable-libquadmath \ +%endif + --disable-libgcj \ + --disable-libcilkrts \ +%if %{attr_ifunc} + --enable-gnu-indirect-function \ +%endif +%if %{crossbuild} + %{crossextraconfig} \ +%endif + --build=%{gcc_target_platform} || ( cat config.log ; exit 1 ) + +GCJFLAGS="$OPT_FLAGS" make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" + +# Make +#make -C gcc CC="./xgcc -B ./ -O2" all + +# Make generated man pages even if Pod::Man is not new enough +perl -pi -e 's/head3/head2/' ../contrib/texi2pod.pl +for i in ../gcc/doc/*.texi; do + cp -a $i $i.orig; sed 's/ftable/table/' $i.orig > $i +done +make %{?_smp_mflags} -C gcc generated-manpages +for i in ../gcc/doc/*.texi; do mv -f $i.orig $i; done + +# Make generated doxygen pages. +%if %{build_libstdcxx_doc} +cd %{gcc_target_platform}/libstdc++-v3 +make doc-html-doxygen +make doc-man-doxygen +cd ../.. +%endif + +# Clean any old compressed docs +if [ -d rpm.doc ]; then + find rpm.doc -name "*.bz2" -delete +fi + +# Copy various doc files here and there +cd .. +mkdir -p rpm.doc/gfortran rpm.doc/objc rpm.doc/gdc rpm.doc/libphobos +mkdir -p rpm.doc/go rpm.doc/libgo rpm.doc/libquadmath rpm.doc/libitm +mkdir -p rpm.doc/changelogs/{gcc/cp,gcc/ada,gcc/jit,libstdc++-v3,libobjc,libgomp,libcc1,libatomic,libsanitizer} + +for i in {gcc,gcc/cp,gcc/ada,gcc/jit,libstdc++-v3,libobjc,libgomp,libcc1,libatomic,libsanitizer}/ChangeLog*; do + cp -p $i rpm.doc/changelogs/$i +done + +%if %{build_objc} +(cd libobjc; for i in README*; do + cp -p $i ../rpm.doc/objc/$i.libobjc +done) +%endif +%if %{build_d} +(cd gcc/d; for i in ChangeLog*; do + cp -p $i ../../rpm.doc/gdc/$i.gdc +done) +(cd libphobos; for i in ChangeLog*; do + cp -p $i ../rpm.doc/libphobos/$i.libphobos +done +cp -a src/LICENSE*.txt libdruntime/LICENSE ../rpm.doc/libphobos/) +%endif +%if %{build_libquadmath} +(cd libquadmath; for i in ChangeLog* COPYING.LIB; do + cp -p $i ../rpm.doc/libquadmath/$i.libquadmath +done) +%endif +%if %{build_libitm} +(cd libitm; for i in ChangeLog*; do + cp -p $i ../rpm.doc/libitm/$i.libitm +done) +%endif +%if %{build_go} +(cd gcc/go; for i in README* ChangeLog*; do + cp -p $i ../../rpm.doc/go/$i +done) +(cd libgo; for i in LICENSE* PATENTS* README; do + cp -p $i ../rpm.doc/libgo/$i.libgo +done) +%endif + +rm -f rpm.doc/changelogs/gcc/ChangeLog.[1-9] +find rpm.doc -name \*ChangeLog\* | xargs bzip2 -9 + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot} + +cd obj-%{gcc_target_platform} + +%if !%{crossbuild} +# native +TARGET_PLATFORM=%{gcc_target_platform} +# There are some MP bugs in libstdc++ Makefiles +make %{?_smp_mflags} -C %{gcc_target_platform}/libstdc++-v3 +%else +# cross build +export PATH=/opt/cross/bin:$PATH +# strip all after -march . no arch specific options in cross-compiler build . +# -march=core2 -mssse3 -mtune=atom -mfpmath=sse -fasynchronous-unwi +export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g"` +echo "$OPT_FLAGS" +TARGET_PLATFORM=%{cross_gcc_target_platform} +# There are some MP bugs in libstdc++ Makefiles +make %{?_smp_mflags} -C %{cross_gcc_target_platform}/libstdc++-v3 +%endif + +make %{?_smp_mflags} prefix=%{buildroot}%{_prefix} mandir=%{buildroot}%{_mandir} libdir=%{buildroot}%{_libdir} \ + install + +%if !%{crossbuild} +# native +# \/\/\/ +FULLPATH=%{buildroot}%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} + +mkdir -p $FULLPATH +mkdir -p $FULLEPATH + +ln -sf gcc %{buildroot}%{_prefix}/bin/cc +mkdir -p %{buildroot}/%{_lib} +ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp + +%if %{build_go} +mv %{buildroot}%{_prefix}/bin/go{,.gcc} +mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc} +%endif + +cxxconfig="`find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h`" +for i in `find %{gcc_target_platform}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do + if ! diff -up $cxxconfig $i; then + cat > %{buildroot}%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/bits/c++config.h < +#if __WORDSIZE == 32 +%ifarch %{multilib_64_archs} +`cat $(find %{gcc_target_platform}/32/libstdc++-v3/include -name c++config.h)` +%else +`cat $(find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h)` +%endif +#else +%ifarch %{multilib_64_archs} +`cat $(find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h)` +%else +`cat $(find %{gcc_target_platform}/64/libstdc++-v3/include -name c++config.h)` +%endif +#endif +#endif +EOF + break + fi +done + +for f in `find %{buildroot}%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/ -name c++config.h`; do + for i in 1 2 4 8; do + sed -i -e 's/#define _GLIBCXX_ATOMIC_BUILTINS_'$i' 1/#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_'$i'\ +&\ +#endif/' $f + done +done + +# Nuke bits/stdc++.h.gch dirs +# 1) there is no bits/stdc++.h header installed, so when gch file can't be +# used, compilation fails +# 2) sometimes it is hard to match the exact options used for building +# libstdc++-v3 or they aren't desirable +# 3) there are multilib issues, conflicts etc. with this +# 4) it is huge +# People can always precompile on their own whatever they want, but +# shipping this for everybody is unnecessary. +rm -rf %{buildroot}%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/bits/*.h.gch + +%if %{build_libstdcxx_doc} +libstdcxx_doc_builddir=%{gcc_target_platform}/libstdc++-v3/doc/doxygen +mkdir -p ../rpm.doc/libstdc++-v3 +cp -r -p ../libstdc++-v3/doc/html ../rpm.doc/libstdc++-v3/html +mv $libstdcxx_doc_builddir/html ../rpm.doc/libstdc++-v3/html/api +mkdir -p %{buildroot}%{_mandir} +mv $libstdcxx_doc_builddir/man/man3 %{buildroot}%{_mandir}/man3/ +find ../rpm.doc/libstdc++-v3 -name \*~ | xargs rm +%endif + +#Debug +#set -x +#find %{buildroot}%{_prefix}/ + +FULLLSUBDIR= +%ifarch sparcv9 ppc +FULLLSUBDIR=lib32 +%endif +%ifarch sparc64 ppc64 ppc64p7 +FULLLSUBDIR=lib64 +%endif +if [ -n "$FULLLSUBDIR" ]; then + FULLLPATH=$FULLPATH/$FULLLSUBDIR + mkdir -p $FULLLPATH +else + FULLLPATH=$FULLPATH +fi + +find %{buildroot} -name \*.la | xargs rm -f +%if %{build_d} +mv %{buildroot}%{_prefix}/%{_lib}/libgphobos.spec $FULLPATH/ +%endif +%if %{build_libitm} +mv %{buildroot}%{_prefix}/%{_lib}/libitm.spec $FULLPATH/ +%endif +%if %{build_libasan} +mv %{buildroot}%{_prefix}/%{_lib}/libsanitizer.spec $FULLPATH/ +%endif + +mkdir -p %{buildroot}/%{_lib} + +mv -f %{buildroot}%{_prefix}/%{_lib}/libgcc_s.so.1 %{buildroot}/%{_lib}/libgcc_s-%{gcc_version}.so.1 +chmod 755 %{buildroot}/%{_lib}/libgcc_s-%{gcc_version}.so.1 +ln -sf libgcc_s-%{gcc_version}.so.1 %{buildroot}/%{_lib}/libgcc_s.so.1 + +%ifarch %{ix86} x86_64 ppc ppc64 ppc64p7 ppc64le %{arm} aarch64 +rm -f $FULLPATH/libgcc_s.so +echo '/* GNU ld script + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ +OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`') +GROUP ( /%{_lib}/libgcc_s.so.1 libgcc.a )' > $FULLPATH/libgcc_s.so +%else +ln -sf /%{_lib}/libgcc_s.so.1 $FULLPATH/libgcc_s.so +%endif +%ifarch sparcv9 ppc +%ifarch ppc +rm -f $FULLPATH/64/libgcc_s.so +echo '/* GNU ld script + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ +OUTPUT_FORMAT('`gcc -m64 -Wl,--print-output-format -nostdlib -r -o /dev/null`') +GROUP ( /lib64/libgcc_s.so.1 libgcc.a )' > $FULLPATH/64/libgcc_s.so +%else +ln -sf /lib64/libgcc_s.so.1 $FULLPATH/64/libgcc_s.so +%endif +%endif +%ifarch %{multilib_64_archs} +%ifarch x86_64 ppc64 ppc64p7 +rm -f $FULLPATH/64/libgcc_s.so +echo '/* GNU ld script + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ +OUTPUT_FORMAT('`gcc -m32 -Wl,--print-output-format -nostdlib -r -o /dev/null`') +GROUP ( /%{_lib}/libgcc_s.so.1 libgcc.a )' > $FULLPATH/32/libgcc_s.so +%else +ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so +%endif +%endif + +mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/ + +mkdir -p %{buildroot}%{_prefix}/libexec/getconf +if gcc/xgcc -B gcc/ -E -P -dD -xc /dev/null | grep '__LONG_MAX__.*\(2147483647\|0x7fffffff\($\|[LU]\)\)'; then + ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_prefix}/libexec/getconf/default +else + ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_prefix}/libexec/getconf/default +fi + +mkdir -p %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib} +mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++*gdb.py* \ + %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/ + +pushd $FULLPATH +if [ "%{_lib}" = "lib" ]; then +%if %{build_objc} +ln -sf ../../../libobjc.so.4 libobjc.so +%endif +ln -sf ../../../libstdc++.so.6.*[0-9] libstdc++.so +ln -sf ../../../libgomp.so.1.* libgomp.so +%if %{build_go} +ln -sf ../../../libgo.so.22.* libgo.so +%endif +%if %{build_libquadmath} +ln -sf ../../../libquadmath.so.0.* libquadmath.so +%endif +%if %{build_d} +ln -sf ../../../libgdruntime.so.4.* libgdruntime.so +ln -sf ../../../libgphobos.so.4.* libgphobos.so +%endif +%if %{build_libitm} +ln -sf ../../../libitm.so.1.* libitm.so +%endif +%if %{build_libatomic} +ln -sf ../../../libatomic.so.1.* libatomic.so +%endif +%if %{build_libasan} +ln -sf ../../../libasan.so.8.* libasan.so +mv ../../../libasan_preinit.o libasan_preinit.o +%endif +%if %{build_libubsan} +ln -sf ../../../libubsan.so.1.* libubsan.so +%endif +else +%if %{build_objc} +ln -sf ../../../../%{_lib}/libobjc.so.4 libobjc.so +%endif +ln -sf ../../../../%{_lib}/libstdc++.so.6.*[0-9] libstdc++.so +ln -sf ../../../../%{_lib}/libgomp.so.1.* libgomp.so +%if %{build_go} +ln -sf ../../../../%{_lib}/libgo.so.22.* libgo.so +%endif +%if %{build_libquadmath} +ln -sf ../../../../%{_lib}/libquadmath.so.0.* libquadmath.so +%endif +%if %{build_d} +ln -sf ../../../../%{_lib}/libgdruntime.so.4.* libgdruntime.so +ln -sf ../../../../%{_lib}/libgphobos.so.4.* libgphobos.so +%endif +%if %{build_libitm} +ln -sf ../../../../%{_lib}/libitm.so.1.* libitm.so +%endif +%if %{build_libatomic} +ln -sf ../../../../%{_lib}/libatomic.so.1.* libatomic.so +%endif +%if %{build_libasan} +ln -sf ../../../../%{_lib}/libasan.so.8.* libasan.so +mv ../../../../%{_lib}/libasan_preinit.o libasan_preinit.o +%endif +%if %{build_libubsan} +ln -sf ../../../../%{_lib}/libubsan.so.1.* libubsan.so +%endif +%if %{build_go} +ln -sf ../../../../%{_lib}/libgo.so.22.* libgo.so +%endif +%if %{build_libtsan} +rm -f libtsan.so +echo 'INPUT ( %{_prefix}/%{_lib}/'`echo ../../../../%{_lib}/libtsan.so.2.* | sed 's,^.*libt,libt,'`' )' > libtsan.so +mv ../../../../%{_lib}/libtsan_preinit.o libtsan_preinit.o +%endif +%if %{build_liblsan} +rm -f liblsan.so +echo 'INPUT ( %{_prefix}/%{_lib}/'`echo ../../../../%{_lib}/liblsan.so.0.* | sed 's,^.*libl,libl,'`' )' > liblsan.so +mv ../../../../%{_lib}/liblsan_preinit.o liblsan_preinit.o +%endif +fi +mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++.*a $FULLLPATH/ +mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++fs.*a $FULLLPATH/ +mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++exp.*a $FULLLPATH/ +mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++_libbacktrace.*a $FULLLPATH/ +mv -f %{buildroot}%{_prefix}/%{_lib}/libsupc++.*a $FULLLPATH/ +%if %{build_objc} +mv -f %{buildroot}%{_prefix}/%{_lib}/libobjc.*a . +%endif +mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.*a . +%if %{build_libquadmath} +mv -f %{buildroot}%{_prefix}/%{_lib}/libquadmath.*a $FULLLPATH/ +%endif +%if %{build_d} +mv -f %{buildroot}%{_prefix}/%{_lib}/libgdruntime.*a $FULLLPATH/ +mv -f %{buildroot}%{_prefix}/%{_lib}/libgphobos.*a $FULLLPATH/ +%endif +%if %{build_libitm} +mv -f %{buildroot}%{_prefix}/%{_lib}/libitm.*a $FULLLPATH/ +%endif +%if %{build_libatomic} +mv -f %{buildroot}%{_prefix}/%{_lib}/libatomic.*a $FULLLPATH/ +%endif +%if %{build_libasan} +mv -f %{buildroot}%{_prefix}/%{_lib}/libasan.*a $FULLLPATH/ +%endif +%if %{build_libubsan} +mv -f %{buildroot}%{_prefix}/%{_lib}/libubsan.*a $FULLLPATH/ +%endif +%if %{build_libtsan} +mv -f %{buildroot}%{_prefix}/%{_lib}/libtsan.*a $FULLPATH/ +%endif +%if %{build_liblsan} +mv -f %{buildroot}%{_prefix}/%{_lib}/liblsan.*a $FULLPATH/ +%endif +%if %{build_go} +mv -f %{buildroot}%{_prefix}/%{_lib}/libgo.*a $FULLLPATH/ +mv -f %{buildroot}%{_prefix}/%{_lib}/libgobegin.*a $FULLLPATH/ +mv -f %{buildroot}%{_prefix}/%{_lib}/libgolibbegin.*a $FULLLPATH/ +%endif + + +%ifarch %{multilib_64_archs} +mkdir -p 32 +ln -sf ../../../../libobjc.so.4 32/libobjc.so +ln -sf ../`echo ../../../../lib64/libstdc++.so.6.* | sed s~/../lib64/~/~` 32/libstdc++.so +ln -sf ../`echo ../../../../lib64/libgomp.so.1.* | sed s~/../lib64/~/~` 32/libgomp.so +%if %{build_libquadmath} +rm -f libquadmath.so +echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libquadmath.so.0.* | sed 's,^.*libq,libq,'`' )' > libquadmath.so +echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libquadmath.so.0.* | sed 's,^.*libq,libq,'`' )' > 32/libquadmath.so +%endif +mv -f %{buildroot}%{_prefix}/lib/libsupc++.*a 32/ +%if %{build_objc} +mv -f %{buildroot}%{_prefix}/lib/libobjc.*a 32/ +%endif +mv -f %{buildroot}%{_prefix}/lib/libgomp.*a 32/ +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libstdc++.a 32/libstdc++.a +%if %{build_libquadmath} +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libquadmath.a 32/libquadmath.a +%endif +%if %{build_go} +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgo.a 32/libgo.a +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgobegin.a 32/libgobegin.a +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgolibbegin.a 32/libgolibbegin.a +%endif +%endif + +# If we are building a debug package then copy all of the static archives +# into the debug directory to keep them as unstripped copies. +%if 0%{?_enable_debug_packages} +for d in . $FULLLSUBDIR; do + mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{_lib}/debug%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/$d + for f in `find $d -maxdepth 1 -a \ + \( -name libasan.a -o -name libatomic.a \ + -o -name libcaf_single.a \ + -o -name libgcc.a -o -name libgcc_eh.a \ + -o -name libgcov.a \ + -o -name libgo.a -o -name libgobegin.a \ + -o -name libgolibbegin.a -o -name libgomp.a \ + -o -name libitm.a -o -name liblsan.a \ + -o -name libobjc.a -o -name libgdruntime.a -o -name libgphobos.a \ + -o -name libm2\*.a -o -name libquadmath.a -o -name libstdc++.a \ + -o -name libstdc++fs.a -o -name libstdc++exp.a \ + -o -name libstdc++_libbacktrace.a -o -name libsupc++.a \ + -o -name libtsan.a -o -name libubsan.a \) -a -type f`; do + cp -a $f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/debug%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/$d/ + done +done +%endif + +# Strip debug info from Fortran/ObjC/Java/Go static libraries +strip -g `find . \( -name libobjc.a -o -name libgomp.a \ + -o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a -o -name libgo.a \) -a -type f` +popd +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgomp.so.1.* +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.* +%if %{build_libquadmath} +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libquadmath.so.0.* +%endif +%if %{build_d} +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.4.* +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.4.* +%endif +%if %{build_libitm} +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libitm.so.1.* +%endif +%if %{build_libatomic} +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libatomic.so.1.* +%endif +%if %{build_libasan} +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libasan.so.8.* +%endif +%if %{build_libubsan} +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libubsan.so.1.* +%endif +%if %{build_libtsan} +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libtsan.so.2.* +%endif +%if %{build_liblsan} +chmod 755 %{buildroot}%{_prefix}/%{_lib}/liblsan.so.0.* +%endif +%if %{build_objc} +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libobjc.so.4.* +%endif + +%if %{build_ada} +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgnarl*so* +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgnat*so* +%endif + +for h in `find $FULLPATH/include -name \*.h`; do + if grep -q 'It has been auto-edited by fixincludes from' $h; then + rh=`grep -A2 'It has been auto-edited by fixincludes from' $h | tail -1 | sed 's|^.*"\(.*\)".*$|\1|'` + diff -up $rh $h || : + rm -f $h + fi +done + +cat > %{buildroot}%{_prefix}/bin/c89 <<"EOF" +#!/bin/sh +fl="-std=c89" +for opt; do + case "$opt" in + -ansi|-std=c89|-std=iso9899:1990) fl="";; + -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2 + exit 1;; + esac +done +exec gcc $fl ${1+"$@"} +EOF +cat > %{buildroot}%{_prefix}/bin/c99 <<"EOF" +#!/bin/sh +fl="-std=c99" +for opt; do + case "$opt" in + -std=c99|-std=iso9899:1999) fl="";; + -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2 + exit 1;; + esac +done +exec gcc $fl ${1+"$@"} +EOF +chmod 755 %{buildroot}%{_prefix}/bin/c?9 + +cd .. +%find_lang %{name}%{binsuffix} +%find_lang cpplib%{binsuffix} + +# Remove binaries we will not be including, so that they don't end up in +# gcc-debuginfo +rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} || : +rm -f $FULLEPATH/install-tools/{mkheaders,fixincl} +rm -f %{buildroot}%{_prefix}/lib/{32,64}/libiberty.a +rm -f %{buildroot}%{_prefix}/%{_lib}/libssp* +rm -f %{buildroot}%{_prefix}/%{_lib}/libvtv* || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gfortran || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gccgo || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcj || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ar || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-nm || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ranlib || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gdc || : + +%ifarch %{multilib_64_archs} +# Remove libraries for the other arch on multilib arches +rm -f %{buildroot}%{_prefix}/lib/lib*.so* +rm -f %{buildroot}%{_prefix}/lib/lib*.a +rm -f %{buildroot}/lib/libgcc_s*.so* +%if %{build_go} +rm -rf %{buildroot}%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform} +%ifnarch sparc64 ppc64 ppc64p7 +ln -sf %{multilib_32_arch}-%{_vendor}-%{_target_os} %{buildroot}%{_prefix}/lib/go/%{gcc_version}/%{gcc_target_platform} +%endif +%endif +%else +%ifarch sparcv9 ppc +rm -f %{buildroot}%{_prefix}/lib64/lib*.so* +rm -f %{buildroot}%{_prefix}/lib64/lib*.a +rm -f %{buildroot}/lib64/libgcc_s*.so* +%if %{build_go} +rm -rf %{buildroot}%{_prefix}/lib64/go/%{gcc_version}/%{gcc_target_platform} +%endif +%endif +%endif + +rm -f %{buildroot}%{mandir}/man3/ffi* +# /\/\/\ +# native +%else +# cross +# \/\/\/ +# additional install for cross +# remove some obsolete files +ln -sf %{cross_gcc_target_platform}-gcc%{binsuffix} %{buildroot}%{_prefix}/bin/%{cross_gcc_target_platform}-cc%{binsuffix} +set -x +rm -rRf %buildroot/%{_prefix}/lib/libiberty.a +rm -rRf %buildroot/%{_prefix}/share +find %{buildroot} -name \*.la | xargs rm -f +rm -rRf %buildroot/%{_prefix}/lib/libcc1* +set +x +# /\/\/\ +# cross +%endif + +%if !%{crossbuild} +#mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}/{,cp,objc,libobjc} +#install -m0644 -t %{buildroot}%{_docdir}/%{name}-%{version} \ +# gcc/README* rpm.doc/changelogs/gcc/ChangeLog* +#install -m0644 -t %{buildroot}%{_docdir}/%{name}-%{version}/cp \ +# rpm.doc/changelogs/gcc/cp/ChangeLog* +#install -m0644 -t %{buildroot}%{_docdir}/%{name}-%{version}/objc \ +# rpm.doc/objc/* +#install -m0644 -t %{buildroot}%{_docdir}/%{name}-%{version}/libobjc \ +# libobjc/THREADS* rpm.doc/changelogs/libobjc/ChangeLog* +# +#mkdir -p %{buildroot}%{_docdir}/libstdc++-%{version} +#install -m0644 -t %{buildroot}%{_docdir}/libstdc++-%{version} \ +# rpm.doc/changelogs/libstdc++-v3/ChangeLog* libstdc++-v3/README* +#%if %{build_libstdcxx_doc} +#mv rpm.doc/libstdc++-v3/html %{buildroot}%{_docdir}/libstdc++-%{version}/html +#%endif +# +#mkdir -p %{buildroot}%{_docdir}/libgomp-%{version} +#install -m0644 -t %{buildroot}%{_docdir}/libgomp-%{version} \ +# rpm.doc/changelogs/libgomp/ChangeLog* +# +#%if %{build_libquadmath} +#mkdir -p %{buildroot}%{_docdir}/libquadmath-%{version} +#install -m0644 -t %{buildroot}%{_docdir}/libquadmath-%{version} \ +# rpm.doc/libquadmath/ChangeLog* +#%endif +# !crossbuild +%endif + +%if !%{crossbuild} +# checking and split packaging for native ... +# native +# \/\/\/ + +# Clean up info dir +rm -rf %{buildroot}%{_datadir}info/dir + +# Help plugins find out nvra. +echo gcc-%{version}.%{_arch} > $FULLPATH/rpmver + +%check +%if 0 +cd obj-%{gcc_target_platform} + +# run the tests. +make %{?_smp_mflags} -k check ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=g++ RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector-strong}'" || : +echo ====================TESTING========================= +( LC_ALL=C ../contrib/test_summary || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}' +echo ====================TESTING END===================== +mkdir testlogs-%{_target_platform}-%{version}-%{release} +for i in `find . -name \*.log | grep -F testsuite/ | grep -v 'config.log\|acats\|ada'`; do + ln $i testlogs-%{_target_platform}-%{version}-%{release}/ || : +done +tar cf - testlogs-%{_target_platform}-%{version}-%{release} | bzip2 -9c \ + | uuencode testlogs-%{_target_platform}.tar.bz2 || : +rm -rf testlogs-%{_target_platform}-%{version}-%{release} +%endif + +# Don't add %post -p /sbin/ldconfig here, see comment below + +%postun -p /sbin/ldconfig + +# Because glibc Prereq's libgcc and /sbin/ldconfig +# comes from glibc, it might not exist yet when +# libgcc is installed +%post -n libgcc -p +if posix.access ("/sbin/ldconfig", "x") then + local pid = posix.fork () + if pid == 0 then + posix.exec ("/sbin/ldconfig") + elseif pid ~= -1 then + posix.wait (pid) + end +end + +%postun -n libgcc -p +if posix.access ("/sbin/ldconfig", "x") then + local pid = posix.fork () + if pid == 0 then + posix.exec ("/sbin/ldconfig") + elseif pid ~= -1 then + posix.wait (pid) + end +end + +%post -n libstdc++ -p /sbin/ldconfig + +%postun -n libstdc++ -p /sbin/ldconfig + +%post -n libgomp -p /sbin/ldconfig + +%postun -n libgomp -p /sbin/ldconfig + +%post -n libquadmath -p /sbin/ldconfig + +%postun -n libquadmath -p /sbin/ldconfig + +%post -n libitm -p /sbin/ldconfig + +%postun -n libitm -p /sbin/ldconfig + +%post -n libatomic -p /sbin/ldconfig + +%postun -n libatomic -p /sbin/ldconfig + +%post -n libasan -p /sbin/ldconfig + +%postun -n libasan -p /sbin/ldconfig + +%post -n libubsan -p /sbin/ldconfig + +%postun -n libubsan -p /sbin/ldconfig + +%post -n libtsan -p /sbin/ldconfig + +%postun -n libtsan -p /sbin/ldconfig + +%post -n liblsan -p /sbin/ldconfig + +%postun -n liblsan -p /sbin/ldconfig + +%files -f %{name}.lang +%defattr(-,root,root,-) +%{_prefix}/bin/cc%{binsuffix} +%{_prefix}/bin/c89%{binsuffix} +%{_prefix}/bin/c99%{binsuffix} +%{_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} +#%ifnarch %%{arm} aarch64 mipsel +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ar +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-nm +#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ranlib +#%endif +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/libexec/gcc +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include + +# Shouldn't include all files under this fold, split to diff pkgs +#%%{_prefix}/libexec/gcc/%%{gcc_target_platform}/%%{gcc_version}/* +#%if !%%{crossbuild} +%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 +%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper +%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.so* +#%endif + +%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 + +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/plugin +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include/* + +# Shouldn't include all files under this fold, split to diff pkgs +#%%{_prefix}/%%{_lib}/gcc/%%{gcc_target_platform}/%%{gcc_version}/include/* +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/rpmver +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stddef.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdarg.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/varargs.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdfix.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/float.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/limits.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdbool.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/iso646.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/syslimits.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/unwind.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/omp.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/openacc.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/acc_prof.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdint.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdint-gcc.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdalign.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdnoreturn.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdatomic.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/gcov.h +%ifarch %{ix86} x86_64 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/mmintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/xmmintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/emmintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/pmmintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/tmmintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/ammintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/smmintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/nmmintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/bmmintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/wmmintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/immintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avxintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/x86intrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/fma4intrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/xopintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/lwpintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/popcntintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/bmiintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/tbmintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/ia32intrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx2intrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/bmi2intrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/f16cintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/fmaintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/lzcntintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/rtmintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/xtestintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/adxintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/prfchwintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/rdseedintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/fxsrintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/xsaveintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/xsaveoptintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512cdintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512erintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512fintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512pfintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/shaintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/mm_malloc.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/mm3dnow.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/cpuid.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/cross-stdarg.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512bwintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512dqintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512ifmaintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512ifmavlintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vbmiintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vbmivlintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vlbwintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vldqintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vlintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/clflushoptintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/clwbintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/mwaitxintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/xsavecintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/xsavesintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/clzerointrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/pkuintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx5124fmapsintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx5124vnniwintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vpopcntdqintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/sgxintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/gfniintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/cetintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/cet.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vbmi2intrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vbmi2vlintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vnniintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vnnivlintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/vaesintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/vpclmulqdqintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vpopcntdqvlintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512bitalgintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/pconfigintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/wbnoinvdintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/movdirintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/waitpkgintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/cldemoteintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512bf16vlintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512bf16intrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/enqcmdintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vp2intersectintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vp2intersectvlintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/serializeintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/tsxldtrkintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/amxtileintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/amxint8intrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/amxbf16intrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/x86gprintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/uintrintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/hresetintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/keylockerintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avxvnniintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/mwaitintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512fp16intrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512fp16vlintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avxifmaintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avxvnniint8intrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avxneconvertintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/cmpccxaddintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/amxfp16intrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/prfchiintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/raointintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/amxcomplexintrin.h +%endif + +# For ARM port +%ifarch %{arm} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/README +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/unwind-arm-common.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/mmintrin.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_acle.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_cmse.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_fp16.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_bf16.h +%endif +%ifarch aarch64 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_acle.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_fp16.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_bf16.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_sve.h +%endif +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/ssp/ssp.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/ssp/stdio.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/ssp/string.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/ssp/unistd.h +%if %{build_libasan} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/sanitizer +%endif + +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/crt*.o +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgcc.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgcov.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgcc_eh.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgcc_s.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgomp.spec +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgomp.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgomp.so +%if %{build_libitm} +%ifarch aarch64 x86_64 +%{_prefix}/lib64/gcc/%{gcc_target_platform}/%{gcc_version}/libitm.spec +%else +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libitm.spec +%endif +%endif +%if %{build_libasan} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libsanitizer.spec +%endif +%ifarch sparcv9 ppc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/crt*.o +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcc.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcov.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcc_eh.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcc_s.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgomp.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgomp.so +%if %{build_libquadmath} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libquadmath.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libquadmath.so +%endif +%if %{build_libitm} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libitm.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libitm.so +%endif +%if %{build_libatomic} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libatomic.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libatomic.so +%endif +%if %{build_libasan} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libasan.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libasan.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libasan_preinit.o +%endif +%if %{build_libubsan} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libubsan.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libubsan.so +%endif +%endif +%ifarch %{multilib_64_archs} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/crt*.o +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgcc.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgcov.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgcc_eh.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgcc_s.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgomp.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgomp.so +%if %{build_libquadmath} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libquadmath.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libquadmath.so +%endif +%if %{build_libitm} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libitm.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libitm.so +%endif +%if %{build_libatomic} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libatomic.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libatomic.so +%endif +%if %{build_libasan} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libasan.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libasan.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libasan_preinit.o +%endif +%if %{build_libubsan} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libubsan.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libubsan.so +%endif +%endif +%ifarch sparcv9 sparc64 ppc ppc64 ppc64p7 +%if %{build_libquadmath} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.so +%endif +%if %{build_libitm} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libitm.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libitm.so +%endif +%if %{build_libatomic} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libatomic.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libatomic.so +%endif +%if %{build_libasan} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libasan.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libasan.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libasan_preinit.o +%endif +%if %{build_libubsan} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libubsan.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libubsan.so +%endif +%else +%if %{build_libatomic} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libatomic.so +%endif +%if %{build_libasan} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libasan.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libasan_preinit.o +%endif +%if %{build_libubsan} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libubsan.so +%endif +%endif +%if %{build_libtsan} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libtsan.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libtsan_preinit.o +%endif +%if %{build_liblsan} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/liblsan.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/liblsan_preinit.o +%endif +%{_prefix}/libexec/getconf/default +%doc gcc/README* rpm.doc/changelogs/gcc/ChangeLog* +%{!?_licensedir:%global license %%doc} +%license gcc/COPYING* COPYING.RUNTIME + +%if !%{crossbuild} +%files doc +%defattr(-,root,root,-) +%{_docdir}/%{name}-%{version} +%{_mandir}/man1/cpp%{binsuffix}.1* +%{_mandir}/man1/gcc%{binsuffix}.1* +%{_mandir}/man1/gcov%{binsuffix}.1* +%{_mandir}/man1/gcov-tool%{binsuffix}.1* +%{_mandir}/man1/gcov-dump%{binsuffix}.1* +%{_mandir}/man1/g++%{binsuffix}.1* +%{_mandir}/man1/lto-dump%{binsuffix}.1* +%{_mandir}/man7/* +# !crossbuild +%endif + +%files -n cpp -f cpplib.lang +%defattr(-,root,root,-) +/%{_lib}/cpp +%{_prefix}/bin/cpp +%dir %{_prefix}/libexec/gcc +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 + +%files -n libgcc +%defattr(-,root,root,-) +/%{_lib}/libgcc_s-%{gcc_version}.so.1 +/%{_lib}/libgcc_s.* +%license gcc/COPYING.LIB + +%files c++ +%defattr(-,root,root,-) +%ifnarch %{arm} aarch64 mipsel +%{_prefix}/bin/%{gcc_target_platform}-*++ +%endif +%{_prefix}/bin/g++%{binsuffix} +%{_prefix}/bin/c++%{binsuffix} +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/libexec/gcc +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus +%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/g++-mapper-server +%ifarch %{multilib_64_archs} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++fs.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++exp.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++_libbacktrace.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libsupc++.a +%endif +%ifarch %{multilib_64_archs} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++exp.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/stdc++fslibstdc++_libbacktrace.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a +%endif + +%files -n libstdc++ +%defattr(-,root,root,-) +%{_prefix}/%{_lib}/libstdc++.so.6* +%dir %{_datadir}/gdb +%dir %{_datadir}/gdb/auto-load +%dir %{_datadir}/gdb/auto-load/%{_prefix} +%dir %{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/ +%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc*gdb.py* +%dir %{_prefix}/share/gcc-%{gcc_version} +%{_prefix}/share/gcc-%{gcc_version}/python +%{_prefix}/share/gcc-%{gcc_version}/python/libstdcxx + +%files -n libstdc++-devel +%defattr(-,root,root,-) +%dir %{_prefix}/include/c++ +%dir %{_prefix}/include/c++/%{gcc_version} +%{_prefix}/include/c++/%{gcc_version} +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a +%ifnarch %{multilib_64_archs} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so +%endif +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++fs.a + +%files -n libstdc++-static +%defattr(-,root,root,-) +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a + +%if !%{crossbuild} +%if %{build_libstdcxx_doc} +%files -n libstdc++-doc +%defattr(-,root,root) +%{_mandir}/man3/* +%{_docdir}/libstdc++-%{version} +%endif +# !crossbuild +%endif + +%files -n libgomp +%defattr(-,root,root,-) +%{_prefix}/%{_lib}/libgomp.* + +%if %{build_64bit_multilib} +%files -n gcc-multilib +%defattr(-,root,root,-) +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/crt*.o +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcc.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcov.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcc_eh.a +%dir %{_prefix}/lib64 +%{_prefix}/lib64/* +%endif + +%if %{build_libquadmath} +%files -n libquadmath +%defattr(-,root,root,-) +%{_prefix}/%{_lib}/libquadmath.so.0* +%license rpm.doc/libquadmath/COPYING* + +%files -n libquadmath-devel +%defattr(-,root,root,-) +%{_prefix}/%{_lib}/libquadmath.so +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/quadmath.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/quadmath_weak.h +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.so + +%files -n libquadmath-static +%defattr(-,root,root,-) +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.a +%endif + +%if %{build_libitm} +%files -n libitm +%defattr(-,root,root,-) +%{_prefix}/%{_lib}/libitm.so.1* + +%files -n libitm-devel +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include +%doc rpm.doc/libitm/ChangeLog* + +%files -n libitm-static +%defattr(-,root,root,-) +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libitm.a +%endif + +%if %{build_libatomic} +%files -n libatomic +%defattr(-,root,root,-) +%{_prefix}/%{_lib}/libatomic.so.1* + +%files -n libatomic-static +%defattr(-,root,root,-) +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libatomic.a +%endif + +%if %{build_libasan} +%files -n libasan +%defattr(-,root,root,-) +%{_prefix}/%{_lib}/libasan.so.8* + +%files -n libasan-static +%defattr(-,root,root,-) +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libasan.a +%endif + +%if %{build_libubsan} +%files -n libubsan +%{_prefix}/%{_lib}/libubsan.so.1* + +%files -n libubsan-static +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%ifarch sparcv9 ppc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/lib32 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libubsan.a +%endif +%ifarch sparc64 ppc64 ppc64p7 +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/lib64 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/libubsan.a +%endif +%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libubsan.a +%endif +%{!?_licensedir:%global license %%doc} +%license libsanitizer/LICENSE.TXT +%endif + +%if %{build_libtsan} +%files -n libtsan +%defattr(-,root,root,-) +%{_prefix}/%{_lib}/libtsan.so.2* + +%files -n libtsan-static +%defattr(-,root,root,-) +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libtsan.a +%{!?_licensedir:%global license %%doc} +%license libsanitizer/LICENSE.TXT +%endif + +%if %{build_liblsan} +%files -n liblsan +%{_prefix}/%{_lib}/liblsan.so.0* + +%files -n liblsan-static +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/liblsan.a +%{!?_licensedir:%global license %%doc} +%license libsanitizer/LICENSE.TXT +%endif + +%if %{build_go} +%files go +%{_prefix}/bin/gccgo%{binsuffix} +%{_prefix}/bin/go%{binsuffix} +%{_prefix}/bin/gofmt%{binsuffix} +%{_mandir}/man1/gccgo.1* +%{_mandir}/man1/go.1* +%{_mandir}/man1/gofmt.1* +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/libexec/gcc +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/go1 +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cgo +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/buildid +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/test2json +%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/vet +%ifarch %{multilib_64_archs} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgo.so +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgo.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgobegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgolibbegin.a +%endif +%ifarch sparcv9 ppc %{multilib_64_archs} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so +%endif +%doc rpm.doc/go/* + +%files -n libgo +%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.22* +%doc rpm.doc/libgo/* + +%files -n libgo-devel +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_prefix}/%{_lib}/go +%dir %{_prefix}/%{_lib}/go/%{gcc_version} +%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform} +%ifarch %{multilib_64_archs} +%ifnarch sparc64 ppc64 ppc64p7 +%dir %{_prefix}/%{_lib}/go +%dir %{_prefix}/%{_lib}/go/%{gcc_version} +%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform} +%endif +%endif +%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgobegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgolibbegin.a +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so +%endif + +%files -n libgo-static +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.a +%endif +%endif + +%files plugin-devel +%defattr(-,root,root,-) +%dir %{_prefix}/%{_lib}/gcc +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} +%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/plugin +%dir %{_prefix}/libexec/gcc +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin + +# /\/\/\ +# native +%else +# cross +# \/\/\/ +%files +%defattr(-,root,root,-) +%{_prefix} +# /\/\/\ +# cross +%endif diff --git a/rpm/cross-armv7hl-gcc.spec b/rpm/cross-armv7hl-gcc13.spec similarity index 98% rename from rpm/cross-armv7hl-gcc.spec rename to rpm/cross-armv7hl-gcc13.spec index 2027b23..93edf76 100644 --- a/rpm/cross-armv7hl-gcc.spec +++ b/rpm/cross-armv7hl-gcc13.spec @@ -1,5 +1,5 @@ -# Combined gcc / cross-armv*-gcc) specfile -Name: cross-armv7hl-gcc +# Combined gcc / cross-armv*-gccNN) specfile +Name: cross-armv7hl-gcc13 %define crossarch armv7hl # Keep Name on top ! @@ -21,8 +21,8 @@ Name: cross-armv7hl-gcc # crossbuild / accelerator section # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ %define crossbuild 0 -%if "%{name}" != "gcc" -# this is the ix86 -> arm cross compiler (cross-armv*-gcc) +%if "%{name}" != "gcc13" +# this is the ix86 -> arm cross compiler (cross-armv*-gccNN) # # We set requires/provides by hand and disable post-build-checks. # Captain Trunk: Sledge, you cannot disarm that nuclear bomb! @@ -103,6 +103,7 @@ ExclusiveArch: %ix86 x86_64 # end crossbuild / accelerator section %endif +%global binsuffix -13 %global gcc_version 13.3.1 %global gcc_release 1 %global _unpackaged_files_terminate_build 0 @@ -724,6 +725,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" --enable-lto \ --enable-linker-build-id \ --disable-libmpx \ + --program-suffix=%{binsuffix} \ %if %{bootstrap} == 0 --enable-languages=c,c++${enablelgo},lto \ --enable-threads=posix \ @@ -1250,8 +1252,8 @@ EOF chmod 755 %{buildroot}%{_prefix}/bin/c?9 cd .. -%find_lang %{name} -%find_lang cpplib +%find_lang %{name}%{binsuffix} +%find_lang cpplib%{binsuffix} # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo @@ -1298,7 +1300,7 @@ rm -f %{buildroot}%{mandir}/man3/ffi* # \/\/\/ # additional install for cross # remove some obsolete files -ln -sf %{cross_gcc_target_platform}-gcc %{buildroot}%{_prefix}/bin/%{cross_gcc_target_platform}-cc +ln -sf %{cross_gcc_target_platform}-gcc%{binsuffix} %{buildroot}%{_prefix}/bin/%{cross_gcc_target_platform}-cc%{binsuffix} set -x rm -rRf %buildroot/%{_prefix}/lib/libiberty.a rm -rRf %buildroot/%{_prefix}/share @@ -1433,17 +1435,17 @@ end %files -f %{name}.lang %defattr(-,root,root,-) -%{_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/cc%{binsuffix} +%{_prefix}/bin/c89%{binsuffix} +%{_prefix}/bin/c99%{binsuffix} +%{_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} #%ifnarch %%{arm} aarch64 mipsel #%%{_prefix}/bin/%%{gcc_target_platform}-gcc #%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ar @@ -1759,13 +1761,13 @@ end %files doc %defattr(-,root,root,-) %{_docdir}/%{name}-%{version} -%{_mandir}/man1/cpp.1* -%{_mandir}/man1/gcc.1* -%{_mandir}/man1/gcov.1* -%{_mandir}/man1/gcov-tool.1* -%{_mandir}/man1/gcov-dump.1* -%{_mandir}/man1/g++.1* -%{_mandir}/man1/lto-dump.1* +%{_mandir}/man1/cpp%{binsuffix}.1* +%{_mandir}/man1/gcc%{binsuffix}.1* +%{_mandir}/man1/gcov%{binsuffix}.1* +%{_mandir}/man1/gcov-tool%{binsuffix}.1* +%{_mandir}/man1/gcov-dump%{binsuffix}.1* +%{_mandir}/man1/g++%{binsuffix}.1* +%{_mandir}/man1/lto-dump%{binsuffix}.1* %{_mandir}/man7/* # !crossbuild %endif @@ -1790,8 +1792,8 @@ end %ifnarch %{arm} aarch64 mipsel %{_prefix}/bin/%{gcc_target_platform}-*++ %endif -%{_prefix}/bin/g++ -%{_prefix}/bin/c++ +%{_prefix}/bin/g++%{binsuffix} +%{_prefix}/bin/c++%{binsuffix} %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2001,9 +2003,9 @@ end %if %{build_go} %files go -%attr(755,root,root) %{_prefix}/bin/go.gcc -%{_prefix}/bin/gccgo -%attr(755,root,root) %{_prefix}/bin/gofmt.gcc +%{_prefix}/bin/gccgo%{binsuffix} +%{_prefix}/bin/go%{binsuffix} +%{_prefix}/bin/gofmt%{binsuffix} %{_mandir}/man1/gccgo.1* %{_mandir}/man1/go.1* %{_mandir}/man1/gofmt.1* diff --git a/rpm/cross-i486-gcc.spec b/rpm/cross-i486-gcc13.spec similarity index 98% rename from rpm/cross-i486-gcc.spec rename to rpm/cross-i486-gcc13.spec index 51ea516..e887d66 100644 --- a/rpm/cross-i486-gcc.spec +++ b/rpm/cross-i486-gcc13.spec @@ -1,5 +1,5 @@ -# Combined gcc / cross-armv*-gcc) specfile -Name: cross-i486-gcc +# Combined gcc / cross-armv*-gccNN) specfile +Name: cross-i486-gcc13 %define crossarch i486 # Keep Name on top ! @@ -21,8 +21,8 @@ Name: cross-i486-gcc # crossbuild / accelerator section # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ %define crossbuild 0 -%if "%{name}" != "gcc" -# this is the ix86 -> arm cross compiler (cross-armv*-gcc) +%if "%{name}" != "gcc13" +# this is the ix86 -> arm cross compiler (cross-armv*-gccNN) # # We set requires/provides by hand and disable post-build-checks. # Captain Trunk: Sledge, you cannot disarm that nuclear bomb! @@ -103,6 +103,7 @@ ExclusiveArch: %ix86 x86_64 # end crossbuild / accelerator section %endif +%global binsuffix -13 %global gcc_version 13.3.1 %global gcc_release 1 %global _unpackaged_files_terminate_build 0 @@ -724,6 +725,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" --enable-lto \ --enable-linker-build-id \ --disable-libmpx \ + --program-suffix=%{binsuffix} \ %if %{bootstrap} == 0 --enable-languages=c,c++${enablelgo},lto \ --enable-threads=posix \ @@ -1250,8 +1252,8 @@ EOF chmod 755 %{buildroot}%{_prefix}/bin/c?9 cd .. -%find_lang %{name} -%find_lang cpplib +%find_lang %{name}%{binsuffix} +%find_lang cpplib%{binsuffix} # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo @@ -1298,7 +1300,7 @@ rm -f %{buildroot}%{mandir}/man3/ffi* # \/\/\/ # additional install for cross # remove some obsolete files -ln -sf %{cross_gcc_target_platform}-gcc %{buildroot}%{_prefix}/bin/%{cross_gcc_target_platform}-cc +ln -sf %{cross_gcc_target_platform}-gcc%{binsuffix} %{buildroot}%{_prefix}/bin/%{cross_gcc_target_platform}-cc%{binsuffix} set -x rm -rRf %buildroot/%{_prefix}/lib/libiberty.a rm -rRf %buildroot/%{_prefix}/share @@ -1433,17 +1435,17 @@ end %files -f %{name}.lang %defattr(-,root,root,-) -%{_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/cc%{binsuffix} +%{_prefix}/bin/c89%{binsuffix} +%{_prefix}/bin/c99%{binsuffix} +%{_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} #%ifnarch %%{arm} aarch64 mipsel #%%{_prefix}/bin/%%{gcc_target_platform}-gcc #%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ar @@ -1759,13 +1761,13 @@ end %files doc %defattr(-,root,root,-) %{_docdir}/%{name}-%{version} -%{_mandir}/man1/cpp.1* -%{_mandir}/man1/gcc.1* -%{_mandir}/man1/gcov.1* -%{_mandir}/man1/gcov-tool.1* -%{_mandir}/man1/gcov-dump.1* -%{_mandir}/man1/g++.1* -%{_mandir}/man1/lto-dump.1* +%{_mandir}/man1/cpp%{binsuffix}.1* +%{_mandir}/man1/gcc%{binsuffix}.1* +%{_mandir}/man1/gcov%{binsuffix}.1* +%{_mandir}/man1/gcov-tool%{binsuffix}.1* +%{_mandir}/man1/gcov-dump%{binsuffix}.1* +%{_mandir}/man1/g++%{binsuffix}.1* +%{_mandir}/man1/lto-dump%{binsuffix}.1* %{_mandir}/man7/* # !crossbuild %endif @@ -1790,8 +1792,8 @@ end %ifnarch %{arm} aarch64 mipsel %{_prefix}/bin/%{gcc_target_platform}-*++ %endif -%{_prefix}/bin/g++ -%{_prefix}/bin/c++ +%{_prefix}/bin/g++%{binsuffix} +%{_prefix}/bin/c++%{binsuffix} %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2001,9 +2003,9 @@ end %if %{build_go} %files go -%attr(755,root,root) %{_prefix}/bin/go.gcc -%{_prefix}/bin/gccgo -%attr(755,root,root) %{_prefix}/bin/gofmt.gcc +%{_prefix}/bin/gccgo%{binsuffix} +%{_prefix}/bin/go%{binsuffix} +%{_prefix}/bin/gofmt%{binsuffix} %{_mandir}/man1/gccgo.1* %{_mandir}/man1/go.1* %{_mandir}/man1/gofmt.1* diff --git a/rpm/cross-x86_64-gcc.spec b/rpm/cross-x86_64-gcc13.spec similarity index 98% rename from rpm/cross-x86_64-gcc.spec rename to rpm/cross-x86_64-gcc13.spec index be82af3..87e8bd5 100644 --- a/rpm/cross-x86_64-gcc.spec +++ b/rpm/cross-x86_64-gcc13.spec @@ -1,5 +1,5 @@ -# Combined gcc / cross-armv*-gcc) specfile -Name: cross-x86_64-gcc +# Combined gcc / cross-armv*-gccNN) specfile +Name: cross-x86_64-gcc13 %define crossarch x86_64 # Keep Name on top ! @@ -21,8 +21,8 @@ Name: cross-x86_64-gcc # crossbuild / accelerator section # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ %define crossbuild 0 -%if "%{name}" != "gcc" -# this is the ix86 -> arm cross compiler (cross-armv*-gcc) +%if "%{name}" != "gcc13" +# this is the ix86 -> arm cross compiler (cross-armv*-gccNN) # # We set requires/provides by hand and disable post-build-checks. # Captain Trunk: Sledge, you cannot disarm that nuclear bomb! @@ -103,6 +103,7 @@ ExclusiveArch: %ix86 x86_64 # end crossbuild / accelerator section %endif +%global binsuffix -13 %global gcc_version 13.3.1 %global gcc_release 1 %global _unpackaged_files_terminate_build 0 @@ -724,6 +725,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" --enable-lto \ --enable-linker-build-id \ --disable-libmpx \ + --program-suffix=%{binsuffix} \ %if %{bootstrap} == 0 --enable-languages=c,c++${enablelgo},lto \ --enable-threads=posix \ @@ -1250,8 +1252,8 @@ EOF chmod 755 %{buildroot}%{_prefix}/bin/c?9 cd .. -%find_lang %{name} -%find_lang cpplib +%find_lang %{name}%{binsuffix} +%find_lang cpplib%{binsuffix} # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo @@ -1298,7 +1300,7 @@ rm -f %{buildroot}%{mandir}/man3/ffi* # \/\/\/ # additional install for cross # remove some obsolete files -ln -sf %{cross_gcc_target_platform}-gcc %{buildroot}%{_prefix}/bin/%{cross_gcc_target_platform}-cc +ln -sf %{cross_gcc_target_platform}-gcc%{binsuffix} %{buildroot}%{_prefix}/bin/%{cross_gcc_target_platform}-cc%{binsuffix} set -x rm -rRf %buildroot/%{_prefix}/lib/libiberty.a rm -rRf %buildroot/%{_prefix}/share @@ -1433,17 +1435,17 @@ end %files -f %{name}.lang %defattr(-,root,root,-) -%{_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/cc%{binsuffix} +%{_prefix}/bin/c89%{binsuffix} +%{_prefix}/bin/c99%{binsuffix} +%{_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} #%ifnarch %%{arm} aarch64 mipsel #%%{_prefix}/bin/%%{gcc_target_platform}-gcc #%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ar @@ -1759,13 +1761,13 @@ end %files doc %defattr(-,root,root,-) %{_docdir}/%{name}-%{version} -%{_mandir}/man1/cpp.1* -%{_mandir}/man1/gcc.1* -%{_mandir}/man1/gcov.1* -%{_mandir}/man1/gcov-tool.1* -%{_mandir}/man1/gcov-dump.1* -%{_mandir}/man1/g++.1* -%{_mandir}/man1/lto-dump.1* +%{_mandir}/man1/cpp%{binsuffix}.1* +%{_mandir}/man1/gcc%{binsuffix}.1* +%{_mandir}/man1/gcov%{binsuffix}.1* +%{_mandir}/man1/gcov-tool%{binsuffix}.1* +%{_mandir}/man1/gcov-dump%{binsuffix}.1* +%{_mandir}/man1/g++%{binsuffix}.1* +%{_mandir}/man1/lto-dump%{binsuffix}.1* %{_mandir}/man7/* # !crossbuild %endif @@ -1790,8 +1792,8 @@ end %ifnarch %{arm} aarch64 mipsel %{_prefix}/bin/%{gcc_target_platform}-*++ %endif -%{_prefix}/bin/g++ -%{_prefix}/bin/c++ +%{_prefix}/bin/g++%{binsuffix} +%{_prefix}/bin/c++%{binsuffix} %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2001,9 +2003,9 @@ end %if %{build_go} %files go -%attr(755,root,root) %{_prefix}/bin/go.gcc -%{_prefix}/bin/gccgo -%attr(755,root,root) %{_prefix}/bin/gofmt.gcc +%{_prefix}/bin/gccgo%{binsuffix} +%{_prefix}/bin/go%{binsuffix} +%{_prefix}/bin/gofmt%{binsuffix} %{_mandir}/man1/gccgo.1* %{_mandir}/man1/go.1* %{_mandir}/man1/gofmt.1* diff --git a/rpm/gcc.spec b/rpm/gcc.spec deleted file mode 100644 index 3aec84b..0000000 --- a/rpm/gcc.spec +++ /dev/null @@ -1,2086 +0,0 @@ -# Combined gcc / cross-armv*-gcc) specfile -Name: gcc -# Keep Name on top ! - -%if "%{?bootstrap}" == "" -%define bootstrap 0 -%else -%if "%{bootstrap}" != "0" && "%{bootstrap}" != "1" && "%{bootstrap}" != "2" -%{error:Bootstrap parameter should me one of: 0, 1, 2} -%endif -%endif - -%ifarch aarch64 x86_64 -%define _libdir /usr/lib64 -%define _lib lib64 -%endif - -%global isl_version 0.24 - -# crossbuild / accelerator section -# \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ -%define crossbuild 0 -%if "%{name}" != "gcc" -# this is the ix86 -> arm cross compiler (cross-armv*-gcc) -# -# We set requires/provides by hand and disable post-build-checks. -# Captain Trunk: Sledge, you cannot disarm that nuclear bomb! -# Sledge Hammer: Trust me, I know what I'm doing. -AutoReqProv: 0 -AutoReq: false -#!BuildIgnore: rpmlint-Moblin -#!BuildIgnore: rpmlint-mini -#!BuildIgnore: post-build-checks -# cross platform -%if %(echo %{crossarch} | grep -q "^arm" && echo 1 || echo 0) -%define cross_gcc_target_platform %{crossarch}-%{_vendor}-linux-gnueabi -%else -%define cross_gcc_target_platform %{crossarch}-%{_vendor}-linux-gnu -%endif -# gcc_target_platform holds the host (executing the compiler) -# cross_gcc_target_platform holds the target (for which the compiler is producing binaries) -# prefix for cross compiler -%define _prefix /opt/cross -# strip of 'foreign arch' symbols fails -%define __strip /bin/true -# sysroot for cross-compiler -%define crosssysroot %{_prefix}/%{cross_gcc_target_platform}/sys-root -# flag -%define crossbuild 1 -# macros in buildrequires is hard to expand for the scheduler (e.g. crossarch) which would make this easier. -%if %{bootstrap} == 2 -%define cross_deps cross-%{crossarch}-glibc-headers cross-%{crossarch}-libxcrypt-devel cross-%{crossarch}-kernel-headers cross-%{crossarch}-binutils -%endif -%if %{bootstrap} == 0 -%define cross_deps cross-%{crossarch}-glibc cross-%{crossarch}-glibc-devel cross-%{crossarch}-libxcrypt cross-%{crossarch}-libxcrypt-devel cross-%{crossarch}-glibc-headers cross-%{crossarch}-kernel-headers cross-%{crossarch}-binutils -%endif -%if %{bootstrap} == 1 -%define cross_deps cross-%{crossarch}-kernel-headers cross-%{crossarch}-binutils -%endif - -BuildRequires: %{cross_deps} - -# Fixme: find way to make this without listing every package -%if "%{crossarch}" == "armv5tel" -%define crossextraconfig %{nil} -%endif -%if "%{crossarch}" == "armv6l" -%define crossextraconfig --with-fpu=vfp --with-arch=armv6 -%endif -%if "%{crossarch}" == "armv7l" -%define crossextraconfig --with-fpu=vfpv3-d16 --with-arch=armv7-a -%endif -%if "%{crossarch}" == "armv7hl" -%define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a --with-mode=thumb -%endif -%if "%{crossarch}" == "armv7nhl" -%define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a -%endif -%if "%{crossarch}" == "armv7thl" -%define crossextraconfig --with-float=hard --with-fpu=vfpv3-d16 --with-arch=armv7-a --with-mode=thumb -%endif -%if "%{crossarch}" == "armv7tnhl" -%define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a --with-mode=thumb -%endif -%if "%{crossarch}" == "mipsel" -%define crossextraconfig --disable-fixed-point --disable-ssp --disable-libstdcxx-pch --with-arch=mips32 -%endif -%if "%{crossarch}" == "i486" -%define crossextraconfig --disable-libstdcxx-pch --with-arch=i686 --with-fpmatch=sse --with-gnu-as=/opt/cross/bin/i486-meego-linux-gnu-as --with-gnu-ld=/opt/cross/bin/i486-meego-linux-gnu-ld --with-as=/opt/cross/bin/i486-meego-linux-gnu-as --with-ld=/opt/cross/bin/i486-meego-linux-gnu-ld -%endif -%if "%{crossarch}" == "x86_64" -%define crossextraconfig --disable-libstdcxx-pch -%endif -%if "%{crossarch}" == "aarch64" -%define crossextraconfig --with-arch=armv8-a -%endif - -# single target atm. -ExclusiveArch: %ix86 x86_64 -# -# /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ -# end crossbuild / accelerator section -%endif - -%global gcc_version 13.3.1 -%global gcc_release 1 -%global _unpackaged_files_terminate_build 0 -%global _performance_build 1 -%global build_ada 0 -%global build_objc 0 -%global build_go 1 -%global build_d 0 -%global include_gappletviewer 0 -%global build_libstdcxx_doc 0 -%global multilib_64_archs %{nil} -%ifarch x86_64 -%global multilib_32_arch i686 -%endif -%global build_64bit_multilib 0 -%ifarch %{ix86} x86_64 -%global build_libquadmath 1 -%else -%global build_libquadmath 0 -%endif -%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 -%global build_libasan 1 -%else -%global build_libasan 0 -%endif -%ifarch x86_64 ppc64 ppc64le aarch64 -%global build_libtsan 1 -%else -%global build_libtsan 0 -%endif -%ifarch x86_64 ppc64 ppc64le aarch64 -%global build_liblsan 1 -%else -%global build_liblsan 0 -%endif -%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 -%global build_libubsan 1 -%else -%global build_libubsan 0 -%endif -%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips} -%global build_libatomic 1 -%else -%global build_libatomic 0 -%endif -%ifarch %{ix86} x86_64 %{arm} alpha ppc ppc64 ppc64le ppc64p7 s390 s390x aarch64 -%global build_libitm 1 -%else -%global build_libitm 0 -%endif -%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips} -%global attr_ifunc 1 -%else -%global attr_ifunc 0 -%endif -#GCC Graphite needs isl -%global build_isl 1 - -Summary: Various compilers (C, C++, Objective-C, Java, ...) -Version: 13.3.1 -%if %{bootstrap} -Release: 0.%{bootstrap}.%{gcc_release} -%else -Release: %{gcc_release} -%endif -License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD -URL: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads -Source0: %{name}-%{version}.tar.xz -Source1: isl-0.24.tar.bz2 -Source3: gcc-rpmlintrc -Source4: baselibs.conf -Source5: precheckin.sh -Source6: aaa_README.PACKAGER -Patch0: gcc13-hack.patch -Patch2: gcc13-sparc-config-detection.patch -Patch3: gcc13-libgomp-omp_h-multilib.patch -Patch4: gcc13-libtool-no-rpath.patch -Patch5: gcc13-isl-dl.patch -Patch6: gcc13-isl-dl2.patch -Patch7: gcc13-libstdc++-docs.patch -Patch8: gcc13-no-add-needed.patch -Patch9: gcc13-Wno-format-security.patch -Patch10: gcc13-rh1574936.patch -Patch11: gcc13-d-shared-libphobos.patch -Patch12: gcc13-reproducible-builds.patch -Patch13: gcc13-reproducible-builds-buildid-for-checksum.patch - -Patch50: isl-rh2155127.patch - -Patch100: gcc13-fortran-fdec-duplicates.patch - -BuildRequires: binutils >= 2.31 -BuildRequires: glibc-static -BuildRequires: zlib-devel, gettext, bison, flex -BuildRequires: mpc-devel -BuildRequires: glibc-devel >= 2.4.90-13 -BuildRequires: elfutils-devel >= 0.147 -BuildRequires: libstdc++-devel -BuildRequires: libgomp -BuildRequires: libxcrypt-devel -BuildRequires: libzstd-devel - -%if %{build_libstdcxx_doc} -BuildRequires: doxygen -BuildRequires: graphviz -%endif - -%if !%{crossbuild} -Requires: cpp = %{version}-%{release} -Requires: libgcc >= %{version}-%{release} -Requires: libgomp = %{version}-%{release} -Requires: glibc-devel -Requires: binutils >= 2.25 -%endif - -%if !%{crossbuild} - -%if %{build_64bit_multilib} -Requires: glibc64bit-helper -%endif - -%if %{build_go} -BuildRequires: net-tools, procps -%endif - -Obsoletes: gcc < %{version}-%{release} -AutoReq: true -# /!crossbuild -%endif - -#We need -gnueabi indicator for ARM -%ifnarch %{arm} aarch64 -%global _gnu %{nil} -%endif -%global gcc_target_platform %{_target_platform} - -%description -The gcc package contains the GNU Compiler Collection version 4.9. -You'll need this package in order to compile C code. - -%if !%{crossbuild} -%package doc -Summary: Documentation for %{name} -Requires: %{name} = %{version}-%{release} - -%description doc -Man and info pages for %{name}. -# !crossbuild -%endif - -%package -n libgcc -Summary: GCC version 13.3 shared support library -Obsoletes: libgcc < %{version}-%{release} -Autoreq: true -%if "%{version}" != "%{gcc_version}" -Provides: libgcc = %{gcc_version} -%endif - -%description -n libgcc -This package contains GCC shared support library which is needed -e.g. for exception handling support. - -%package c++ -Summary: C++ support for GCC -Requires: gcc = %{version}-%{release} -Requires: libstdc++ = %{version}-%{release} -Requires: libstdc++-devel = %{version}-%{release} -Obsoletes: gcc-c++ < %{version}-%{release} -Autoreq: true - -%description c++ -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 libstdc++ -Summary: GNU Standard C++ Library -Obsoletes: libstdc++ < %{version}-%{release} -Obsoletes: libstdc++6 < %{version}-%{release} -Autoreq: true -Requires: glibc - -%description -n libstdc++ -The libstdc++ package contains a rewritten standard compliant GCC Standard -C++ Library. - -%package -n libstdc++-devel -Summary: Header files and libraries for C++ development -Requires: libstdc++ = %{version}-%{release} -Obsoletes: libstdc++-devel < %{version}-%{release} -Autoreq: true - -%description -n libstdc++-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 libstdc++-static -Summary: Static libraries for the GNU standard C++ library -Requires: libstdc++-devel = %{version}-%{release} -Autoreq: true - -%description -n libstdc++-static -Static libraries for the GNU standard C++ library. - -%if !%{crossbuild} -%package -n libstdc++-doc -Summary: Documentation for the GNU standard C++ library -Requires: libstdc++ = %{version}-%{release} -Obsoletes: libstdc++-docs -Autoreq: true - -%description -n libstdc++-doc -Manual, doxygen generated API information and Frequently Asked Questions -for the GNU standard C++ library. -# !crossbuild -%endif - -%package -n libgomp -Summary: GCC OpenMP v4.5 shared support library -Obsoletes: libgomp < %{version}-%{release} - -%description -n libgomp -This package contains GCC shared support library which is needed -for OpenMP v3.0 support. - -%package -n libquadmath -Summary: GCC __float128 shared support library - -%description -n libquadmath -This package contains GCC shared support library which is needed -for __float128 math support and for Fortran REAL*16 support. - -%package -n libquadmath-devel -Summary: GCC __float128 support -Requires: libquadmath = %{version}-%{release} -Requires: gcc = %{version}-%{release} - -%description -n libquadmath-devel -This package contains headers for building Fortran programs using -REAL*16 and programs using __float128 math. - -%package -n libquadmath-static -Summary: Static libraries for __float128 support -Requires: libquadmath-devel = %{version}-%{release} - -%description -n libquadmath-static -This package contains static libraries for building Fortran programs -using REAL*16 and programs using __float128 math. - -%package -n libitm -Summary: The GNU Transactional Memory library - -%description -n libitm -This package contains the GNU Transactional Memory library -which is a GCC transactional memory support runtime library. - -%package -n libitm-devel -Summary: The GNU Transactional Memory support -Requires: libitm = %{version}-%{release} -Requires: gcc = %{version}-%{release} - -%description -n libitm-devel -This package contains headers and support files for the -GNU Transactional Memory library. - -%package -n libitm-static -Summary: The GNU Transactional Memory static library -Requires: libitm-devel = %{version}-%{release} - -%description -n libitm-static -This package contains GNU Transactional Memory static libraries. - -%package -n libatomic -Summary: The GNU Atomic library - -%description -n libatomic -This package contains the GNU Atomic library -which is a GCC support runtime library for atomic operations not supported -by hardware. - -%package -n libatomic-static -Summary: The GNU Atomic static library -Requires: libatomic = %{version}-%{release} - -%description -n libatomic-static -This package contains GNU Atomic static libraries. - -%package -n libasan -Summary: The Address Sanitizer runtime library - -%description -n libasan -This package contains the Address Sanitizer library -which is used for -fsanitize=address instrumented programs. - -%package -n libasan-static -Summary: The Address Sanitizer static library -Requires: libasan = %{version}-%{release} - -%description -n libasan-static -This package contains Address Sanitizer static runtime library. - -%package -n libtsan -Summary: The Thread Sanitizer runtime library - -%description -n libtsan -This package contains the Thread Sanitizer library -which is used for -fsanitize=thread instrumented programs. - -%package -n libtsan-static -Summary: The Thread Sanitizer static library -Requires: libtsan = %{version}-%{release} - -%description -n libtsan-static -This package contains Thread Sanitizer static runtime library. - -%package -n libubsan -Summary: The Undefined Behavior Sanitizer runtime library - -%description -n libubsan -This package contains the Undefined Behavior Sanitizer library -which is used for -fsanitize=undefined instrumented programs. - -%package -n libubsan-static -Summary: The Undefined Behavior Sanitizer static library -Requires: libubsan = %{version}-%{release} - -%description -n libubsan-static -This package contains Undefined Behavior Sanitizer static runtime library. - -%package -n liblsan -Summary: The Leak Sanitizer runtime library - -%description -n liblsan -This package contains the Leak Sanitizer library -which is used for -fsanitize=leak instrumented programs. - -%package -n liblsan-static -Summary: The Leak Sanitizer static library -Requires: liblsan = %{version}-%{release} - -%description -n liblsan-static -This package contains Leak Sanitizer static runtime library. - -%package -n cpp -Summary: The C Preprocessor -Requires: mpc -Obsoletes: cpp < %{version}-%{release} -Autoreq: true - -%description -n cpp -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 -compilation. It is called a macro processor because it allows -you to define macros, abbreviations for longer -constructs. - -The C preprocessor provides four separate functionalities: the -inclusion of header files (files of declarations that can be -substituted into your program); macro expansion (you can define macros, -and the C preprocessor will replace the macros with their definitions -throughout the program); conditional compilation (using special -preprocessing directives, you can include or exclude parts of the -program according to various conditions); and line control (if you use -a program to combine or rearrange source files into an intermediate -file which is then compiled, you can use line control to inform the -compiler about where each source line originated). - -You should install this package if you are a C programmer and you use -macros. - -%package -n gcc-multilib -Summary: for 64bit multilib support -Autoreq: true - -%description -n gcc-multilib -This is one set of libraries which support 64bit multilib on top of -32bit enviroment from compiler side. - -%package go -Summary: Go support -Requires: gcc = %{version}-%{release} -Requires: libgo = %{version}-%{release} -Requires: libgo-devel = %{version}-%{release} -Provides: gccgo = %{version}-%{release} -Autoreq: true - -%description go -The gcc-go package provides support for compiling Go programs -with the GNU Compiler Collection. - -%package -n libgo -Summary: Go runtime -Autoreq: true - -%description -n libgo -This package contains Go shared library which is needed to run -Go dynamically linked programs. - -%package -n libgo-devel -Summary: Go development libraries -Requires: libgo = %{version}-%{release} -Autoreq: true - -%description -n libgo-devel -This package includes libraries and support files for compiling -Go programs. - -%package -n libgo-static -Summary: Static Go libraries -Requires: libgo = %{version}-%{release} -Requires: gcc = %{version}-%{release} - -%description -n libgo-static -This package contains static Go libraries. - -%package plugin-devel -Summary: Support for compiling GCC plugins -Requires: gcc = %{version}-%{release} -Requires: gmp-devel >= 4.1.2-8, mpfr-devel >= 3.1.0, libmpc-devel >= 0.8.1 - -%description plugin-devel -This package contains header files and other support files -for compiling GCC plugins. The GCC plugin ABI is currently -not stable, so plugins must be rebuilt any time GCC is updated. - -%prep -%setup -q -n %{name}-%{version}/upstream - -# Extract isl sources -tar xfj %{SOURCE1} - -%patch0 -p0 -b .hack~ -%patch2 -p0 -b .sparc-config-detection~ -%patch3 -p0 -b .libgomp-omp_h-multilib~ -%patch4 -p0 -b .libtool-no-rpath~ -%patch5 -p0 -b .isl-dl~ -%patch6 -p0 -b .isl-dl2~ -%patch7 -p0 -b .libstdc++-docs~ -%patch8 -p0 -b .no-add-needed~ -%patch9 -p0 -b .Wno-format-security~ -%patch10 -p0 -b .rh1574936~ -%patch11 -p0 -b .d-shared-libphobos~ -%patch12 -p0 -b .reproducible-builds~ -%patch13 -p1 -b .reproducible-builds-buildid-for-checksum~ - -%patch50 -p0 -b .rh2155127~ -touch -r isl-0.24/m4/ax_prog_cxx_for_build.m4 isl-0.24/m4/ax_prog_cc_for_build.m4 - -%patch100 -p1 -b .fortran-fdec-duplicates~ - -echo 'Sailfish OS gcc %{version}-%{gcc_release}' > gcc/DEV-PHASE - -cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h - -./contrib/gcc_update --touch - -LC_ALL=C sed -i -e 's/\xa0/ /' gcc/doc/options.texi - -%build - -rm -fr obj-%{gcc_target_platform} -mkdir obj-%{gcc_target_platform} -cd obj-%{gcc_target_platform} - -%if %{build_isl} -mkdir isl-build isl-install -%ifarch s390 s390x -ISL_FLAG_PIC=-fPIC -%else -ISL_FLAG_PIC=-fpic -%endif -cd isl-build -../../isl-%{isl_version}/configure --disable-shared \ - CC=/usr/bin/gcc CXX=/usr/bin/g++ \ - CFLAGS="${CFLAGS:-%optflags} $ISL_FLAG_PIC" --prefix=`cd ..; pwd`/isl-install -make %{?_smp_mflags} -make %{?_smp_mflags} install -cd .. -%endif - -CC=gcc -OPT_FLAGS="%{optflags}" -OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=[123]//g'` -OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[123]//g'` -OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/\(-Wp,\)\?-U_FORTIFY_SOURCE//g'` -OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'` -%ifarch %{ix86} -OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-march=i.86//g'` -%endif -OPT_FLAGS=`echo $OPT_FLAGS| sed -e 's/[[:blank:]]\+/ /g'` -OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-fno-omit-frame-pointer//g;s/-mbackchain//g;s/-mno-omit-leaf-frame-pointer//g'` -OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-Werror=format-security/-Wformat-security/g'` -case "$OPT_FLAGS" in - *-fasynchronous-unwind-tables*) - sed -i -e 's/-fno-exceptions /-fno-exceptions -fno-asynchronous-unwind-tables/' \ - ../gcc/Makefile.in - ;; -esac - -%ifarch mipsel -# Apply this in case you ever need to qemu bootstrap --cvm -# -# export OPT_FLAGS="$OPT_FLAGS --param ggc-min-expand=0 --param ggc-min-heapsize=65536" -%endif - -%ifarch %arm aarch64 - -%define ARM_EXTRA_CONFIGURE "" -# for armv7hl reset the gcc specs -%ifarch armv6l -%define ARM_EXTRA_CONFIGURE --with-fpu=vfp --with-arch=armv6 -%endif -%ifarch armv7l -%define ARM_EXTRA_CONFIGURE --with-fpu=vfpv3-d16 --with-arch=armv7-a -%endif -%ifarch armv7hl -%define ARM_EXTRA_CONFIGURE --with-float=hard --with-fpu=neon --with-mode=thumb --with-arch=armv7-a -%endif -# for armv7nhl reset the gcc specs -%ifarch armv7nhl -%define ARM_EXTRA_CONFIGURE --with-float=hard --with-fpu=neon --with-arch=armv7-a -%endif -# for armv7thl reset the gcc specs -%ifarch armv7thl -%define ARM_EXTRA_CONFIGURE --with-float=hard --with-fpu=vfpv3-d16 --with-arch=armv7-a --with-mode=thumb -%endif -# for armv7tnhl reset the gcc specs -%ifarch armv7tnhl -%define ARM_EXTRA_CONFIGURE --with-float=hard --with-fpu=neon --with-arch=armv7-a --with-mode=thumb -%endif -# aarch64 -%ifarch aarch64 -%define ARM_EXTRA_CONFIGURE --with-arch=armv8-a -%endif -%endif - -#export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s/-O2/-O2 -fkeep-inline-functions/g"` -export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s/-fstack-protector//g"` - -%if %{build_go} -enablelgo=,go -%else -enablelgo= -%endif - -%if %{crossbuild} -# cross build -export PATH=/opt/cross/bin:$PATH -# strip all after -march . no arch specific options in cross-compiler build . -# -march=core2 -mssse3 -mtune=atom -mfpmath=sse -fasynchronous-unwi -export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g" | sed -e 's#\-mtune=.*##g` -%endif - -CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ - GCJFLAGS="$OPT_FLAGS" \ - ../configure --prefix=%{_prefix} --mandir=%{_mandir} \ -%if !%{crossbuild} -%if ! 0%{?qemu_user_space_build} - --enable-bootstrap \ -%else - --disable-bootstrap \ -%endif -%else - --disable-bootstrap \ -%endif - --with-bugurl=https://git.sailfishos.org/ \ - --build=%{gcc_target_platform} \ -%if %{build_isl} - --with-isl=`pwd`/isl-install \ -%endif -%if %{crossbuild} - --host=%{gcc_target_platform} \ - --target=%{cross_gcc_target_platform} \ - --with-sysroot=%{crosssysroot} \ - --disable-multilib \ -%else -%ifarch mipsel - --disable-fixed-point \ - --disable-ssp \ - --disable-libstdcxx-pch \ - --with-arch=mips32 \ -%endif - --enable-plugin --enable-initfini-array\ -%ifarch %{arm} aarch64 - %ARM_EXTRA_CONFIGURE \ - --disable-sjlj-exceptions \ - --enable-gold \ - --with-plugin-ld=gold \ -%endif -%ifarch aarch64 x86_64 - --libdir=/usr/lib64 \ -%endif -%ifarch %{ix86} x86_64 - --with-tune=generic \ -%endif -%ifarch i586 - --with-arch=core2 --with-tune=atom --with-fpmath=sse \ -%endif -%ifarch i486 - --with-arch=i686 --with-fpmath=sse \ -%endif -%ifarch x86_64 - --disable-libstdcxx-pch \ -%endif -%endif -%if %{build_64bit_multilib} - --enable-targets=all \ - --enable-multilib \ -%else - --disable-multilib \ -%endif - --enable-checking=release \ - --disable-fixed-point \ - --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions \ - --enable-libstdcxx-backtrace --with-libstdcxx-zoneinfo=%{_datadir}/zoneinfo \ - --enable-gnu-unique-object \ - --enable-lto \ - --enable-linker-build-id \ - --disable-libmpx \ -%if %{bootstrap} == 0 - --enable-languages=c,c++${enablelgo},lto \ - --enable-threads=posix \ - --enable-shared \ -%endif -%if %{bootstrap} == 1 - --enable-languages=c \ - --without-headers \ - --with-newlib \ - --disable-decimal-float \ - --disable-fixed-point \ - --disable-threads \ - --disable-shared \ - --disable-libssp \ - --disable-libgomp \ - --disable-libquadmath \ -%endif -%if %{bootstrap} == 2 - --enable-languages=c \ - --with-sysroot=%{crosssysroot} \ - --disable-libssp \ - --disable-libgomp \ - --disable-libquadmath \ -%endif - --disable-libgcj \ - --disable-libcilkrts \ -%if %{attr_ifunc} - --enable-gnu-indirect-function \ -%endif -%if %{crossbuild} - %{crossextraconfig} \ -%endif - --build=%{gcc_target_platform} || ( cat config.log ; exit 1 ) - -GCJFLAGS="$OPT_FLAGS" make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" - -# Make -#make -C gcc CC="./xgcc -B ./ -O2" all - -# Make generated man pages even if Pod::Man is not new enough -perl -pi -e 's/head3/head2/' ../contrib/texi2pod.pl -for i in ../gcc/doc/*.texi; do - cp -a $i $i.orig; sed 's/ftable/table/' $i.orig > $i -done -make %{?_smp_mflags} -C gcc generated-manpages -for i in ../gcc/doc/*.texi; do mv -f $i.orig $i; done - -# Make generated doxygen pages. -%if %{build_libstdcxx_doc} -cd %{gcc_target_platform}/libstdc++-v3 -make doc-html-doxygen -make doc-man-doxygen -cd ../.. -%endif - -# Clean any old compressed docs -if [ -d rpm.doc ]; then - find rpm.doc -name "*.bz2" -delete -fi - -# Copy various doc files here and there -cd .. -mkdir -p rpm.doc/gfortran rpm.doc/objc rpm.doc/gdc rpm.doc/libphobos -mkdir -p rpm.doc/go rpm.doc/libgo rpm.doc/libquadmath rpm.doc/libitm -mkdir -p rpm.doc/changelogs/{gcc/cp,gcc/ada,gcc/jit,libstdc++-v3,libobjc,libgomp,libcc1,libatomic,libsanitizer} - -for i in {gcc,gcc/cp,gcc/ada,gcc/jit,libstdc++-v3,libobjc,libgomp,libcc1,libatomic,libsanitizer}/ChangeLog*; do - cp -p $i rpm.doc/changelogs/$i -done - -%if %{build_objc} -(cd libobjc; for i in README*; do - cp -p $i ../rpm.doc/objc/$i.libobjc -done) -%endif -%if %{build_d} -(cd gcc/d; for i in ChangeLog*; do - cp -p $i ../../rpm.doc/gdc/$i.gdc -done) -(cd libphobos; for i in ChangeLog*; do - cp -p $i ../rpm.doc/libphobos/$i.libphobos -done -cp -a src/LICENSE*.txt libdruntime/LICENSE ../rpm.doc/libphobos/) -%endif -%if %{build_libquadmath} -(cd libquadmath; for i in ChangeLog* COPYING.LIB; do - cp -p $i ../rpm.doc/libquadmath/$i.libquadmath -done) -%endif -%if %{build_libitm} -(cd libitm; for i in ChangeLog*; do - cp -p $i ../rpm.doc/libitm/$i.libitm -done) -%endif -%if %{build_go} -(cd gcc/go; for i in README* ChangeLog*; do - cp -p $i ../../rpm.doc/go/$i -done) -(cd libgo; for i in LICENSE* PATENTS* README; do - cp -p $i ../rpm.doc/libgo/$i.libgo -done) -%endif - -rm -f rpm.doc/changelogs/gcc/ChangeLog.[1-9] -find rpm.doc -name \*ChangeLog\* | xargs bzip2 -9 - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot} - -cd obj-%{gcc_target_platform} - -%if !%{crossbuild} -# native -TARGET_PLATFORM=%{gcc_target_platform} -# There are some MP bugs in libstdc++ Makefiles -make %{?_smp_mflags} -C %{gcc_target_platform}/libstdc++-v3 -%else -# cross build -export PATH=/opt/cross/bin:$PATH -# strip all after -march . no arch specific options in cross-compiler build . -# -march=core2 -mssse3 -mtune=atom -mfpmath=sse -fasynchronous-unwi -export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g"` -echo "$OPT_FLAGS" -TARGET_PLATFORM=%{cross_gcc_target_platform} -# There are some MP bugs in libstdc++ Makefiles -make %{?_smp_mflags} -C %{cross_gcc_target_platform}/libstdc++-v3 -%endif - -make %{?_smp_mflags} prefix=%{buildroot}%{_prefix} mandir=%{buildroot}%{_mandir} libdir=%{buildroot}%{_libdir} \ - install - -%if !%{crossbuild} -# native -# \/\/\/ -FULLPATH=%{buildroot}%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} - -mkdir -p $FULLPATH -mkdir -p $FULLEPATH - -ln -sf gcc %{buildroot}%{_prefix}/bin/cc -mkdir -p %{buildroot}/%{_lib} -ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp - -%if %{build_go} -mv %{buildroot}%{_prefix}/bin/go{,.gcc} -mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc} -%endif - -cxxconfig="`find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h`" -for i in `find %{gcc_target_platform}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do - if ! diff -up $cxxconfig $i; then - cat > %{buildroot}%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/bits/c++config.h < -#if __WORDSIZE == 32 -%ifarch %{multilib_64_archs} -`cat $(find %{gcc_target_platform}/32/libstdc++-v3/include -name c++config.h)` -%else -`cat $(find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h)` -%endif -#else -%ifarch %{multilib_64_archs} -`cat $(find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h)` -%else -`cat $(find %{gcc_target_platform}/64/libstdc++-v3/include -name c++config.h)` -%endif -#endif -#endif -EOF - break - fi -done - -for f in `find %{buildroot}%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/ -name c++config.h`; do - for i in 1 2 4 8; do - sed -i -e 's/#define _GLIBCXX_ATOMIC_BUILTINS_'$i' 1/#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_'$i'\ -&\ -#endif/' $f - done -done - -# Nuke bits/stdc++.h.gch dirs -# 1) there is no bits/stdc++.h header installed, so when gch file can't be -# used, compilation fails -# 2) sometimes it is hard to match the exact options used for building -# libstdc++-v3 or they aren't desirable -# 3) there are multilib issues, conflicts etc. with this -# 4) it is huge -# People can always precompile on their own whatever they want, but -# shipping this for everybody is unnecessary. -rm -rf %{buildroot}%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/bits/*.h.gch - -%if %{build_libstdcxx_doc} -libstdcxx_doc_builddir=%{gcc_target_platform}/libstdc++-v3/doc/doxygen -mkdir -p ../rpm.doc/libstdc++-v3 -cp -r -p ../libstdc++-v3/doc/html ../rpm.doc/libstdc++-v3/html -mv $libstdcxx_doc_builddir/html ../rpm.doc/libstdc++-v3/html/api -mkdir -p %{buildroot}%{_mandir} -mv $libstdcxx_doc_builddir/man/man3 %{buildroot}%{_mandir}/man3/ -find ../rpm.doc/libstdc++-v3 -name \*~ | xargs rm -%endif - -#Debug -#set -x -#find %{buildroot}%{_prefix}/ - -FULLLSUBDIR= -%ifarch sparcv9 ppc -FULLLSUBDIR=lib32 -%endif -%ifarch sparc64 ppc64 ppc64p7 -FULLLSUBDIR=lib64 -%endif -if [ -n "$FULLLSUBDIR" ]; then - FULLLPATH=$FULLPATH/$FULLLSUBDIR - mkdir -p $FULLLPATH -else - FULLLPATH=$FULLPATH -fi - -find %{buildroot} -name \*.la | xargs rm -f -%if %{build_d} -mv %{buildroot}%{_prefix}/%{_lib}/libgphobos.spec $FULLPATH/ -%endif -%if %{build_libitm} -mv %{buildroot}%{_prefix}/%{_lib}/libitm.spec $FULLPATH/ -%endif -%if %{build_libasan} -mv %{buildroot}%{_prefix}/%{_lib}/libsanitizer.spec $FULLPATH/ -%endif - -mkdir -p %{buildroot}/%{_lib} - -mv -f %{buildroot}%{_prefix}/%{_lib}/libgcc_s.so.1 %{buildroot}/%{_lib}/libgcc_s-%{gcc_version}.so.1 -chmod 755 %{buildroot}/%{_lib}/libgcc_s-%{gcc_version}.so.1 -ln -sf libgcc_s-%{gcc_version}.so.1 %{buildroot}/%{_lib}/libgcc_s.so.1 - -%ifarch %{ix86} x86_64 ppc ppc64 ppc64p7 ppc64le %{arm} aarch64 -rm -f $FULLPATH/libgcc_s.so -echo '/* GNU ld script - Use the shared library, but some functions are only in - the static library, so try that secondarily. */ -OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`') -GROUP ( /%{_lib}/libgcc_s.so.1 libgcc.a )' > $FULLPATH/libgcc_s.so -%else -ln -sf /%{_lib}/libgcc_s.so.1 $FULLPATH/libgcc_s.so -%endif -%ifarch sparcv9 ppc -%ifarch ppc -rm -f $FULLPATH/64/libgcc_s.so -echo '/* GNU ld script - Use the shared library, but some functions are only in - the static library, so try that secondarily. */ -OUTPUT_FORMAT('`gcc -m64 -Wl,--print-output-format -nostdlib -r -o /dev/null`') -GROUP ( /lib64/libgcc_s.so.1 libgcc.a )' > $FULLPATH/64/libgcc_s.so -%else -ln -sf /lib64/libgcc_s.so.1 $FULLPATH/64/libgcc_s.so -%endif -%endif -%ifarch %{multilib_64_archs} -%ifarch x86_64 ppc64 ppc64p7 -rm -f $FULLPATH/64/libgcc_s.so -echo '/* GNU ld script - Use the shared library, but some functions are only in - the static library, so try that secondarily. */ -OUTPUT_FORMAT('`gcc -m32 -Wl,--print-output-format -nostdlib -r -o /dev/null`') -GROUP ( /%{_lib}/libgcc_s.so.1 libgcc.a )' > $FULLPATH/32/libgcc_s.so -%else -ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so -%endif -%endif - -mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/ - -mkdir -p %{buildroot}%{_prefix}/libexec/getconf -if gcc/xgcc -B gcc/ -E -P -dD -xc /dev/null | grep '__LONG_MAX__.*\(2147483647\|0x7fffffff\($\|[LU]\)\)'; then - ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_prefix}/libexec/getconf/default -else - ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_prefix}/libexec/getconf/default -fi - -mkdir -p %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib} -mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++*gdb.py* \ - %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/ - -pushd $FULLPATH -if [ "%{_lib}" = "lib" ]; then -%if %{build_objc} -ln -sf ../../../libobjc.so.4 libobjc.so -%endif -ln -sf ../../../libstdc++.so.6.*[0-9] libstdc++.so -ln -sf ../../../libgomp.so.1.* libgomp.so -%if %{build_go} -ln -sf ../../../libgo.so.22.* libgo.so -%endif -%if %{build_libquadmath} -ln -sf ../../../libquadmath.so.0.* libquadmath.so -%endif -%if %{build_d} -ln -sf ../../../libgdruntime.so.4.* libgdruntime.so -ln -sf ../../../libgphobos.so.4.* libgphobos.so -%endif -%if %{build_libitm} -ln -sf ../../../libitm.so.1.* libitm.so -%endif -%if %{build_libatomic} -ln -sf ../../../libatomic.so.1.* libatomic.so -%endif -%if %{build_libasan} -ln -sf ../../../libasan.so.8.* libasan.so -mv ../../../libasan_preinit.o libasan_preinit.o -%endif -%if %{build_libubsan} -ln -sf ../../../libubsan.so.1.* libubsan.so -%endif -else -%if %{build_objc} -ln -sf ../../../../%{_lib}/libobjc.so.4 libobjc.so -%endif -ln -sf ../../../../%{_lib}/libstdc++.so.6.*[0-9] libstdc++.so -ln -sf ../../../../%{_lib}/libgomp.so.1.* libgomp.so -%if %{build_go} -ln -sf ../../../../%{_lib}/libgo.so.22.* libgo.so -%endif -%if %{build_libquadmath} -ln -sf ../../../../%{_lib}/libquadmath.so.0.* libquadmath.so -%endif -%if %{build_d} -ln -sf ../../../../%{_lib}/libgdruntime.so.4.* libgdruntime.so -ln -sf ../../../../%{_lib}/libgphobos.so.4.* libgphobos.so -%endif -%if %{build_libitm} -ln -sf ../../../../%{_lib}/libitm.so.1.* libitm.so -%endif -%if %{build_libatomic} -ln -sf ../../../../%{_lib}/libatomic.so.1.* libatomic.so -%endif -%if %{build_libasan} -ln -sf ../../../../%{_lib}/libasan.so.8.* libasan.so -mv ../../../../%{_lib}/libasan_preinit.o libasan_preinit.o -%endif -%if %{build_libubsan} -ln -sf ../../../../%{_lib}/libubsan.so.1.* libubsan.so -%endif -%if %{build_go} -ln -sf ../../../../%{_lib}/libgo.so.22.* libgo.so -%endif -%if %{build_libtsan} -rm -f libtsan.so -echo 'INPUT ( %{_prefix}/%{_lib}/'`echo ../../../../%{_lib}/libtsan.so.2.* | sed 's,^.*libt,libt,'`' )' > libtsan.so -mv ../../../../%{_lib}/libtsan_preinit.o libtsan_preinit.o -%endif -%if %{build_liblsan} -rm -f liblsan.so -echo 'INPUT ( %{_prefix}/%{_lib}/'`echo ../../../../%{_lib}/liblsan.so.0.* | sed 's,^.*libl,libl,'`' )' > liblsan.so -mv ../../../../%{_lib}/liblsan_preinit.o liblsan_preinit.o -%endif -fi -mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++.*a $FULLLPATH/ -mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++fs.*a $FULLLPATH/ -mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++exp.*a $FULLLPATH/ -mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++_libbacktrace.*a $FULLLPATH/ -mv -f %{buildroot}%{_prefix}/%{_lib}/libsupc++.*a $FULLLPATH/ -%if %{build_objc} -mv -f %{buildroot}%{_prefix}/%{_lib}/libobjc.*a . -%endif -mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.*a . -%if %{build_libquadmath} -mv -f %{buildroot}%{_prefix}/%{_lib}/libquadmath.*a $FULLLPATH/ -%endif -%if %{build_d} -mv -f %{buildroot}%{_prefix}/%{_lib}/libgdruntime.*a $FULLLPATH/ -mv -f %{buildroot}%{_prefix}/%{_lib}/libgphobos.*a $FULLLPATH/ -%endif -%if %{build_libitm} -mv -f %{buildroot}%{_prefix}/%{_lib}/libitm.*a $FULLLPATH/ -%endif -%if %{build_libatomic} -mv -f %{buildroot}%{_prefix}/%{_lib}/libatomic.*a $FULLLPATH/ -%endif -%if %{build_libasan} -mv -f %{buildroot}%{_prefix}/%{_lib}/libasan.*a $FULLLPATH/ -%endif -%if %{build_libubsan} -mv -f %{buildroot}%{_prefix}/%{_lib}/libubsan.*a $FULLLPATH/ -%endif -%if %{build_libtsan} -mv -f %{buildroot}%{_prefix}/%{_lib}/libtsan.*a $FULLPATH/ -%endif -%if %{build_liblsan} -mv -f %{buildroot}%{_prefix}/%{_lib}/liblsan.*a $FULLPATH/ -%endif -%if %{build_go} -mv -f %{buildroot}%{_prefix}/%{_lib}/libgo.*a $FULLLPATH/ -mv -f %{buildroot}%{_prefix}/%{_lib}/libgobegin.*a $FULLLPATH/ -mv -f %{buildroot}%{_prefix}/%{_lib}/libgolibbegin.*a $FULLLPATH/ -%endif - - -%ifarch %{multilib_64_archs} -mkdir -p 32 -ln -sf ../../../../libobjc.so.4 32/libobjc.so -ln -sf ../`echo ../../../../lib64/libstdc++.so.6.* | sed s~/../lib64/~/~` 32/libstdc++.so -ln -sf ../`echo ../../../../lib64/libgomp.so.1.* | sed s~/../lib64/~/~` 32/libgomp.so -%if %{build_libquadmath} -rm -f libquadmath.so -echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libquadmath.so.0.* | sed 's,^.*libq,libq,'`' )' > libquadmath.so -echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libquadmath.so.0.* | sed 's,^.*libq,libq,'`' )' > 32/libquadmath.so -%endif -mv -f %{buildroot}%{_prefix}/lib/libsupc++.*a 32/ -%if %{build_objc} -mv -f %{buildroot}%{_prefix}/lib/libobjc.*a 32/ -%endif -mv -f %{buildroot}%{_prefix}/lib/libgomp.*a 32/ -ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libstdc++.a 32/libstdc++.a -%if %{build_libquadmath} -ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libquadmath.a 32/libquadmath.a -%endif -%if %{build_go} -ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgo.a 32/libgo.a -ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgobegin.a 32/libgobegin.a -ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgolibbegin.a 32/libgolibbegin.a -%endif -%endif - -# If we are building a debug package then copy all of the static archives -# into the debug directory to keep them as unstripped copies. -%if 0%{?_enable_debug_packages} -for d in . $FULLLSUBDIR; do - mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{_lib}/debug%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/$d - for f in `find $d -maxdepth 1 -a \ - \( -name libasan.a -o -name libatomic.a \ - -o -name libcaf_single.a \ - -o -name libgcc.a -o -name libgcc_eh.a \ - -o -name libgcov.a \ - -o -name libgo.a -o -name libgobegin.a \ - -o -name libgolibbegin.a -o -name libgomp.a \ - -o -name libitm.a -o -name liblsan.a \ - -o -name libobjc.a -o -name libgdruntime.a -o -name libgphobos.a \ - -o -name libm2\*.a -o -name libquadmath.a -o -name libstdc++.a \ - -o -name libstdc++fs.a -o -name libstdc++exp.a \ - -o -name libstdc++_libbacktrace.a -o -name libsupc++.a \ - -o -name libtsan.a -o -name libubsan.a \) -a -type f`; do - cp -a $f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/debug%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/$d/ - done -done -%endif - -# Strip debug info from Fortran/ObjC/Java/Go static libraries -strip -g `find . \( -name libobjc.a -o -name libgomp.a \ - -o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a -o -name libgo.a \) -a -type f` -popd -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgomp.so.1.* -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.* -%if %{build_libquadmath} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libquadmath.so.0.* -%endif -%if %{build_d} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.4.* -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.4.* -%endif -%if %{build_libitm} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libitm.so.1.* -%endif -%if %{build_libatomic} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libatomic.so.1.* -%endif -%if %{build_libasan} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libasan.so.8.* -%endif -%if %{build_libubsan} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libubsan.so.1.* -%endif -%if %{build_libtsan} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libtsan.so.2.* -%endif -%if %{build_liblsan} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/liblsan.so.0.* -%endif -%if %{build_objc} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libobjc.so.4.* -%endif - -%if %{build_ada} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgnarl*so* -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgnat*so* -%endif - -for h in `find $FULLPATH/include -name \*.h`; do - if grep -q 'It has been auto-edited by fixincludes from' $h; then - rh=`grep -A2 'It has been auto-edited by fixincludes from' $h | tail -1 | sed 's|^.*"\(.*\)".*$|\1|'` - diff -up $rh $h || : - rm -f $h - fi -done - -cat > %{buildroot}%{_prefix}/bin/c89 <<"EOF" -#!/bin/sh -fl="-std=c89" -for opt; do - case "$opt" in - -ansi|-std=c89|-std=iso9899:1990) fl="";; - -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2 - exit 1;; - esac -done -exec gcc $fl ${1+"$@"} -EOF -cat > %{buildroot}%{_prefix}/bin/c99 <<"EOF" -#!/bin/sh -fl="-std=c99" -for opt; do - case "$opt" in - -std=c99|-std=iso9899:1999) fl="";; - -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2 - exit 1;; - esac -done -exec gcc $fl ${1+"$@"} -EOF -chmod 755 %{buildroot}%{_prefix}/bin/c?9 - -cd .. -%find_lang %{name} -%find_lang cpplib - -# Remove binaries we will not be including, so that they don't end up in -# gcc-debuginfo -rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} || : -rm -f $FULLEPATH/install-tools/{mkheaders,fixincl} -rm -f %{buildroot}%{_prefix}/lib/{32,64}/libiberty.a -rm -f %{buildroot}%{_prefix}/%{_lib}/libssp* -rm -f %{buildroot}%{_prefix}/%{_lib}/libvtv* || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gfortran || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gccgo || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcj || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ar || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-nm || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ranlib || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gdc || : - -%ifarch %{multilib_64_archs} -# Remove libraries for the other arch on multilib arches -rm -f %{buildroot}%{_prefix}/lib/lib*.so* -rm -f %{buildroot}%{_prefix}/lib/lib*.a -rm -f %{buildroot}/lib/libgcc_s*.so* -%if %{build_go} -rm -rf %{buildroot}%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform} -%ifnarch sparc64 ppc64 ppc64p7 -ln -sf %{multilib_32_arch}-%{_vendor}-%{_target_os} %{buildroot}%{_prefix}/lib/go/%{gcc_version}/%{gcc_target_platform} -%endif -%endif -%else -%ifarch sparcv9 ppc -rm -f %{buildroot}%{_prefix}/lib64/lib*.so* -rm -f %{buildroot}%{_prefix}/lib64/lib*.a -rm -f %{buildroot}/lib64/libgcc_s*.so* -%if %{build_go} -rm -rf %{buildroot}%{_prefix}/lib64/go/%{gcc_version}/%{gcc_target_platform} -%endif -%endif -%endif - -rm -f %{buildroot}%{mandir}/man3/ffi* -# /\/\/\ -# native -%else -# cross -# \/\/\/ -# additional install for cross -# remove some obsolete files -ln -sf %{cross_gcc_target_platform}-gcc %{buildroot}%{_prefix}/bin/%{cross_gcc_target_platform}-cc -set -x -rm -rRf %buildroot/%{_prefix}/lib/libiberty.a -rm -rRf %buildroot/%{_prefix}/share -find %{buildroot} -name \*.la | xargs rm -f -rm -rRf %buildroot/%{_prefix}/lib/libcc1* -set +x -# /\/\/\ -# cross -%endif - -%if !%{crossbuild} -#mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}/{,cp,objc,libobjc} -#install -m0644 -t %{buildroot}%{_docdir}/%{name}-%{version} \ -# gcc/README* rpm.doc/changelogs/gcc/ChangeLog* -#install -m0644 -t %{buildroot}%{_docdir}/%{name}-%{version}/cp \ -# rpm.doc/changelogs/gcc/cp/ChangeLog* -#install -m0644 -t %{buildroot}%{_docdir}/%{name}-%{version}/objc \ -# rpm.doc/objc/* -#install -m0644 -t %{buildroot}%{_docdir}/%{name}-%{version}/libobjc \ -# libobjc/THREADS* rpm.doc/changelogs/libobjc/ChangeLog* -# -#mkdir -p %{buildroot}%{_docdir}/libstdc++-%{version} -#install -m0644 -t %{buildroot}%{_docdir}/libstdc++-%{version} \ -# rpm.doc/changelogs/libstdc++-v3/ChangeLog* libstdc++-v3/README* -#%if %{build_libstdcxx_doc} -#mv rpm.doc/libstdc++-v3/html %{buildroot}%{_docdir}/libstdc++-%{version}/html -#%endif -# -#mkdir -p %{buildroot}%{_docdir}/libgomp-%{version} -#install -m0644 -t %{buildroot}%{_docdir}/libgomp-%{version} \ -# rpm.doc/changelogs/libgomp/ChangeLog* -# -#%if %{build_libquadmath} -#mkdir -p %{buildroot}%{_docdir}/libquadmath-%{version} -#install -m0644 -t %{buildroot}%{_docdir}/libquadmath-%{version} \ -# rpm.doc/libquadmath/ChangeLog* -#%endif -# !crossbuild -%endif - -%if !%{crossbuild} -# checking and split packaging for native ... -# native -# \/\/\/ - -# Clean up info dir -rm -rf %{buildroot}%{_datadir}info/dir - -# Help plugins find out nvra. -echo gcc-%{version}.%{_arch} > $FULLPATH/rpmver - -%check -%if 0 -cd obj-%{gcc_target_platform} - -# run the tests. -make %{?_smp_mflags} -k check ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=g++ RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector-strong}'" || : -echo ====================TESTING========================= -( LC_ALL=C ../contrib/test_summary || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}' -echo ====================TESTING END===================== -mkdir testlogs-%{_target_platform}-%{version}-%{release} -for i in `find . -name \*.log | grep -F testsuite/ | grep -v 'config.log\|acats\|ada'`; do - ln $i testlogs-%{_target_platform}-%{version}-%{release}/ || : -done -tar cf - testlogs-%{_target_platform}-%{version}-%{release} | bzip2 -9c \ - | uuencode testlogs-%{_target_platform}.tar.bz2 || : -rm -rf testlogs-%{_target_platform}-%{version}-%{release} -%endif - -# Don't add %post -p /sbin/ldconfig here, see comment below - -%postun -p /sbin/ldconfig - -# Because glibc Prereq's libgcc and /sbin/ldconfig -# comes from glibc, it might not exist yet when -# libgcc is installed -%post -n libgcc -p -if posix.access ("/sbin/ldconfig", "x") then - local pid = posix.fork () - if pid == 0 then - posix.exec ("/sbin/ldconfig") - elseif pid ~= -1 then - posix.wait (pid) - end -end - -%postun -n libgcc -p -if posix.access ("/sbin/ldconfig", "x") then - local pid = posix.fork () - if pid == 0 then - posix.exec ("/sbin/ldconfig") - elseif pid ~= -1 then - posix.wait (pid) - end -end - -%post -n libstdc++ -p /sbin/ldconfig - -%postun -n libstdc++ -p /sbin/ldconfig - -%post -n libgomp -p /sbin/ldconfig - -%postun -n libgomp -p /sbin/ldconfig - -%post -n libquadmath -p /sbin/ldconfig - -%postun -n libquadmath -p /sbin/ldconfig - -%post -n libitm -p /sbin/ldconfig - -%postun -n libitm -p /sbin/ldconfig - -%post -n libatomic -p /sbin/ldconfig - -%postun -n libatomic -p /sbin/ldconfig - -%post -n libasan -p /sbin/ldconfig - -%postun -n libasan -p /sbin/ldconfig - -%post -n libubsan -p /sbin/ldconfig - -%postun -n libubsan -p /sbin/ldconfig - -%post -n libtsan -p /sbin/ldconfig - -%postun -n libtsan -p /sbin/ldconfig - -%post -n liblsan -p /sbin/ldconfig - -%postun -n liblsan -p /sbin/ldconfig - -%files -f %{name}.lang -%defattr(-,root,root,-) -%{_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 -#%ifnarch %%{arm} aarch64 mipsel -#%%{_prefix}/bin/%%{gcc_target_platform}-gcc -#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ar -#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-nm -#%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ranlib -#%endif -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include - -# Shouldn't include all files under this fold, split to diff pkgs -#%%{_prefix}/libexec/gcc/%%{gcc_target_platform}/%%{gcc_version}/* -#%if !%%{crossbuild} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.so* -#%endif - -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 - -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/plugin -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include/* - -# Shouldn't include all files under this fold, split to diff pkgs -#%%{_prefix}/%%{_lib}/gcc/%%{gcc_target_platform}/%%{gcc_version}/include/* -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/rpmver -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stddef.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdarg.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/varargs.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdfix.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/float.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/limits.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdbool.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/iso646.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/syslimits.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/unwind.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/omp.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/openacc.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/acc_prof.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdint.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdint-gcc.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdalign.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdnoreturn.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdatomic.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/gcov.h -%ifarch %{ix86} x86_64 -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/mmintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/xmmintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/emmintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/pmmintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/tmmintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/ammintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/smmintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/nmmintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/bmmintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/wmmintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/immintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avxintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/x86intrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/fma4intrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/xopintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/lwpintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/popcntintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/bmiintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/tbmintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/ia32intrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx2intrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/bmi2intrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/f16cintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/fmaintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/lzcntintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/rtmintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/xtestintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/adxintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/prfchwintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/rdseedintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/fxsrintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/xsaveintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/xsaveoptintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512cdintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512erintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512fintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512pfintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/shaintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/mm_malloc.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/mm3dnow.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/cpuid.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/cross-stdarg.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512bwintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512dqintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512ifmaintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512ifmavlintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vbmiintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vbmivlintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vlbwintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vldqintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vlintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/clflushoptintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/clwbintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/mwaitxintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/xsavecintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/xsavesintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/clzerointrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/pkuintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx5124fmapsintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx5124vnniwintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vpopcntdqintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/sgxintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/gfniintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/cetintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/cet.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vbmi2intrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vbmi2vlintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vnniintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vnnivlintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/vaesintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/vpclmulqdqintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vpopcntdqvlintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512bitalgintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/pconfigintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/wbnoinvdintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/movdirintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/waitpkgintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/cldemoteintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512bf16vlintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512bf16intrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/enqcmdintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vp2intersectintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vp2intersectvlintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/serializeintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/tsxldtrkintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/amxtileintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/amxint8intrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/amxbf16intrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/x86gprintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/uintrintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/hresetintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/keylockerintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avxvnniintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/mwaitintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512fp16intrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512fp16vlintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avxifmaintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avxvnniint8intrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/avxneconvertintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/cmpccxaddintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/amxfp16intrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/prfchiintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/raointintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/amxcomplexintrin.h -%endif - -# For ARM port -%ifarch %{arm} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/README -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/unwind-arm-common.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/mmintrin.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_acle.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_cmse.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_fp16.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_bf16.h -%endif -%ifarch aarch64 -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_acle.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_fp16.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_bf16.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_sve.h -%endif -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/ssp/ssp.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/ssp/stdio.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/ssp/string.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/ssp/unistd.h -%if %{build_libasan} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/sanitizer -%endif - -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/crt*.o -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgcc.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgcov.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgcc_eh.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgcc_s.so -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgomp.spec -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgomp.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgomp.so -%if %{build_libitm} -%ifarch aarch64 x86_64 -%{_prefix}/lib64/gcc/%{gcc_target_platform}/%{gcc_version}/libitm.spec -%else -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libitm.spec -%endif -%endif -%if %{build_libasan} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libsanitizer.spec -%endif -%ifarch sparcv9 ppc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64 -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/crt*.o -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcc.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcov.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcc_eh.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcc_s.so -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgomp.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgomp.so -%if %{build_libquadmath} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libquadmath.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libquadmath.so -%endif -%if %{build_libitm} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libitm.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libitm.so -%endif -%if %{build_libatomic} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libatomic.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libatomic.so -%endif -%if %{build_libasan} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libasan.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libasan.so -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libasan_preinit.o -%endif -%if %{build_libubsan} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libubsan.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libubsan.so -%endif -%endif -%ifarch %{multilib_64_archs} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32 -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/crt*.o -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgcc.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgcov.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgcc_eh.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgcc_s.so -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgomp.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgomp.so -%if %{build_libquadmath} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libquadmath.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libquadmath.so -%endif -%if %{build_libitm} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libitm.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libitm.so -%endif -%if %{build_libatomic} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libatomic.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libatomic.so -%endif -%if %{build_libasan} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libasan.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libasan.so -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libasan_preinit.o -%endif -%if %{build_libubsan} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libubsan.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libubsan.so -%endif -%endif -%ifarch sparcv9 sparc64 ppc ppc64 ppc64p7 -%if %{build_libquadmath} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.so -%endif -%if %{build_libitm} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libitm.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libitm.so -%endif -%if %{build_libatomic} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libatomic.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libatomic.so -%endif -%if %{build_libasan} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libasan.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libasan.so -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libasan_preinit.o -%endif -%if %{build_libubsan} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libubsan.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libubsan.so -%endif -%else -%if %{build_libatomic} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libatomic.so -%endif -%if %{build_libasan} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libasan.so -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libasan_preinit.o -%endif -%if %{build_libubsan} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libubsan.so -%endif -%endif -%if %{build_libtsan} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libtsan.so -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libtsan_preinit.o -%endif -%if %{build_liblsan} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/liblsan.so -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/liblsan_preinit.o -%endif -%{_prefix}/libexec/getconf/default -%doc gcc/README* rpm.doc/changelogs/gcc/ChangeLog* -%{!?_licensedir:%global license %%doc} -%license gcc/COPYING* COPYING.RUNTIME - -%if !%{crossbuild} -%files doc -%defattr(-,root,root,-) -%{_docdir}/%{name}-%{version} -%{_mandir}/man1/cpp.1* -%{_mandir}/man1/gcc.1* -%{_mandir}/man1/gcov.1* -%{_mandir}/man1/gcov-tool.1* -%{_mandir}/man1/gcov-dump.1* -%{_mandir}/man1/g++.1* -%{_mandir}/man1/lto-dump.1* -%{_mandir}/man7/* -# !crossbuild -%endif - -%files -n cpp -f cpplib.lang -%defattr(-,root,root,-) -/%{_lib}/cpp -%{_prefix}/bin/cpp -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 - -%files -n libgcc -%defattr(-,root,root,-) -/%{_lib}/libgcc_s-%{gcc_version}.so.1 -/%{_lib}/libgcc_s.* -%license gcc/COPYING.LIB - -%files c++ -%defattr(-,root,root,-) -%ifnarch %{arm} aarch64 mipsel -%{_prefix}/bin/%{gcc_target_platform}-*++ -%endif -%{_prefix}/bin/g++ -%{_prefix}/bin/c++ -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/g++-mapper-server -%ifarch %{multilib_64_archs} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32 -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.so -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++fs.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++exp.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++_libbacktrace.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libsupc++.a -%endif -%ifarch %{multilib_64_archs} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++exp.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/stdc++fslibstdc++_libbacktrace.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a -%endif - -%files -n libstdc++ -%defattr(-,root,root,-) -%{_prefix}/%{_lib}/libstdc++.so.6* -%dir %{_datadir}/gdb -%dir %{_datadir}/gdb/auto-load -%dir %{_datadir}/gdb/auto-load/%{_prefix} -%dir %{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/ -%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc*gdb.py* -%dir %{_prefix}/share/gcc-%{gcc_version} -%{_prefix}/share/gcc-%{gcc_version}/python -%{_prefix}/share/gcc-%{gcc_version}/python/libstdcxx - -%files -n libstdc++-devel -%defattr(-,root,root,-) -%dir %{_prefix}/include/c++ -%dir %{_prefix}/include/c++/%{gcc_version} -%{_prefix}/include/c++/%{gcc_version} -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a -%ifnarch %{multilib_64_archs} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so -%endif -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++fs.a - -%files -n libstdc++-static -%defattr(-,root,root,-) -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a - -%if !%{crossbuild} -%if %{build_libstdcxx_doc} -%files -n libstdc++-doc -%defattr(-,root,root) -%{_mandir}/man3/* -%{_docdir}/libstdc++-%{version} -%endif -# !crossbuild -%endif - -%files -n libgomp -%defattr(-,root,root,-) -%{_prefix}/%{_lib}/libgomp.* - -%if %{build_64bit_multilib} -%files -n gcc-multilib -%defattr(-,root,root,-) -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64 -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/crt*.o -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcc.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcov.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcc_eh.a -%dir %{_prefix}/lib64 -%{_prefix}/lib64/* -%endif - -%if %{build_libquadmath} -%files -n libquadmath -%defattr(-,root,root,-) -%{_prefix}/%{_lib}/libquadmath.so.0* -%license rpm.doc/libquadmath/COPYING* - -%files -n libquadmath-devel -%defattr(-,root,root,-) -%{_prefix}/%{_lib}/libquadmath.so -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/quadmath.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/quadmath_weak.h -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.so - -%files -n libquadmath-static -%defattr(-,root,root,-) -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.a -%endif - -%if %{build_libitm} -%files -n libitm -%defattr(-,root,root,-) -%{_prefix}/%{_lib}/libitm.so.1* - -%files -n libitm-devel -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include -%doc rpm.doc/libitm/ChangeLog* - -%files -n libitm-static -%defattr(-,root,root,-) -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libitm.a -%endif - -%if %{build_libatomic} -%files -n libatomic -%defattr(-,root,root,-) -%{_prefix}/%{_lib}/libatomic.so.1* - -%files -n libatomic-static -%defattr(-,root,root,-) -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libatomic.a -%endif - -%if %{build_libasan} -%files -n libasan -%defattr(-,root,root,-) -%{_prefix}/%{_lib}/libasan.so.8* - -%files -n libasan-static -%defattr(-,root,root,-) -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libasan.a -%endif - -%if %{build_libubsan} -%files -n libubsan -%{_prefix}/%{_lib}/libubsan.so.1* - -%files -n libubsan-static -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%ifarch sparcv9 ppc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/lib32 -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libubsan.a -%endif -%ifarch sparc64 ppc64 ppc64p7 -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/lib64 -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/libubsan.a -%endif -%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libubsan.a -%endif -%{!?_licensedir:%global license %%doc} -%license libsanitizer/LICENSE.TXT -%endif - -%if %{build_libtsan} -%files -n libtsan -%defattr(-,root,root,-) -%{_prefix}/%{_lib}/libtsan.so.2* - -%files -n libtsan-static -%defattr(-,root,root,-) -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libtsan.a -%{!?_licensedir:%global license %%doc} -%license libsanitizer/LICENSE.TXT -%endif - -%if %{build_liblsan} -%files -n liblsan -%{_prefix}/%{_lib}/liblsan.so.0* - -%files -n liblsan-static -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/liblsan.a -%{!?_licensedir:%global license %%doc} -%license libsanitizer/LICENSE.TXT -%endif - -%if %{build_go} -%files go -%attr(755,root,root) %{_prefix}/bin/go.gcc -%{_prefix}/bin/gccgo -%attr(755,root,root) %{_prefix}/bin/gofmt.gcc -%{_mandir}/man1/gccgo.1* -%{_mandir}/man1/go.1* -%{_mandir}/man1/gofmt.1* -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/go1 -%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cgo -%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/buildid -%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/test2json -%attr(755,root,root) %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/vet -%ifarch %{multilib_64_archs} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32 -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgo.so -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgo.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgobegin.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgolibbegin.a -%endif -%ifarch sparcv9 ppc %{multilib_64_archs} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so -%endif -%doc rpm.doc/go/* - -%files -n libgo -%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.22* -%doc rpm.doc/libgo/* - -%files -n libgo-devel -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/%{_lib}/go -%dir %{_prefix}/%{_lib}/go/%{gcc_version} -%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform} -%ifarch %{multilib_64_archs} -%ifnarch sparc64 ppc64 ppc64p7 -%dir %{_prefix}/%{_lib}/go -%dir %{_prefix}/%{_lib}/go/%{gcc_version} -%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform} -%endif -%endif -%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgobegin.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgolibbegin.a -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so -%endif - -%files -n libgo-static -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.a -%endif -%endif - -%files plugin-devel -%defattr(-,root,root,-) -%dir %{_prefix}/%{_lib}/gcc -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} -%dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/plugin -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin - -# /\/\/\ -# native -%else -# cross -# \/\/\/ -%files -%defattr(-,root,root,-) -%{_prefix} -# /\/\/\ -# cross -%endif diff --git a/rpm/gcc-rpmlintrc b/rpm/gcc13-rpmlintrc similarity index 100% rename from rpm/gcc-rpmlintrc rename to rpm/gcc13-rpmlintrc diff --git a/rpm/gcc.changes b/rpm/gcc13.changes similarity index 100% rename from rpm/gcc.changes rename to rpm/gcc13.changes diff --git a/rpm/cross-aarch64-gcc.spec b/rpm/gcc13.spec similarity index 98% rename from rpm/cross-aarch64-gcc.spec rename to rpm/gcc13.spec index 330627a..acee7f5 100644 --- a/rpm/cross-aarch64-gcc.spec +++ b/rpm/gcc13.spec @@ -1,6 +1,5 @@ -# Combined gcc / cross-armv*-gcc) specfile -Name: cross-aarch64-gcc -%define crossarch aarch64 +# Combined gcc / cross-armv*-gccNN) specfile +Name: gcc13 # Keep Name on top ! %if "%{?bootstrap}" == "" @@ -21,8 +20,8 @@ Name: cross-aarch64-gcc # crossbuild / accelerator section # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ %define crossbuild 0 -%if "%{name}" != "gcc" -# this is the ix86 -> arm cross compiler (cross-armv*-gcc) +%if "%{name}" != "gcc13" +# this is the ix86 -> arm cross compiler (cross-armv*-gccNN) # # We set requires/provides by hand and disable post-build-checks. # Captain Trunk: Sledge, you cannot disarm that nuclear bomb! @@ -103,6 +102,7 @@ ExclusiveArch: %ix86 x86_64 # end crossbuild / accelerator section %endif +%global binsuffix -13 %global gcc_version 13.3.1 %global gcc_release 1 %global _unpackaged_files_terminate_build 0 @@ -724,6 +724,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" --enable-lto \ --enable-linker-build-id \ --disable-libmpx \ + --program-suffix=%{binsuffix} \ %if %{bootstrap} == 0 --enable-languages=c,c++${enablelgo},lto \ --enable-threads=posix \ @@ -1250,8 +1251,8 @@ EOF chmod 755 %{buildroot}%{_prefix}/bin/c?9 cd .. -%find_lang %{name} -%find_lang cpplib +%find_lang %{name}%{binsuffix} +%find_lang cpplib%{binsuffix} # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo @@ -1298,7 +1299,7 @@ rm -f %{buildroot}%{mandir}/man3/ffi* # \/\/\/ # additional install for cross # remove some obsolete files -ln -sf %{cross_gcc_target_platform}-gcc %{buildroot}%{_prefix}/bin/%{cross_gcc_target_platform}-cc +ln -sf %{cross_gcc_target_platform}-gcc%{binsuffix} %{buildroot}%{_prefix}/bin/%{cross_gcc_target_platform}-cc%{binsuffix} set -x rm -rRf %buildroot/%{_prefix}/lib/libiberty.a rm -rRf %buildroot/%{_prefix}/share @@ -1433,17 +1434,17 @@ end %files -f %{name}.lang %defattr(-,root,root,-) -%{_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/cc%{binsuffix} +%{_prefix}/bin/c89%{binsuffix} +%{_prefix}/bin/c99%{binsuffix} +%{_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} #%ifnarch %%{arm} aarch64 mipsel #%%{_prefix}/bin/%%{gcc_target_platform}-gcc #%%{_prefix}/bin/%%{gcc_target_platform}-gcc-ar @@ -1759,13 +1760,13 @@ end %files doc %defattr(-,root,root,-) %{_docdir}/%{name}-%{version} -%{_mandir}/man1/cpp.1* -%{_mandir}/man1/gcc.1* -%{_mandir}/man1/gcov.1* -%{_mandir}/man1/gcov-tool.1* -%{_mandir}/man1/gcov-dump.1* -%{_mandir}/man1/g++.1* -%{_mandir}/man1/lto-dump.1* +%{_mandir}/man1/cpp%{binsuffix}.1* +%{_mandir}/man1/gcc%{binsuffix}.1* +%{_mandir}/man1/gcov%{binsuffix}.1* +%{_mandir}/man1/gcov-tool%{binsuffix}.1* +%{_mandir}/man1/gcov-dump%{binsuffix}.1* +%{_mandir}/man1/g++%{binsuffix}.1* +%{_mandir}/man1/lto-dump%{binsuffix}.1* %{_mandir}/man7/* # !crossbuild %endif @@ -1790,8 +1791,8 @@ end %ifnarch %{arm} aarch64 mipsel %{_prefix}/bin/%{gcc_target_platform}-*++ %endif -%{_prefix}/bin/g++ -%{_prefix}/bin/c++ +%{_prefix}/bin/g++%{binsuffix} +%{_prefix}/bin/c++%{binsuffix} %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2001,9 +2002,9 @@ end %if %{build_go} %files go -%attr(755,root,root) %{_prefix}/bin/go.gcc -%{_prefix}/bin/gccgo -%attr(755,root,root) %{_prefix}/bin/gofmt.gcc +%{_prefix}/bin/gccgo%{binsuffix} +%{_prefix}/bin/go%{binsuffix} +%{_prefix}/bin/gofmt%{binsuffix} %{_mandir}/man1/gccgo.1* %{_mandir}/man1/go.1* %{_mandir}/man1/gofmt.1* diff --git a/rpm/precheckin.sh b/rpm/precheckin.sh index d726477..8d06d85 100755 --- a/rpm/precheckin.sh +++ b/rpm/precheckin.sh @@ -1,6 +1,6 @@ #!/bin/bash -NAME=gcc +NAME=gcc13 SPECNAME=${NAME}.spec ARCHES="armv7hl i486 x86_64 aarch64" # If your %_vendor changes, please edit this too --cvm From 9fec4627eab391d47600e54c70d35c9f6e514ef9 Mon Sep 17 00:00:00 2001 From: Matti Viljanen Date: Fri, 13 Dec 2024 16:40:30 +0000 Subject: [PATCH 6/8] fixup! Change (base) name to gcc13, use --program-suffix --- rpm/cross-aarch64-gcc13.spec | 4 ++-- rpm/cross-armv7hl-gcc13.spec | 4 ++-- rpm/cross-i486-gcc13.spec | 4 ++-- rpm/cross-x86_64-gcc13.spec | 4 ++-- rpm/gcc13.spec | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/rpm/cross-aarch64-gcc13.spec b/rpm/cross-aarch64-gcc13.spec index 7aff9a7..f42c7ad 100644 --- a/rpm/cross-aarch64-gcc13.spec +++ b/rpm/cross-aarch64-gcc13.spec @@ -872,8 +872,8 @@ mkdir -p %{buildroot}/%{_lib} ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp %if %{build_go} -mv %{buildroot}%{_prefix}/bin/go{,.gcc} -mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc} +mv %{buildroot}%{_prefix}/bin/go{,.gcc}%{binsuffix} +mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc}%{binsuffix} %endif cxxconfig="`find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h`" diff --git a/rpm/cross-armv7hl-gcc13.spec b/rpm/cross-armv7hl-gcc13.spec index 93edf76..0fe7a21 100644 --- a/rpm/cross-armv7hl-gcc13.spec +++ b/rpm/cross-armv7hl-gcc13.spec @@ -872,8 +872,8 @@ mkdir -p %{buildroot}/%{_lib} ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp %if %{build_go} -mv %{buildroot}%{_prefix}/bin/go{,.gcc} -mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc} +mv %{buildroot}%{_prefix}/bin/go{,.gcc}%{binsuffix} +mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc}%{binsuffix} %endif cxxconfig="`find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h`" diff --git a/rpm/cross-i486-gcc13.spec b/rpm/cross-i486-gcc13.spec index e887d66..24471ae 100644 --- a/rpm/cross-i486-gcc13.spec +++ b/rpm/cross-i486-gcc13.spec @@ -872,8 +872,8 @@ mkdir -p %{buildroot}/%{_lib} ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp %if %{build_go} -mv %{buildroot}%{_prefix}/bin/go{,.gcc} -mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc} +mv %{buildroot}%{_prefix}/bin/go{,.gcc}%{binsuffix} +mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc}%{binsuffix} %endif cxxconfig="`find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h`" diff --git a/rpm/cross-x86_64-gcc13.spec b/rpm/cross-x86_64-gcc13.spec index 87e8bd5..989fdc1 100644 --- a/rpm/cross-x86_64-gcc13.spec +++ b/rpm/cross-x86_64-gcc13.spec @@ -872,8 +872,8 @@ mkdir -p %{buildroot}/%{_lib} ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp %if %{build_go} -mv %{buildroot}%{_prefix}/bin/go{,.gcc} -mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc} +mv %{buildroot}%{_prefix}/bin/go{,.gcc}%{binsuffix} +mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc}%{binsuffix} %endif cxxconfig="`find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h`" diff --git a/rpm/gcc13.spec b/rpm/gcc13.spec index acee7f5..fe746b4 100644 --- a/rpm/gcc13.spec +++ b/rpm/gcc13.spec @@ -871,8 +871,8 @@ mkdir -p %{buildroot}/%{_lib} ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp %if %{build_go} -mv %{buildroot}%{_prefix}/bin/go{,.gcc} -mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc} +mv %{buildroot}%{_prefix}/bin/go{,.gcc}%{binsuffix} +mv %{buildroot}%{_prefix}/bin/gofmt{,.gcc}%{binsuffix} %endif cxxconfig="`find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h`" From 2e5f71b3bb493b2063c0d4d9f15b6bdefdd4261b Mon Sep 17 00:00:00 2001 From: Matti Viljanen Date: Mon, 16 Dec 2024 10:18:28 +0200 Subject: [PATCH 7/8] fixup! Change (base) name to gcc13, use --program-suffix --- rpm/cross-aarch64-gcc13.spec | 354 +++++++++++++++++++---------------- rpm/cross-armv7hl-gcc13.spec | 354 +++++++++++++++++++---------------- rpm/cross-i486-gcc13.spec | 354 +++++++++++++++++++---------------- rpm/cross-x86_64-gcc13.spec | 354 +++++++++++++++++++---------------- rpm/gcc13.spec | 354 +++++++++++++++++++---------------- 5 files changed, 955 insertions(+), 815 deletions(-) mode change 100644 => 100755 rpm/gcc13.spec diff --git a/rpm/cross-aarch64-gcc13.spec b/rpm/cross-aarch64-gcc13.spec index f42c7ad..a4171a8 100644 --- a/rpm/cross-aarch64-gcc13.spec +++ b/rpm/cross-aarch64-gcc13.spec @@ -104,6 +104,7 @@ ExclusiveArch: %ix86 x86_64 %endif %global binsuffix -13 +%global pkgsuffix 13 %global gcc_version 13.3.1 %global gcc_release 1 %global _unpackaged_files_terminate_build 0 @@ -212,9 +213,9 @@ BuildRequires: graphviz %endif %if !%{crossbuild} -Requires: cpp = %{version}-%{release} -Requires: libgcc >= %{version}-%{release} -Requires: libgomp = %{version}-%{release} +Requires: (cpp%{pkgsuffix} = %{version}-%{release} or cpp = %{version}-%{release}) +Requires: (libgcc%{pkgsuffix} >= %{version}-%{release} or libgcc >= %{version}-%{release}) +Requires: (libgomp%{pkgsuffix} = %{version}-%{release} or libgomp = %{version}-%{release}) Requires: glibc-devel Requires: binutils >= 2.25 %endif @@ -229,7 +230,7 @@ Requires: glibc64bit-helper BuildRequires: net-tools, procps %endif -Obsoletes: gcc < %{version}-%{release} +Obsoletes: gcc%{pkgsuffix} < %{version}-%{release} AutoReq: true # /!crossbuild %endif @@ -254,24 +255,24 @@ Man and info pages for %{name}. # !crossbuild %endif -%package -n libgcc +%package -n libgcc%{pkgsuffix} Summary: GCC version 13.3 shared support library -Obsoletes: libgcc < %{version}-%{release} +Obsoletes: libgcc%{pkgsuffix} < %{version}-%{release} Autoreq: true %if "%{version}" != "%{gcc_version}" Provides: libgcc = %{gcc_version} %endif -%description -n libgcc +%description -n libgcc%{pkgsuffix} This package contains GCC shared support library which is needed e.g. for exception handling support. %package c++ Summary: C++ support for GCC -Requires: gcc = %{version}-%{release} -Requires: libstdc++ = %{version}-%{release} -Requires: libstdc++-devel = %{version}-%{release} -Obsoletes: gcc-c++ < %{version}-%{release} +Requires: (gcc%{pkgsuffix} = %{version}-%{release} or gcc = %{version}-%{release}) +Requires: (libstdc++%{pkgsuffix} = %{version}-%{release} or libstdc++ = %{version}-%{release}) +Requires: (libstdc++%{pkgsuffix}-devel = %{version}-%{release} or libstdc++-devel = %{version}-%{release}) +Obsoletes: gcc%{pkgsuffix}-c++ < %{version}-%{release} Autoreq: true %description c++ @@ -279,182 +280,181 @@ 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 libstdc++ +%package -n libstdc++%{pkgsuffix} Summary: GNU Standard C++ Library -Obsoletes: libstdc++ < %{version}-%{release} -Obsoletes: libstdc++6 < %{version}-%{release} +Obsoletes: libstdc++%{pkgsuffix} < %{version}-%{release} Autoreq: true Requires: glibc -%description -n libstdc++ +%description -n libstdc++%{pkgsuffix} The libstdc++ package contains a rewritten standard compliant GCC Standard C++ Library. -%package -n libstdc++-devel +%package -n libstdc++%{pkgsuffix}-devel Summary: Header files and libraries for C++ development -Requires: libstdc++ = %{version}-%{release} -Obsoletes: libstdc++-devel < %{version}-%{release} +Requires: libstdc++%{pkgsuffix} = %{version}-%{release} +Obsoletes: libstdc++%{pkgsuffix}-devel < %{version}-%{release} Autoreq: true -%description -n libstdc++-devel +%description -n libstdc++%{pkgsuffix}-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 libstdc++-static +%package -n libstdc++%{pkgsuffix}-static Summary: Static libraries for the GNU standard C++ library -Requires: libstdc++-devel = %{version}-%{release} +Requires: libstdc++%{pkgsuffix}-devel = %{version}-%{release} Autoreq: true -%description -n libstdc++-static +%description -n libstdc++%{pkgsuffix}-static Static libraries for the GNU standard C++ library. %if !%{crossbuild} -%package -n libstdc++-doc +%package -n libstdc++%{pkgsuffix}-doc Summary: Documentation for the GNU standard C++ library -Requires: libstdc++ = %{version}-%{release} -Obsoletes: libstdc++-docs +Requires: libstdc++%{pkgsuffix} = %{version}-%{release} +Obsoletes: libstdc++%{pkgsuffix}-docs Autoreq: true -%description -n libstdc++-doc +%description -n libstdc++%{pkgsuffix}-doc Manual, doxygen generated API information and Frequently Asked Questions for the GNU standard C++ library. # !crossbuild %endif -%package -n libgomp +%package -n libgomp%{pkgsuffix} Summary: GCC OpenMP v4.5 shared support library -Obsoletes: libgomp < %{version}-%{release} +Obsoletes: libgomp%{pkgsuffix} < %{version}-%{release} -%description -n libgomp +%description -n libgomp%{pkgsuffix} This package contains GCC shared support library which is needed for OpenMP v3.0 support. -%package -n libquadmath +%package -n libquadmath%{pkgsuffix} Summary: GCC __float128 shared support library -%description -n libquadmath +%description -n libquadmath%{pkgsuffix} This package contains GCC shared support library which is needed for __float128 math support and for Fortran REAL*16 support. -%package -n libquadmath-devel +%package -n libquadmath%{pkgsuffix}-devel Summary: GCC __float128 support -Requires: libquadmath = %{version}-%{release} -Requires: gcc = %{version}-%{release} +Requires: libquadmath%{pkgsuffix} = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} -%description -n libquadmath-devel +%description -n libquadmath%{pkgsuffix}-devel This package contains headers for building Fortran programs using REAL*16 and programs using __float128 math. -%package -n libquadmath-static +%package -n libquadmath%{pkgsuffix}-static Summary: Static libraries for __float128 support -Requires: libquadmath-devel = %{version}-%{release} +Requires: libquadmath%{pkgsuffix}-devel = %{version}-%{release} -%description -n libquadmath-static +%description -n libquadmath%{pkgsuffix}-static This package contains static libraries for building Fortran programs using REAL*16 and programs using __float128 math. -%package -n libitm +%package -n libitm%{pkgsuffix} Summary: The GNU Transactional Memory library -%description -n libitm +%description -n libitm%{pkgsuffix} This package contains the GNU Transactional Memory library which is a GCC transactional memory support runtime library. -%package -n libitm-devel +%package -n libitm%{pkgsuffix}-devel Summary: The GNU Transactional Memory support -Requires: libitm = %{version}-%{release} -Requires: gcc = %{version}-%{release} +Requires: libitm%{pkgsuffix} = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} -%description -n libitm-devel +%description -n libitm%{pkgsuffix}-devel This package contains headers and support files for the GNU Transactional Memory library. -%package -n libitm-static +%package -n libitm%{pkgsuffix}-static Summary: The GNU Transactional Memory static library -Requires: libitm-devel = %{version}-%{release} +Requires: libitm%{pkgsuffix}-devel = %{version}-%{release} -%description -n libitm-static +%description -n libitm%{pkgsuffix}-static This package contains GNU Transactional Memory static libraries. -%package -n libatomic +%package -n libatomic%{pkgsuffix} Summary: The GNU Atomic library -%description -n libatomic +%description -n libatomic%{pkgsuffix} This package contains the GNU Atomic library which is a GCC support runtime library for atomic operations not supported by hardware. -%package -n libatomic-static +%package -n libatomic%{pkgsuffix}-static Summary: The GNU Atomic static library -Requires: libatomic = %{version}-%{release} +Requires: libatomic%{pkgsuffix} = %{version}-%{release} -%description -n libatomic-static +%description -n libatomic%{pkgsuffix}-static This package contains GNU Atomic static libraries. -%package -n libasan +%package -n libasan%{pkgsuffix} Summary: The Address Sanitizer runtime library -%description -n libasan +%description -n libasan%{pkgsuffix} This package contains the Address Sanitizer library which is used for -fsanitize=address instrumented programs. -%package -n libasan-static +%package -n libasan%{pkgsuffix}-static Summary: The Address Sanitizer static library -Requires: libasan = %{version}-%{release} +Requires: libasan%{pkgsuffix} = %{version}-%{release} -%description -n libasan-static +%description -n libasan%{pkgsuffix}-static This package contains Address Sanitizer static runtime library. -%package -n libtsan +%package -n libtsan%{pkgsuffix} Summary: The Thread Sanitizer runtime library -%description -n libtsan +%description -n libtsan%{pkgsuffix} This package contains the Thread Sanitizer library which is used for -fsanitize=thread instrumented programs. -%package -n libtsan-static +%package -n libtsan%{pkgsuffix}-static Summary: The Thread Sanitizer static library -Requires: libtsan = %{version}-%{release} +Requires: libtsan%{pkgsuffix} = %{version}-%{release} -%description -n libtsan-static +%description -n libtsan%{pkgsuffix}-static This package contains Thread Sanitizer static runtime library. -%package -n libubsan +%package -n libubsan%{pkgsuffix} Summary: The Undefined Behavior Sanitizer runtime library -%description -n libubsan +%description -n libubsan%{pkgsuffix} This package contains the Undefined Behavior Sanitizer library which is used for -fsanitize=undefined instrumented programs. -%package -n libubsan-static +%package -n libubsan%{pkgsuffix}-static Summary: The Undefined Behavior Sanitizer static library -Requires: libubsan = %{version}-%{release} +Requires: libubsan%{pkgsuffix} = %{version}-%{release} -%description -n libubsan-static +%description -n libubsan%{pkgsuffix}-static This package contains Undefined Behavior Sanitizer static runtime library. -%package -n liblsan +%package -n liblsan%{pkgsuffix} Summary: The Leak Sanitizer runtime library -%description -n liblsan +%description -n liblsan%{pkgsuffix} This package contains the Leak Sanitizer library which is used for -fsanitize=leak instrumented programs. -%package -n liblsan-static +%package -n liblsan%{pkgsuffix}-static Summary: The Leak Sanitizer static library -Requires: liblsan = %{version}-%{release} +Requires: liblsan%{pkgsuffix} = %{version}-%{release} -%description -n liblsan-static +%description -n liblsan%{pkgsuffix}-static This package contains Leak Sanitizer static runtime library. -%package -n cpp +%package -n cpp%{pkgsuffix} Summary: The C Preprocessor Requires: mpc -Obsoletes: cpp < %{version}-%{release} +Obsoletes: cpp%{pkgsuffix} < %{version}-%{release} Autoreq: true -%description -n cpp +%description -n cpp%{pkgsuffix} 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 @@ -476,19 +476,19 @@ compiler about where each source line originated). You should install this package if you are a C programmer and you use macros. -%package -n gcc-multilib +%package -n gcc%{pkgsuffix}-multilib Summary: for 64bit multilib support Autoreq: true -%description -n gcc-multilib +%description -n gcc%{pkgsuffix}-multilib This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %package go Summary: Go support -Requires: gcc = %{version}-%{release} -Requires: libgo = %{version}-%{release} -Requires: libgo-devel = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} +Requires: libgo%{pkgsuffix} = %{version}-%{release} +Requires: libgo%{pkgsuffix}-devel = %{version}-%{release} Provides: gccgo = %{version}-%{release} Autoreq: true @@ -496,34 +496,34 @@ Autoreq: true The gcc-go package provides support for compiling Go programs with the GNU Compiler Collection. -%package -n libgo +%package -n libgo%{pkgsuffix} Summary: Go runtime Autoreq: true -%description -n libgo +%description -n libgo%{pkgsuffix} This package contains Go shared library which is needed to run Go dynamically linked programs. -%package -n libgo-devel +%package -n libgo%{pkgsuffix}-devel Summary: Go development libraries -Requires: libgo = %{version}-%{release} +Requires: libgo%{pkgsuffix} = %{version}-%{release} Autoreq: true -%description -n libgo-devel +%description -n libgo%{pkgsuffix}-devel This package includes libraries and support files for compiling Go programs. -%package -n libgo-static +%package -n libgo%{pkgsuffix}-static Summary: Static Go libraries -Requires: libgo = %{version}-%{release} -Requires: gcc = %{version}-%{release} +Requires: libgo%{pkgsuffix} = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} -%description -n libgo-static +%description -n libgo%{pkgsuffix}-static This package contains static Go libraries. %package plugin-devel Summary: Support for compiling GCC plugins -Requires: gcc = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} Requires: gmp-devel >= 4.1.2-8, mpfr-devel >= 3.1.0, libmpc-devel >= 0.8.1 %description plugin-devel @@ -867,9 +867,9 @@ FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_versio mkdir -p $FULLPATH mkdir -p $FULLEPATH -ln -sf gcc %{buildroot}%{_prefix}/bin/cc +ln -sf gcc%{binsuffix} %{buildroot}%{_prefix}/bin/cc%{binsuffix} mkdir -p %{buildroot}/%{_lib} -ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp +ln -sf ..%{_prefix}/bin/cpp%{binsuffix} %{buildroot}/%{_lib}/cpp%{binsuffix} %if %{build_go} mv %{buildroot}%{_prefix}/bin/go{,.gcc}%{binsuffix} @@ -1032,7 +1032,7 @@ ln -sf ../../../libgdruntime.so.4.* libgdruntime.so ln -sf ../../../libgphobos.so.4.* libgphobos.so %endif %if %{build_libitm} -ln -sf ../../../libitm.so.1.* libitm.so +ln -sf ../../../libitm.so.1.* libitm%{binsuffix}.so %endif %if %{build_libatomic} ln -sf ../../../libatomic.so.1.* libatomic.so @@ -1225,7 +1225,7 @@ for h in `find $FULLPATH/include -name \*.h`; do fi done -cat > %{buildroot}%{_prefix}/bin/c89 <<"EOF" +cat > %{buildroot}%{_prefix}/bin/c89%{binsuffix} <<"EOF" #!/bin/sh fl="-std=c89" for opt; do @@ -1235,9 +1235,9 @@ for opt; do exit 1;; esac done -exec gcc $fl ${1+"$@"} +exec gcc%{binsuffix} $fl ${1+"$@"} EOF -cat > %{buildroot}%{_prefix}/bin/c99 <<"EOF" +cat > %{buildroot}%{_prefix}/bin/c99%{binsuffix} <<"EOF" #!/bin/sh fl="-std=c99" for opt; do @@ -1247,28 +1247,33 @@ for opt; do exit 1;; esac done -exec gcc $fl ${1+"$@"} +exec gcc%{binsuffix} $fl ${1+"$@"} EOF -chmod 755 %{buildroot}%{_prefix}/bin/c?9 +chmod 755 %{buildroot}%{_prefix}/bin/c?9%{binsuffix} cd .. -%find_lang %{name}%{binsuffix} -%find_lang cpplib%{binsuffix} + +for lc_messages in `ls -d %{buildroot}/%{_prefix}/share/locale/*/LC_MESSAGES/`; do + mv $lc_messages/gcc.mo $lc_messages/gcc13.mo || : + mv $lc_messages/libstdc++.mo $lc_messages/libstdc++13.mo || : +done +%find_lang gcc13 +%find_lang cpplib # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} || : -rm -f $FULLEPATH/install-tools/{mkheaders,fixincl} +rm -f $FULLEPATH/install-tools/* rm -f %{buildroot}%{_prefix}/lib/{32,64}/libiberty.a rm -f %{buildroot}%{_prefix}/%{_lib}/libssp* rm -f %{buildroot}%{_prefix}/%{_lib}/libvtv* || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gfortran || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gccgo || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcj || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ar || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-nm || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ranlib || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gdc || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gfortran%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gccgo%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcj%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ar%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-nm%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ranlib%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gdc%{binsuffix} || : %ifarch %{multilib_64_archs} # Remove libraries for the other arch on multilib arches @@ -1377,7 +1382,7 @@ rm -rf testlogs-%{_target_platform}-%{version}-%{release} # Because glibc Prereq's libgcc and /sbin/ldconfig # comes from glibc, it might not exist yet when # libgcc is installed -%post -n libgcc -p +%post -n libgcc%{pkgsuffix} -p if posix.access ("/sbin/ldconfig", "x") then local pid = posix.fork () if pid == 0 then @@ -1387,7 +1392,7 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%postun -n libgcc -p +%postun -n libgcc%{pkgsuffix} -p if posix.access ("/sbin/ldconfig", "x") then local pid = posix.fork () if pid == 0 then @@ -1397,41 +1402,61 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%post -n libstdc++ -p /sbin/ldconfig +%post go +pushd %{_bindir} +if [ ! -f go%{binsuffix} ] ; then + ln -s go.gcc%{binsuffix} go%{binsuffix} +fi +if [ ! -f gofmt%{binsuffix} ] ; then + ln -s gofmt.gcc%{binsuffix} gofmt%{binsuffix} +fi +popd + +%preun go +pushd %{_bindir} +if [ -L go%{binsuffix} ]; then + rm go%{binsuffix} +fi +if [ -L gofmt%{binsuffix} ]; then + rm gofmt%{binsuffix} +fi +popd + +%post -n libstdc++%{pkgsuffix} -p /sbin/ldconfig -%postun -n libstdc++ -p /sbin/ldconfig +%postun -n libstdc++%{pkgsuffix} -p /sbin/ldconfig -%post -n libgomp -p /sbin/ldconfig +%post -n libgomp%{pkgsuffix} -p /sbin/ldconfig -%postun -n libgomp -p /sbin/ldconfig +%postun -n libgomp%{pkgsuffix} -p /sbin/ldconfig -%post -n libquadmath -p /sbin/ldconfig +%post -n libquadmath%{pkgsuffix} -p /sbin/ldconfig -%postun -n libquadmath -p /sbin/ldconfig +%postun -n libquadmath%{pkgsuffix} -p /sbin/ldconfig -%post -n libitm -p /sbin/ldconfig +%post -n libitm%{pkgsuffix} -p /sbin/ldconfig -%postun -n libitm -p /sbin/ldconfig +%postun -n libitm%{pkgsuffix} -p /sbin/ldconfig -%post -n libatomic -p /sbin/ldconfig +%post -n libatomic%{pkgsuffix} -p /sbin/ldconfig -%postun -n libatomic -p /sbin/ldconfig +%postun -n libatomic%{pkgsuffix} -p /sbin/ldconfig -%post -n libasan -p /sbin/ldconfig +%post -n libasan%{pkgsuffix} -p /sbin/ldconfig -%postun -n libasan -p /sbin/ldconfig +%postun -n libasan%{pkgsuffix} -p /sbin/ldconfig -%post -n libubsan -p /sbin/ldconfig +%post -n libubsan%{pkgsuffix} -p /sbin/ldconfig -%postun -n libubsan -p /sbin/ldconfig +%postun -n libubsan%{pkgsuffix} -p /sbin/ldconfig -%post -n libtsan -p /sbin/ldconfig +%post -n libtsan%{pkgsuffix} -p /sbin/ldconfig -%postun -n libtsan -p /sbin/ldconfig +%postun -n libtsan%{pkgsuffix} -p /sbin/ldconfig -%post -n liblsan -p /sbin/ldconfig +%post -n liblsan%{pkgsuffix} -p /sbin/ldconfig -%postun -n liblsan -p /sbin/ldconfig +%postun -n liblsan%{pkgsuffix} -p /sbin/ldconfig %files -f %{name}.lang %defattr(-,root,root,-) @@ -1772,16 +1797,16 @@ end # !crossbuild %endif -%files -n cpp -f cpplib.lang +%files -n cpp%{pkgsuffix} -f cpplib.lang %defattr(-,root,root,-) -/%{_lib}/cpp -%{_prefix}/bin/cpp +/%{_lib}/cpp%{binsuffix} +%{_prefix}/bin/cpp%{binsuffix} %dir %{_prefix}/libexec/gcc %dir %{_prefix}/libexec/gcc/%{gcc_target_platform} %dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 -%files -n libgcc +%files -n libgcc%{pkgsuffix} %defattr(-,root,root,-) /%{_lib}/libgcc_s-%{gcc_version}.so.1 /%{_lib}/libgcc_s.* @@ -1790,7 +1815,7 @@ end %files c++ %defattr(-,root,root,-) %ifnarch %{arm} aarch64 mipsel -%{_prefix}/bin/%{gcc_target_platform}-*++ +%{_prefix}/bin/%{gcc_target_platform}-*++%{binsuffix} %endif %{_prefix}/bin/g++%{binsuffix} %{_prefix}/bin/c++%{binsuffix} @@ -1818,7 +1843,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif -%files -n libstdc++ +%files -n libstdc++%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libstdc++.so.6* %dir %{_datadir}/gdb @@ -1830,7 +1855,7 @@ end %{_prefix}/share/gcc-%{gcc_version}/python %{_prefix}/share/gcc-%{gcc_version}/python/libstdcxx -%files -n libstdc++-devel +%files -n libstdc++%{pkgsuffix}-devel %defattr(-,root,root,-) %dir %{_prefix}/include/c++ %dir %{_prefix}/include/c++/%{gcc_version} @@ -1845,7 +1870,7 @@ end %endif %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++fs.a -%files -n libstdc++-static +%files -n libstdc++%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1855,7 +1880,7 @@ end %if !%{crossbuild} %if %{build_libstdcxx_doc} -%files -n libstdc++-doc +%files -n libstdc++%{pkgsuffix}-doc %defattr(-,root,root) %{_mandir}/man3/* %{_docdir}/libstdc++-%{version} @@ -1863,12 +1888,12 @@ end # !crossbuild %endif -%files -n libgomp +%files -n libgomp%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libgomp.* %if %{build_64bit_multilib} -%files -n gcc-multilib +%files -n gcc%{pkgsuffix}-multilib %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64 %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/crt*.o @@ -1880,12 +1905,12 @@ end %endif %if %{build_libquadmath} -%files -n libquadmath +%files -n libquadmath%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libquadmath.so.0* %license rpm.doc/libquadmath/COPYING* -%files -n libquadmath-devel +%files -n libquadmath%{pkgsuffix}-devel %defattr(-,root,root,-) %{_prefix}/%{_lib}/libquadmath.so %dir %{_prefix}/%{_lib}/gcc @@ -1896,7 +1921,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/quadmath_weak.h %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.so -%files -n libquadmath-static +%files -n libquadmath%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1905,18 +1930,18 @@ end %endif %if %{build_libitm} -%files -n libitm +%files -n libitm%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libitm.so.1* -%files -n libitm-devel +%files -n libitm%{pkgsuffix}-devel %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include %doc rpm.doc/libitm/ChangeLog* -%files -n libitm-static +%files -n libitm%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1925,11 +1950,11 @@ end %endif %if %{build_libatomic} -%files -n libatomic +%files -n libatomic%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libatomic.so.1* -%files -n libatomic-static +%files -n libatomic%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1938,11 +1963,11 @@ end %endif %if %{build_libasan} -%files -n libasan +%files -n libasan%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libasan.so.8* -%files -n libasan-static +%files -n libasan%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1951,10 +1976,10 @@ end %endif %if %{build_libubsan} -%files -n libubsan +%files -n libubsan%{pkgsuffix} %{_prefix}/%{_lib}/libubsan.so.1* -%files -n libubsan-static +%files -n libubsan%{pkgsuffix}-static %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -1974,11 +1999,11 @@ end %endif %if %{build_libtsan} -%files -n libtsan +%files -n libtsan%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libtsan.so.2* -%files -n libtsan-static +%files -n libtsan%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1989,10 +2014,10 @@ end %endif %if %{build_liblsan} -%files -n liblsan +%files -n liblsan%{pkgsuffix} %{_prefix}/%{_lib}/liblsan.so.0* -%files -n liblsan-static +%files -n liblsan%{pkgsuffix}-static %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2004,11 +2029,13 @@ end %if %{build_go} %files go %{_prefix}/bin/gccgo%{binsuffix} -%{_prefix}/bin/go%{binsuffix} -%{_prefix}/bin/gofmt%{binsuffix} -%{_mandir}/man1/gccgo.1* -%{_mandir}/man1/go.1* -%{_mandir}/man1/gofmt.1* +%ghost %{_prefix}/bin/go%{binsuffix} +%{_prefix}/bin/go.gcc%{binsuffix} +%ghost %{_prefix}/bin/gofmt%{binsuffix} +%{_prefix}/bin/gofmt.gcc%{binsuffix} +%{_mandir}/man1/gccgo%{binsuffix}.1* +%{_mandir}/man1/go%{binsuffix}.1* +%{_mandir}/man1/gofmt%{binsuffix}.1* %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2032,11 +2059,12 @@ end %endif %doc rpm.doc/go/* -%files -n libgo +%files -n libgo%{pkgsuffix} +%{_prefix}/%{_lib}/libgo.so %attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.22* %doc rpm.doc/libgo/* -%files -n libgo-devel +%files -n libgo%{pkgsuffix}-devel %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2056,7 +2084,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so %endif -%files -n libgo-static +%files -n libgo%{pkgsuffix}-static %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} diff --git a/rpm/cross-armv7hl-gcc13.spec b/rpm/cross-armv7hl-gcc13.spec index 0fe7a21..7321e88 100644 --- a/rpm/cross-armv7hl-gcc13.spec +++ b/rpm/cross-armv7hl-gcc13.spec @@ -104,6 +104,7 @@ ExclusiveArch: %ix86 x86_64 %endif %global binsuffix -13 +%global pkgsuffix 13 %global gcc_version 13.3.1 %global gcc_release 1 %global _unpackaged_files_terminate_build 0 @@ -212,9 +213,9 @@ BuildRequires: graphviz %endif %if !%{crossbuild} -Requires: cpp = %{version}-%{release} -Requires: libgcc >= %{version}-%{release} -Requires: libgomp = %{version}-%{release} +Requires: (cpp%{pkgsuffix} = %{version}-%{release} or cpp = %{version}-%{release}) +Requires: (libgcc%{pkgsuffix} >= %{version}-%{release} or libgcc >= %{version}-%{release}) +Requires: (libgomp%{pkgsuffix} = %{version}-%{release} or libgomp = %{version}-%{release}) Requires: glibc-devel Requires: binutils >= 2.25 %endif @@ -229,7 +230,7 @@ Requires: glibc64bit-helper BuildRequires: net-tools, procps %endif -Obsoletes: gcc < %{version}-%{release} +Obsoletes: gcc%{pkgsuffix} < %{version}-%{release} AutoReq: true # /!crossbuild %endif @@ -254,24 +255,24 @@ Man and info pages for %{name}. # !crossbuild %endif -%package -n libgcc +%package -n libgcc%{pkgsuffix} Summary: GCC version 13.3 shared support library -Obsoletes: libgcc < %{version}-%{release} +Obsoletes: libgcc%{pkgsuffix} < %{version}-%{release} Autoreq: true %if "%{version}" != "%{gcc_version}" Provides: libgcc = %{gcc_version} %endif -%description -n libgcc +%description -n libgcc%{pkgsuffix} This package contains GCC shared support library which is needed e.g. for exception handling support. %package c++ Summary: C++ support for GCC -Requires: gcc = %{version}-%{release} -Requires: libstdc++ = %{version}-%{release} -Requires: libstdc++-devel = %{version}-%{release} -Obsoletes: gcc-c++ < %{version}-%{release} +Requires: (gcc%{pkgsuffix} = %{version}-%{release} or gcc = %{version}-%{release}) +Requires: (libstdc++%{pkgsuffix} = %{version}-%{release} or libstdc++ = %{version}-%{release}) +Requires: (libstdc++%{pkgsuffix}-devel = %{version}-%{release} or libstdc++-devel = %{version}-%{release}) +Obsoletes: gcc%{pkgsuffix}-c++ < %{version}-%{release} Autoreq: true %description c++ @@ -279,182 +280,181 @@ 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 libstdc++ +%package -n libstdc++%{pkgsuffix} Summary: GNU Standard C++ Library -Obsoletes: libstdc++ < %{version}-%{release} -Obsoletes: libstdc++6 < %{version}-%{release} +Obsoletes: libstdc++%{pkgsuffix} < %{version}-%{release} Autoreq: true Requires: glibc -%description -n libstdc++ +%description -n libstdc++%{pkgsuffix} The libstdc++ package contains a rewritten standard compliant GCC Standard C++ Library. -%package -n libstdc++-devel +%package -n libstdc++%{pkgsuffix}-devel Summary: Header files and libraries for C++ development -Requires: libstdc++ = %{version}-%{release} -Obsoletes: libstdc++-devel < %{version}-%{release} +Requires: libstdc++%{pkgsuffix} = %{version}-%{release} +Obsoletes: libstdc++%{pkgsuffix}-devel < %{version}-%{release} Autoreq: true -%description -n libstdc++-devel +%description -n libstdc++%{pkgsuffix}-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 libstdc++-static +%package -n libstdc++%{pkgsuffix}-static Summary: Static libraries for the GNU standard C++ library -Requires: libstdc++-devel = %{version}-%{release} +Requires: libstdc++%{pkgsuffix}-devel = %{version}-%{release} Autoreq: true -%description -n libstdc++-static +%description -n libstdc++%{pkgsuffix}-static Static libraries for the GNU standard C++ library. %if !%{crossbuild} -%package -n libstdc++-doc +%package -n libstdc++%{pkgsuffix}-doc Summary: Documentation for the GNU standard C++ library -Requires: libstdc++ = %{version}-%{release} -Obsoletes: libstdc++-docs +Requires: libstdc++%{pkgsuffix} = %{version}-%{release} +Obsoletes: libstdc++%{pkgsuffix}-docs Autoreq: true -%description -n libstdc++-doc +%description -n libstdc++%{pkgsuffix}-doc Manual, doxygen generated API information and Frequently Asked Questions for the GNU standard C++ library. # !crossbuild %endif -%package -n libgomp +%package -n libgomp%{pkgsuffix} Summary: GCC OpenMP v4.5 shared support library -Obsoletes: libgomp < %{version}-%{release} +Obsoletes: libgomp%{pkgsuffix} < %{version}-%{release} -%description -n libgomp +%description -n libgomp%{pkgsuffix} This package contains GCC shared support library which is needed for OpenMP v3.0 support. -%package -n libquadmath +%package -n libquadmath%{pkgsuffix} Summary: GCC __float128 shared support library -%description -n libquadmath +%description -n libquadmath%{pkgsuffix} This package contains GCC shared support library which is needed for __float128 math support and for Fortran REAL*16 support. -%package -n libquadmath-devel +%package -n libquadmath%{pkgsuffix}-devel Summary: GCC __float128 support -Requires: libquadmath = %{version}-%{release} -Requires: gcc = %{version}-%{release} +Requires: libquadmath%{pkgsuffix} = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} -%description -n libquadmath-devel +%description -n libquadmath%{pkgsuffix}-devel This package contains headers for building Fortran programs using REAL*16 and programs using __float128 math. -%package -n libquadmath-static +%package -n libquadmath%{pkgsuffix}-static Summary: Static libraries for __float128 support -Requires: libquadmath-devel = %{version}-%{release} +Requires: libquadmath%{pkgsuffix}-devel = %{version}-%{release} -%description -n libquadmath-static +%description -n libquadmath%{pkgsuffix}-static This package contains static libraries for building Fortran programs using REAL*16 and programs using __float128 math. -%package -n libitm +%package -n libitm%{pkgsuffix} Summary: The GNU Transactional Memory library -%description -n libitm +%description -n libitm%{pkgsuffix} This package contains the GNU Transactional Memory library which is a GCC transactional memory support runtime library. -%package -n libitm-devel +%package -n libitm%{pkgsuffix}-devel Summary: The GNU Transactional Memory support -Requires: libitm = %{version}-%{release} -Requires: gcc = %{version}-%{release} +Requires: libitm%{pkgsuffix} = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} -%description -n libitm-devel +%description -n libitm%{pkgsuffix}-devel This package contains headers and support files for the GNU Transactional Memory library. -%package -n libitm-static +%package -n libitm%{pkgsuffix}-static Summary: The GNU Transactional Memory static library -Requires: libitm-devel = %{version}-%{release} +Requires: libitm%{pkgsuffix}-devel = %{version}-%{release} -%description -n libitm-static +%description -n libitm%{pkgsuffix}-static This package contains GNU Transactional Memory static libraries. -%package -n libatomic +%package -n libatomic%{pkgsuffix} Summary: The GNU Atomic library -%description -n libatomic +%description -n libatomic%{pkgsuffix} This package contains the GNU Atomic library which is a GCC support runtime library for atomic operations not supported by hardware. -%package -n libatomic-static +%package -n libatomic%{pkgsuffix}-static Summary: The GNU Atomic static library -Requires: libatomic = %{version}-%{release} +Requires: libatomic%{pkgsuffix} = %{version}-%{release} -%description -n libatomic-static +%description -n libatomic%{pkgsuffix}-static This package contains GNU Atomic static libraries. -%package -n libasan +%package -n libasan%{pkgsuffix} Summary: The Address Sanitizer runtime library -%description -n libasan +%description -n libasan%{pkgsuffix} This package contains the Address Sanitizer library which is used for -fsanitize=address instrumented programs. -%package -n libasan-static +%package -n libasan%{pkgsuffix}-static Summary: The Address Sanitizer static library -Requires: libasan = %{version}-%{release} +Requires: libasan%{pkgsuffix} = %{version}-%{release} -%description -n libasan-static +%description -n libasan%{pkgsuffix}-static This package contains Address Sanitizer static runtime library. -%package -n libtsan +%package -n libtsan%{pkgsuffix} Summary: The Thread Sanitizer runtime library -%description -n libtsan +%description -n libtsan%{pkgsuffix} This package contains the Thread Sanitizer library which is used for -fsanitize=thread instrumented programs. -%package -n libtsan-static +%package -n libtsan%{pkgsuffix}-static Summary: The Thread Sanitizer static library -Requires: libtsan = %{version}-%{release} +Requires: libtsan%{pkgsuffix} = %{version}-%{release} -%description -n libtsan-static +%description -n libtsan%{pkgsuffix}-static This package contains Thread Sanitizer static runtime library. -%package -n libubsan +%package -n libubsan%{pkgsuffix} Summary: The Undefined Behavior Sanitizer runtime library -%description -n libubsan +%description -n libubsan%{pkgsuffix} This package contains the Undefined Behavior Sanitizer library which is used for -fsanitize=undefined instrumented programs. -%package -n libubsan-static +%package -n libubsan%{pkgsuffix}-static Summary: The Undefined Behavior Sanitizer static library -Requires: libubsan = %{version}-%{release} +Requires: libubsan%{pkgsuffix} = %{version}-%{release} -%description -n libubsan-static +%description -n libubsan%{pkgsuffix}-static This package contains Undefined Behavior Sanitizer static runtime library. -%package -n liblsan +%package -n liblsan%{pkgsuffix} Summary: The Leak Sanitizer runtime library -%description -n liblsan +%description -n liblsan%{pkgsuffix} This package contains the Leak Sanitizer library which is used for -fsanitize=leak instrumented programs. -%package -n liblsan-static +%package -n liblsan%{pkgsuffix}-static Summary: The Leak Sanitizer static library -Requires: liblsan = %{version}-%{release} +Requires: liblsan%{pkgsuffix} = %{version}-%{release} -%description -n liblsan-static +%description -n liblsan%{pkgsuffix}-static This package contains Leak Sanitizer static runtime library. -%package -n cpp +%package -n cpp%{pkgsuffix} Summary: The C Preprocessor Requires: mpc -Obsoletes: cpp < %{version}-%{release} +Obsoletes: cpp%{pkgsuffix} < %{version}-%{release} Autoreq: true -%description -n cpp +%description -n cpp%{pkgsuffix} 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 @@ -476,19 +476,19 @@ compiler about where each source line originated). You should install this package if you are a C programmer and you use macros. -%package -n gcc-multilib +%package -n gcc%{pkgsuffix}-multilib Summary: for 64bit multilib support Autoreq: true -%description -n gcc-multilib +%description -n gcc%{pkgsuffix}-multilib This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %package go Summary: Go support -Requires: gcc = %{version}-%{release} -Requires: libgo = %{version}-%{release} -Requires: libgo-devel = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} +Requires: libgo%{pkgsuffix} = %{version}-%{release} +Requires: libgo%{pkgsuffix}-devel = %{version}-%{release} Provides: gccgo = %{version}-%{release} Autoreq: true @@ -496,34 +496,34 @@ Autoreq: true The gcc-go package provides support for compiling Go programs with the GNU Compiler Collection. -%package -n libgo +%package -n libgo%{pkgsuffix} Summary: Go runtime Autoreq: true -%description -n libgo +%description -n libgo%{pkgsuffix} This package contains Go shared library which is needed to run Go dynamically linked programs. -%package -n libgo-devel +%package -n libgo%{pkgsuffix}-devel Summary: Go development libraries -Requires: libgo = %{version}-%{release} +Requires: libgo%{pkgsuffix} = %{version}-%{release} Autoreq: true -%description -n libgo-devel +%description -n libgo%{pkgsuffix}-devel This package includes libraries and support files for compiling Go programs. -%package -n libgo-static +%package -n libgo%{pkgsuffix}-static Summary: Static Go libraries -Requires: libgo = %{version}-%{release} -Requires: gcc = %{version}-%{release} +Requires: libgo%{pkgsuffix} = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} -%description -n libgo-static +%description -n libgo%{pkgsuffix}-static This package contains static Go libraries. %package plugin-devel Summary: Support for compiling GCC plugins -Requires: gcc = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} Requires: gmp-devel >= 4.1.2-8, mpfr-devel >= 3.1.0, libmpc-devel >= 0.8.1 %description plugin-devel @@ -867,9 +867,9 @@ FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_versio mkdir -p $FULLPATH mkdir -p $FULLEPATH -ln -sf gcc %{buildroot}%{_prefix}/bin/cc +ln -sf gcc%{binsuffix} %{buildroot}%{_prefix}/bin/cc%{binsuffix} mkdir -p %{buildroot}/%{_lib} -ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp +ln -sf ..%{_prefix}/bin/cpp%{binsuffix} %{buildroot}/%{_lib}/cpp%{binsuffix} %if %{build_go} mv %{buildroot}%{_prefix}/bin/go{,.gcc}%{binsuffix} @@ -1032,7 +1032,7 @@ ln -sf ../../../libgdruntime.so.4.* libgdruntime.so ln -sf ../../../libgphobos.so.4.* libgphobos.so %endif %if %{build_libitm} -ln -sf ../../../libitm.so.1.* libitm.so +ln -sf ../../../libitm.so.1.* libitm%{binsuffix}.so %endif %if %{build_libatomic} ln -sf ../../../libatomic.so.1.* libatomic.so @@ -1225,7 +1225,7 @@ for h in `find $FULLPATH/include -name \*.h`; do fi done -cat > %{buildroot}%{_prefix}/bin/c89 <<"EOF" +cat > %{buildroot}%{_prefix}/bin/c89%{binsuffix} <<"EOF" #!/bin/sh fl="-std=c89" for opt; do @@ -1235,9 +1235,9 @@ for opt; do exit 1;; esac done -exec gcc $fl ${1+"$@"} +exec gcc%{binsuffix} $fl ${1+"$@"} EOF -cat > %{buildroot}%{_prefix}/bin/c99 <<"EOF" +cat > %{buildroot}%{_prefix}/bin/c99%{binsuffix} <<"EOF" #!/bin/sh fl="-std=c99" for opt; do @@ -1247,28 +1247,33 @@ for opt; do exit 1;; esac done -exec gcc $fl ${1+"$@"} +exec gcc%{binsuffix} $fl ${1+"$@"} EOF -chmod 755 %{buildroot}%{_prefix}/bin/c?9 +chmod 755 %{buildroot}%{_prefix}/bin/c?9%{binsuffix} cd .. -%find_lang %{name}%{binsuffix} -%find_lang cpplib%{binsuffix} + +for lc_messages in `ls -d %{buildroot}/%{_prefix}/share/locale/*/LC_MESSAGES/`; do + mv $lc_messages/gcc.mo $lc_messages/gcc13.mo || : + mv $lc_messages/libstdc++.mo $lc_messages/libstdc++13.mo || : +done +%find_lang gcc13 +%find_lang cpplib # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} || : -rm -f $FULLEPATH/install-tools/{mkheaders,fixincl} +rm -f $FULLEPATH/install-tools/* rm -f %{buildroot}%{_prefix}/lib/{32,64}/libiberty.a rm -f %{buildroot}%{_prefix}/%{_lib}/libssp* rm -f %{buildroot}%{_prefix}/%{_lib}/libvtv* || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gfortran || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gccgo || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcj || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ar || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-nm || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ranlib || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gdc || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gfortran%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gccgo%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcj%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ar%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-nm%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ranlib%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gdc%{binsuffix} || : %ifarch %{multilib_64_archs} # Remove libraries for the other arch on multilib arches @@ -1377,7 +1382,7 @@ rm -rf testlogs-%{_target_platform}-%{version}-%{release} # Because glibc Prereq's libgcc and /sbin/ldconfig # comes from glibc, it might not exist yet when # libgcc is installed -%post -n libgcc -p +%post -n libgcc%{pkgsuffix} -p if posix.access ("/sbin/ldconfig", "x") then local pid = posix.fork () if pid == 0 then @@ -1387,7 +1392,7 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%postun -n libgcc -p +%postun -n libgcc%{pkgsuffix} -p if posix.access ("/sbin/ldconfig", "x") then local pid = posix.fork () if pid == 0 then @@ -1397,41 +1402,61 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%post -n libstdc++ -p /sbin/ldconfig +%post go +pushd %{_bindir} +if [ ! -f go%{binsuffix} ] ; then + ln -s go.gcc%{binsuffix} go%{binsuffix} +fi +if [ ! -f gofmt%{binsuffix} ] ; then + ln -s gofmt.gcc%{binsuffix} gofmt%{binsuffix} +fi +popd + +%preun go +pushd %{_bindir} +if [ -L go%{binsuffix} ]; then + rm go%{binsuffix} +fi +if [ -L gofmt%{binsuffix} ]; then + rm gofmt%{binsuffix} +fi +popd + +%post -n libstdc++%{pkgsuffix} -p /sbin/ldconfig -%postun -n libstdc++ -p /sbin/ldconfig +%postun -n libstdc++%{pkgsuffix} -p /sbin/ldconfig -%post -n libgomp -p /sbin/ldconfig +%post -n libgomp%{pkgsuffix} -p /sbin/ldconfig -%postun -n libgomp -p /sbin/ldconfig +%postun -n libgomp%{pkgsuffix} -p /sbin/ldconfig -%post -n libquadmath -p /sbin/ldconfig +%post -n libquadmath%{pkgsuffix} -p /sbin/ldconfig -%postun -n libquadmath -p /sbin/ldconfig +%postun -n libquadmath%{pkgsuffix} -p /sbin/ldconfig -%post -n libitm -p /sbin/ldconfig +%post -n libitm%{pkgsuffix} -p /sbin/ldconfig -%postun -n libitm -p /sbin/ldconfig +%postun -n libitm%{pkgsuffix} -p /sbin/ldconfig -%post -n libatomic -p /sbin/ldconfig +%post -n libatomic%{pkgsuffix} -p /sbin/ldconfig -%postun -n libatomic -p /sbin/ldconfig +%postun -n libatomic%{pkgsuffix} -p /sbin/ldconfig -%post -n libasan -p /sbin/ldconfig +%post -n libasan%{pkgsuffix} -p /sbin/ldconfig -%postun -n libasan -p /sbin/ldconfig +%postun -n libasan%{pkgsuffix} -p /sbin/ldconfig -%post -n libubsan -p /sbin/ldconfig +%post -n libubsan%{pkgsuffix} -p /sbin/ldconfig -%postun -n libubsan -p /sbin/ldconfig +%postun -n libubsan%{pkgsuffix} -p /sbin/ldconfig -%post -n libtsan -p /sbin/ldconfig +%post -n libtsan%{pkgsuffix} -p /sbin/ldconfig -%postun -n libtsan -p /sbin/ldconfig +%postun -n libtsan%{pkgsuffix} -p /sbin/ldconfig -%post -n liblsan -p /sbin/ldconfig +%post -n liblsan%{pkgsuffix} -p /sbin/ldconfig -%postun -n liblsan -p /sbin/ldconfig +%postun -n liblsan%{pkgsuffix} -p /sbin/ldconfig %files -f %{name}.lang %defattr(-,root,root,-) @@ -1772,16 +1797,16 @@ end # !crossbuild %endif -%files -n cpp -f cpplib.lang +%files -n cpp%{pkgsuffix} -f cpplib.lang %defattr(-,root,root,-) -/%{_lib}/cpp -%{_prefix}/bin/cpp +/%{_lib}/cpp%{binsuffix} +%{_prefix}/bin/cpp%{binsuffix} %dir %{_prefix}/libexec/gcc %dir %{_prefix}/libexec/gcc/%{gcc_target_platform} %dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 -%files -n libgcc +%files -n libgcc%{pkgsuffix} %defattr(-,root,root,-) /%{_lib}/libgcc_s-%{gcc_version}.so.1 /%{_lib}/libgcc_s.* @@ -1790,7 +1815,7 @@ end %files c++ %defattr(-,root,root,-) %ifnarch %{arm} aarch64 mipsel -%{_prefix}/bin/%{gcc_target_platform}-*++ +%{_prefix}/bin/%{gcc_target_platform}-*++%{binsuffix} %endif %{_prefix}/bin/g++%{binsuffix} %{_prefix}/bin/c++%{binsuffix} @@ -1818,7 +1843,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif -%files -n libstdc++ +%files -n libstdc++%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libstdc++.so.6* %dir %{_datadir}/gdb @@ -1830,7 +1855,7 @@ end %{_prefix}/share/gcc-%{gcc_version}/python %{_prefix}/share/gcc-%{gcc_version}/python/libstdcxx -%files -n libstdc++-devel +%files -n libstdc++%{pkgsuffix}-devel %defattr(-,root,root,-) %dir %{_prefix}/include/c++ %dir %{_prefix}/include/c++/%{gcc_version} @@ -1845,7 +1870,7 @@ end %endif %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++fs.a -%files -n libstdc++-static +%files -n libstdc++%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1855,7 +1880,7 @@ end %if !%{crossbuild} %if %{build_libstdcxx_doc} -%files -n libstdc++-doc +%files -n libstdc++%{pkgsuffix}-doc %defattr(-,root,root) %{_mandir}/man3/* %{_docdir}/libstdc++-%{version} @@ -1863,12 +1888,12 @@ end # !crossbuild %endif -%files -n libgomp +%files -n libgomp%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libgomp.* %if %{build_64bit_multilib} -%files -n gcc-multilib +%files -n gcc%{pkgsuffix}-multilib %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64 %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/crt*.o @@ -1880,12 +1905,12 @@ end %endif %if %{build_libquadmath} -%files -n libquadmath +%files -n libquadmath%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libquadmath.so.0* %license rpm.doc/libquadmath/COPYING* -%files -n libquadmath-devel +%files -n libquadmath%{pkgsuffix}-devel %defattr(-,root,root,-) %{_prefix}/%{_lib}/libquadmath.so %dir %{_prefix}/%{_lib}/gcc @@ -1896,7 +1921,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/quadmath_weak.h %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.so -%files -n libquadmath-static +%files -n libquadmath%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1905,18 +1930,18 @@ end %endif %if %{build_libitm} -%files -n libitm +%files -n libitm%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libitm.so.1* -%files -n libitm-devel +%files -n libitm%{pkgsuffix}-devel %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include %doc rpm.doc/libitm/ChangeLog* -%files -n libitm-static +%files -n libitm%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1925,11 +1950,11 @@ end %endif %if %{build_libatomic} -%files -n libatomic +%files -n libatomic%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libatomic.so.1* -%files -n libatomic-static +%files -n libatomic%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1938,11 +1963,11 @@ end %endif %if %{build_libasan} -%files -n libasan +%files -n libasan%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libasan.so.8* -%files -n libasan-static +%files -n libasan%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1951,10 +1976,10 @@ end %endif %if %{build_libubsan} -%files -n libubsan +%files -n libubsan%{pkgsuffix} %{_prefix}/%{_lib}/libubsan.so.1* -%files -n libubsan-static +%files -n libubsan%{pkgsuffix}-static %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -1974,11 +1999,11 @@ end %endif %if %{build_libtsan} -%files -n libtsan +%files -n libtsan%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libtsan.so.2* -%files -n libtsan-static +%files -n libtsan%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1989,10 +2014,10 @@ end %endif %if %{build_liblsan} -%files -n liblsan +%files -n liblsan%{pkgsuffix} %{_prefix}/%{_lib}/liblsan.so.0* -%files -n liblsan-static +%files -n liblsan%{pkgsuffix}-static %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2004,11 +2029,13 @@ end %if %{build_go} %files go %{_prefix}/bin/gccgo%{binsuffix} -%{_prefix}/bin/go%{binsuffix} -%{_prefix}/bin/gofmt%{binsuffix} -%{_mandir}/man1/gccgo.1* -%{_mandir}/man1/go.1* -%{_mandir}/man1/gofmt.1* +%ghost %{_prefix}/bin/go%{binsuffix} +%{_prefix}/bin/go.gcc%{binsuffix} +%ghost %{_prefix}/bin/gofmt%{binsuffix} +%{_prefix}/bin/gofmt.gcc%{binsuffix} +%{_mandir}/man1/gccgo%{binsuffix}.1* +%{_mandir}/man1/go%{binsuffix}.1* +%{_mandir}/man1/gofmt%{binsuffix}.1* %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2032,11 +2059,12 @@ end %endif %doc rpm.doc/go/* -%files -n libgo +%files -n libgo%{pkgsuffix} +%{_prefix}/%{_lib}/libgo.so %attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.22* %doc rpm.doc/libgo/* -%files -n libgo-devel +%files -n libgo%{pkgsuffix}-devel %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2056,7 +2084,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so %endif -%files -n libgo-static +%files -n libgo%{pkgsuffix}-static %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} diff --git a/rpm/cross-i486-gcc13.spec b/rpm/cross-i486-gcc13.spec index 24471ae..f546525 100644 --- a/rpm/cross-i486-gcc13.spec +++ b/rpm/cross-i486-gcc13.spec @@ -104,6 +104,7 @@ ExclusiveArch: %ix86 x86_64 %endif %global binsuffix -13 +%global pkgsuffix 13 %global gcc_version 13.3.1 %global gcc_release 1 %global _unpackaged_files_terminate_build 0 @@ -212,9 +213,9 @@ BuildRequires: graphviz %endif %if !%{crossbuild} -Requires: cpp = %{version}-%{release} -Requires: libgcc >= %{version}-%{release} -Requires: libgomp = %{version}-%{release} +Requires: (cpp%{pkgsuffix} = %{version}-%{release} or cpp = %{version}-%{release}) +Requires: (libgcc%{pkgsuffix} >= %{version}-%{release} or libgcc >= %{version}-%{release}) +Requires: (libgomp%{pkgsuffix} = %{version}-%{release} or libgomp = %{version}-%{release}) Requires: glibc-devel Requires: binutils >= 2.25 %endif @@ -229,7 +230,7 @@ Requires: glibc64bit-helper BuildRequires: net-tools, procps %endif -Obsoletes: gcc < %{version}-%{release} +Obsoletes: gcc%{pkgsuffix} < %{version}-%{release} AutoReq: true # /!crossbuild %endif @@ -254,24 +255,24 @@ Man and info pages for %{name}. # !crossbuild %endif -%package -n libgcc +%package -n libgcc%{pkgsuffix} Summary: GCC version 13.3 shared support library -Obsoletes: libgcc < %{version}-%{release} +Obsoletes: libgcc%{pkgsuffix} < %{version}-%{release} Autoreq: true %if "%{version}" != "%{gcc_version}" Provides: libgcc = %{gcc_version} %endif -%description -n libgcc +%description -n libgcc%{pkgsuffix} This package contains GCC shared support library which is needed e.g. for exception handling support. %package c++ Summary: C++ support for GCC -Requires: gcc = %{version}-%{release} -Requires: libstdc++ = %{version}-%{release} -Requires: libstdc++-devel = %{version}-%{release} -Obsoletes: gcc-c++ < %{version}-%{release} +Requires: (gcc%{pkgsuffix} = %{version}-%{release} or gcc = %{version}-%{release}) +Requires: (libstdc++%{pkgsuffix} = %{version}-%{release} or libstdc++ = %{version}-%{release}) +Requires: (libstdc++%{pkgsuffix}-devel = %{version}-%{release} or libstdc++-devel = %{version}-%{release}) +Obsoletes: gcc%{pkgsuffix}-c++ < %{version}-%{release} Autoreq: true %description c++ @@ -279,182 +280,181 @@ 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 libstdc++ +%package -n libstdc++%{pkgsuffix} Summary: GNU Standard C++ Library -Obsoletes: libstdc++ < %{version}-%{release} -Obsoletes: libstdc++6 < %{version}-%{release} +Obsoletes: libstdc++%{pkgsuffix} < %{version}-%{release} Autoreq: true Requires: glibc -%description -n libstdc++ +%description -n libstdc++%{pkgsuffix} The libstdc++ package contains a rewritten standard compliant GCC Standard C++ Library. -%package -n libstdc++-devel +%package -n libstdc++%{pkgsuffix}-devel Summary: Header files and libraries for C++ development -Requires: libstdc++ = %{version}-%{release} -Obsoletes: libstdc++-devel < %{version}-%{release} +Requires: libstdc++%{pkgsuffix} = %{version}-%{release} +Obsoletes: libstdc++%{pkgsuffix}-devel < %{version}-%{release} Autoreq: true -%description -n libstdc++-devel +%description -n libstdc++%{pkgsuffix}-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 libstdc++-static +%package -n libstdc++%{pkgsuffix}-static Summary: Static libraries for the GNU standard C++ library -Requires: libstdc++-devel = %{version}-%{release} +Requires: libstdc++%{pkgsuffix}-devel = %{version}-%{release} Autoreq: true -%description -n libstdc++-static +%description -n libstdc++%{pkgsuffix}-static Static libraries for the GNU standard C++ library. %if !%{crossbuild} -%package -n libstdc++-doc +%package -n libstdc++%{pkgsuffix}-doc Summary: Documentation for the GNU standard C++ library -Requires: libstdc++ = %{version}-%{release} -Obsoletes: libstdc++-docs +Requires: libstdc++%{pkgsuffix} = %{version}-%{release} +Obsoletes: libstdc++%{pkgsuffix}-docs Autoreq: true -%description -n libstdc++-doc +%description -n libstdc++%{pkgsuffix}-doc Manual, doxygen generated API information and Frequently Asked Questions for the GNU standard C++ library. # !crossbuild %endif -%package -n libgomp +%package -n libgomp%{pkgsuffix} Summary: GCC OpenMP v4.5 shared support library -Obsoletes: libgomp < %{version}-%{release} +Obsoletes: libgomp%{pkgsuffix} < %{version}-%{release} -%description -n libgomp +%description -n libgomp%{pkgsuffix} This package contains GCC shared support library which is needed for OpenMP v3.0 support. -%package -n libquadmath +%package -n libquadmath%{pkgsuffix} Summary: GCC __float128 shared support library -%description -n libquadmath +%description -n libquadmath%{pkgsuffix} This package contains GCC shared support library which is needed for __float128 math support and for Fortran REAL*16 support. -%package -n libquadmath-devel +%package -n libquadmath%{pkgsuffix}-devel Summary: GCC __float128 support -Requires: libquadmath = %{version}-%{release} -Requires: gcc = %{version}-%{release} +Requires: libquadmath%{pkgsuffix} = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} -%description -n libquadmath-devel +%description -n libquadmath%{pkgsuffix}-devel This package contains headers for building Fortran programs using REAL*16 and programs using __float128 math. -%package -n libquadmath-static +%package -n libquadmath%{pkgsuffix}-static Summary: Static libraries for __float128 support -Requires: libquadmath-devel = %{version}-%{release} +Requires: libquadmath%{pkgsuffix}-devel = %{version}-%{release} -%description -n libquadmath-static +%description -n libquadmath%{pkgsuffix}-static This package contains static libraries for building Fortran programs using REAL*16 and programs using __float128 math. -%package -n libitm +%package -n libitm%{pkgsuffix} Summary: The GNU Transactional Memory library -%description -n libitm +%description -n libitm%{pkgsuffix} This package contains the GNU Transactional Memory library which is a GCC transactional memory support runtime library. -%package -n libitm-devel +%package -n libitm%{pkgsuffix}-devel Summary: The GNU Transactional Memory support -Requires: libitm = %{version}-%{release} -Requires: gcc = %{version}-%{release} +Requires: libitm%{pkgsuffix} = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} -%description -n libitm-devel +%description -n libitm%{pkgsuffix}-devel This package contains headers and support files for the GNU Transactional Memory library. -%package -n libitm-static +%package -n libitm%{pkgsuffix}-static Summary: The GNU Transactional Memory static library -Requires: libitm-devel = %{version}-%{release} +Requires: libitm%{pkgsuffix}-devel = %{version}-%{release} -%description -n libitm-static +%description -n libitm%{pkgsuffix}-static This package contains GNU Transactional Memory static libraries. -%package -n libatomic +%package -n libatomic%{pkgsuffix} Summary: The GNU Atomic library -%description -n libatomic +%description -n libatomic%{pkgsuffix} This package contains the GNU Atomic library which is a GCC support runtime library for atomic operations not supported by hardware. -%package -n libatomic-static +%package -n libatomic%{pkgsuffix}-static Summary: The GNU Atomic static library -Requires: libatomic = %{version}-%{release} +Requires: libatomic%{pkgsuffix} = %{version}-%{release} -%description -n libatomic-static +%description -n libatomic%{pkgsuffix}-static This package contains GNU Atomic static libraries. -%package -n libasan +%package -n libasan%{pkgsuffix} Summary: The Address Sanitizer runtime library -%description -n libasan +%description -n libasan%{pkgsuffix} This package contains the Address Sanitizer library which is used for -fsanitize=address instrumented programs. -%package -n libasan-static +%package -n libasan%{pkgsuffix}-static Summary: The Address Sanitizer static library -Requires: libasan = %{version}-%{release} +Requires: libasan%{pkgsuffix} = %{version}-%{release} -%description -n libasan-static +%description -n libasan%{pkgsuffix}-static This package contains Address Sanitizer static runtime library. -%package -n libtsan +%package -n libtsan%{pkgsuffix} Summary: The Thread Sanitizer runtime library -%description -n libtsan +%description -n libtsan%{pkgsuffix} This package contains the Thread Sanitizer library which is used for -fsanitize=thread instrumented programs. -%package -n libtsan-static +%package -n libtsan%{pkgsuffix}-static Summary: The Thread Sanitizer static library -Requires: libtsan = %{version}-%{release} +Requires: libtsan%{pkgsuffix} = %{version}-%{release} -%description -n libtsan-static +%description -n libtsan%{pkgsuffix}-static This package contains Thread Sanitizer static runtime library. -%package -n libubsan +%package -n libubsan%{pkgsuffix} Summary: The Undefined Behavior Sanitizer runtime library -%description -n libubsan +%description -n libubsan%{pkgsuffix} This package contains the Undefined Behavior Sanitizer library which is used for -fsanitize=undefined instrumented programs. -%package -n libubsan-static +%package -n libubsan%{pkgsuffix}-static Summary: The Undefined Behavior Sanitizer static library -Requires: libubsan = %{version}-%{release} +Requires: libubsan%{pkgsuffix} = %{version}-%{release} -%description -n libubsan-static +%description -n libubsan%{pkgsuffix}-static This package contains Undefined Behavior Sanitizer static runtime library. -%package -n liblsan +%package -n liblsan%{pkgsuffix} Summary: The Leak Sanitizer runtime library -%description -n liblsan +%description -n liblsan%{pkgsuffix} This package contains the Leak Sanitizer library which is used for -fsanitize=leak instrumented programs. -%package -n liblsan-static +%package -n liblsan%{pkgsuffix}-static Summary: The Leak Sanitizer static library -Requires: liblsan = %{version}-%{release} +Requires: liblsan%{pkgsuffix} = %{version}-%{release} -%description -n liblsan-static +%description -n liblsan%{pkgsuffix}-static This package contains Leak Sanitizer static runtime library. -%package -n cpp +%package -n cpp%{pkgsuffix} Summary: The C Preprocessor Requires: mpc -Obsoletes: cpp < %{version}-%{release} +Obsoletes: cpp%{pkgsuffix} < %{version}-%{release} Autoreq: true -%description -n cpp +%description -n cpp%{pkgsuffix} 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 @@ -476,19 +476,19 @@ compiler about where each source line originated). You should install this package if you are a C programmer and you use macros. -%package -n gcc-multilib +%package -n gcc%{pkgsuffix}-multilib Summary: for 64bit multilib support Autoreq: true -%description -n gcc-multilib +%description -n gcc%{pkgsuffix}-multilib This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %package go Summary: Go support -Requires: gcc = %{version}-%{release} -Requires: libgo = %{version}-%{release} -Requires: libgo-devel = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} +Requires: libgo%{pkgsuffix} = %{version}-%{release} +Requires: libgo%{pkgsuffix}-devel = %{version}-%{release} Provides: gccgo = %{version}-%{release} Autoreq: true @@ -496,34 +496,34 @@ Autoreq: true The gcc-go package provides support for compiling Go programs with the GNU Compiler Collection. -%package -n libgo +%package -n libgo%{pkgsuffix} Summary: Go runtime Autoreq: true -%description -n libgo +%description -n libgo%{pkgsuffix} This package contains Go shared library which is needed to run Go dynamically linked programs. -%package -n libgo-devel +%package -n libgo%{pkgsuffix}-devel Summary: Go development libraries -Requires: libgo = %{version}-%{release} +Requires: libgo%{pkgsuffix} = %{version}-%{release} Autoreq: true -%description -n libgo-devel +%description -n libgo%{pkgsuffix}-devel This package includes libraries and support files for compiling Go programs. -%package -n libgo-static +%package -n libgo%{pkgsuffix}-static Summary: Static Go libraries -Requires: libgo = %{version}-%{release} -Requires: gcc = %{version}-%{release} +Requires: libgo%{pkgsuffix} = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} -%description -n libgo-static +%description -n libgo%{pkgsuffix}-static This package contains static Go libraries. %package plugin-devel Summary: Support for compiling GCC plugins -Requires: gcc = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} Requires: gmp-devel >= 4.1.2-8, mpfr-devel >= 3.1.0, libmpc-devel >= 0.8.1 %description plugin-devel @@ -867,9 +867,9 @@ FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_versio mkdir -p $FULLPATH mkdir -p $FULLEPATH -ln -sf gcc %{buildroot}%{_prefix}/bin/cc +ln -sf gcc%{binsuffix} %{buildroot}%{_prefix}/bin/cc%{binsuffix} mkdir -p %{buildroot}/%{_lib} -ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp +ln -sf ..%{_prefix}/bin/cpp%{binsuffix} %{buildroot}/%{_lib}/cpp%{binsuffix} %if %{build_go} mv %{buildroot}%{_prefix}/bin/go{,.gcc}%{binsuffix} @@ -1032,7 +1032,7 @@ ln -sf ../../../libgdruntime.so.4.* libgdruntime.so ln -sf ../../../libgphobos.so.4.* libgphobos.so %endif %if %{build_libitm} -ln -sf ../../../libitm.so.1.* libitm.so +ln -sf ../../../libitm.so.1.* libitm%{binsuffix}.so %endif %if %{build_libatomic} ln -sf ../../../libatomic.so.1.* libatomic.so @@ -1225,7 +1225,7 @@ for h in `find $FULLPATH/include -name \*.h`; do fi done -cat > %{buildroot}%{_prefix}/bin/c89 <<"EOF" +cat > %{buildroot}%{_prefix}/bin/c89%{binsuffix} <<"EOF" #!/bin/sh fl="-std=c89" for opt; do @@ -1235,9 +1235,9 @@ for opt; do exit 1;; esac done -exec gcc $fl ${1+"$@"} +exec gcc%{binsuffix} $fl ${1+"$@"} EOF -cat > %{buildroot}%{_prefix}/bin/c99 <<"EOF" +cat > %{buildroot}%{_prefix}/bin/c99%{binsuffix} <<"EOF" #!/bin/sh fl="-std=c99" for opt; do @@ -1247,28 +1247,33 @@ for opt; do exit 1;; esac done -exec gcc $fl ${1+"$@"} +exec gcc%{binsuffix} $fl ${1+"$@"} EOF -chmod 755 %{buildroot}%{_prefix}/bin/c?9 +chmod 755 %{buildroot}%{_prefix}/bin/c?9%{binsuffix} cd .. -%find_lang %{name}%{binsuffix} -%find_lang cpplib%{binsuffix} + +for lc_messages in `ls -d %{buildroot}/%{_prefix}/share/locale/*/LC_MESSAGES/`; do + mv $lc_messages/gcc.mo $lc_messages/gcc13.mo || : + mv $lc_messages/libstdc++.mo $lc_messages/libstdc++13.mo || : +done +%find_lang gcc13 +%find_lang cpplib # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} || : -rm -f $FULLEPATH/install-tools/{mkheaders,fixincl} +rm -f $FULLEPATH/install-tools/* rm -f %{buildroot}%{_prefix}/lib/{32,64}/libiberty.a rm -f %{buildroot}%{_prefix}/%{_lib}/libssp* rm -f %{buildroot}%{_prefix}/%{_lib}/libvtv* || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gfortran || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gccgo || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcj || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ar || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-nm || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ranlib || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gdc || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gfortran%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gccgo%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcj%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ar%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-nm%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ranlib%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gdc%{binsuffix} || : %ifarch %{multilib_64_archs} # Remove libraries for the other arch on multilib arches @@ -1377,7 +1382,7 @@ rm -rf testlogs-%{_target_platform}-%{version}-%{release} # Because glibc Prereq's libgcc and /sbin/ldconfig # comes from glibc, it might not exist yet when # libgcc is installed -%post -n libgcc -p +%post -n libgcc%{pkgsuffix} -p if posix.access ("/sbin/ldconfig", "x") then local pid = posix.fork () if pid == 0 then @@ -1387,7 +1392,7 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%postun -n libgcc -p +%postun -n libgcc%{pkgsuffix} -p if posix.access ("/sbin/ldconfig", "x") then local pid = posix.fork () if pid == 0 then @@ -1397,41 +1402,61 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%post -n libstdc++ -p /sbin/ldconfig +%post go +pushd %{_bindir} +if [ ! -f go%{binsuffix} ] ; then + ln -s go.gcc%{binsuffix} go%{binsuffix} +fi +if [ ! -f gofmt%{binsuffix} ] ; then + ln -s gofmt.gcc%{binsuffix} gofmt%{binsuffix} +fi +popd + +%preun go +pushd %{_bindir} +if [ -L go%{binsuffix} ]; then + rm go%{binsuffix} +fi +if [ -L gofmt%{binsuffix} ]; then + rm gofmt%{binsuffix} +fi +popd + +%post -n libstdc++%{pkgsuffix} -p /sbin/ldconfig -%postun -n libstdc++ -p /sbin/ldconfig +%postun -n libstdc++%{pkgsuffix} -p /sbin/ldconfig -%post -n libgomp -p /sbin/ldconfig +%post -n libgomp%{pkgsuffix} -p /sbin/ldconfig -%postun -n libgomp -p /sbin/ldconfig +%postun -n libgomp%{pkgsuffix} -p /sbin/ldconfig -%post -n libquadmath -p /sbin/ldconfig +%post -n libquadmath%{pkgsuffix} -p /sbin/ldconfig -%postun -n libquadmath -p /sbin/ldconfig +%postun -n libquadmath%{pkgsuffix} -p /sbin/ldconfig -%post -n libitm -p /sbin/ldconfig +%post -n libitm%{pkgsuffix} -p /sbin/ldconfig -%postun -n libitm -p /sbin/ldconfig +%postun -n libitm%{pkgsuffix} -p /sbin/ldconfig -%post -n libatomic -p /sbin/ldconfig +%post -n libatomic%{pkgsuffix} -p /sbin/ldconfig -%postun -n libatomic -p /sbin/ldconfig +%postun -n libatomic%{pkgsuffix} -p /sbin/ldconfig -%post -n libasan -p /sbin/ldconfig +%post -n libasan%{pkgsuffix} -p /sbin/ldconfig -%postun -n libasan -p /sbin/ldconfig +%postun -n libasan%{pkgsuffix} -p /sbin/ldconfig -%post -n libubsan -p /sbin/ldconfig +%post -n libubsan%{pkgsuffix} -p /sbin/ldconfig -%postun -n libubsan -p /sbin/ldconfig +%postun -n libubsan%{pkgsuffix} -p /sbin/ldconfig -%post -n libtsan -p /sbin/ldconfig +%post -n libtsan%{pkgsuffix} -p /sbin/ldconfig -%postun -n libtsan -p /sbin/ldconfig +%postun -n libtsan%{pkgsuffix} -p /sbin/ldconfig -%post -n liblsan -p /sbin/ldconfig +%post -n liblsan%{pkgsuffix} -p /sbin/ldconfig -%postun -n liblsan -p /sbin/ldconfig +%postun -n liblsan%{pkgsuffix} -p /sbin/ldconfig %files -f %{name}.lang %defattr(-,root,root,-) @@ -1772,16 +1797,16 @@ end # !crossbuild %endif -%files -n cpp -f cpplib.lang +%files -n cpp%{pkgsuffix} -f cpplib.lang %defattr(-,root,root,-) -/%{_lib}/cpp -%{_prefix}/bin/cpp +/%{_lib}/cpp%{binsuffix} +%{_prefix}/bin/cpp%{binsuffix} %dir %{_prefix}/libexec/gcc %dir %{_prefix}/libexec/gcc/%{gcc_target_platform} %dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 -%files -n libgcc +%files -n libgcc%{pkgsuffix} %defattr(-,root,root,-) /%{_lib}/libgcc_s-%{gcc_version}.so.1 /%{_lib}/libgcc_s.* @@ -1790,7 +1815,7 @@ end %files c++ %defattr(-,root,root,-) %ifnarch %{arm} aarch64 mipsel -%{_prefix}/bin/%{gcc_target_platform}-*++ +%{_prefix}/bin/%{gcc_target_platform}-*++%{binsuffix} %endif %{_prefix}/bin/g++%{binsuffix} %{_prefix}/bin/c++%{binsuffix} @@ -1818,7 +1843,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif -%files -n libstdc++ +%files -n libstdc++%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libstdc++.so.6* %dir %{_datadir}/gdb @@ -1830,7 +1855,7 @@ end %{_prefix}/share/gcc-%{gcc_version}/python %{_prefix}/share/gcc-%{gcc_version}/python/libstdcxx -%files -n libstdc++-devel +%files -n libstdc++%{pkgsuffix}-devel %defattr(-,root,root,-) %dir %{_prefix}/include/c++ %dir %{_prefix}/include/c++/%{gcc_version} @@ -1845,7 +1870,7 @@ end %endif %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++fs.a -%files -n libstdc++-static +%files -n libstdc++%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1855,7 +1880,7 @@ end %if !%{crossbuild} %if %{build_libstdcxx_doc} -%files -n libstdc++-doc +%files -n libstdc++%{pkgsuffix}-doc %defattr(-,root,root) %{_mandir}/man3/* %{_docdir}/libstdc++-%{version} @@ -1863,12 +1888,12 @@ end # !crossbuild %endif -%files -n libgomp +%files -n libgomp%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libgomp.* %if %{build_64bit_multilib} -%files -n gcc-multilib +%files -n gcc%{pkgsuffix}-multilib %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64 %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/crt*.o @@ -1880,12 +1905,12 @@ end %endif %if %{build_libquadmath} -%files -n libquadmath +%files -n libquadmath%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libquadmath.so.0* %license rpm.doc/libquadmath/COPYING* -%files -n libquadmath-devel +%files -n libquadmath%{pkgsuffix}-devel %defattr(-,root,root,-) %{_prefix}/%{_lib}/libquadmath.so %dir %{_prefix}/%{_lib}/gcc @@ -1896,7 +1921,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/quadmath_weak.h %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.so -%files -n libquadmath-static +%files -n libquadmath%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1905,18 +1930,18 @@ end %endif %if %{build_libitm} -%files -n libitm +%files -n libitm%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libitm.so.1* -%files -n libitm-devel +%files -n libitm%{pkgsuffix}-devel %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include %doc rpm.doc/libitm/ChangeLog* -%files -n libitm-static +%files -n libitm%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1925,11 +1950,11 @@ end %endif %if %{build_libatomic} -%files -n libatomic +%files -n libatomic%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libatomic.so.1* -%files -n libatomic-static +%files -n libatomic%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1938,11 +1963,11 @@ end %endif %if %{build_libasan} -%files -n libasan +%files -n libasan%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libasan.so.8* -%files -n libasan-static +%files -n libasan%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1951,10 +1976,10 @@ end %endif %if %{build_libubsan} -%files -n libubsan +%files -n libubsan%{pkgsuffix} %{_prefix}/%{_lib}/libubsan.so.1* -%files -n libubsan-static +%files -n libubsan%{pkgsuffix}-static %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -1974,11 +1999,11 @@ end %endif %if %{build_libtsan} -%files -n libtsan +%files -n libtsan%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libtsan.so.2* -%files -n libtsan-static +%files -n libtsan%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1989,10 +2014,10 @@ end %endif %if %{build_liblsan} -%files -n liblsan +%files -n liblsan%{pkgsuffix} %{_prefix}/%{_lib}/liblsan.so.0* -%files -n liblsan-static +%files -n liblsan%{pkgsuffix}-static %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2004,11 +2029,13 @@ end %if %{build_go} %files go %{_prefix}/bin/gccgo%{binsuffix} -%{_prefix}/bin/go%{binsuffix} -%{_prefix}/bin/gofmt%{binsuffix} -%{_mandir}/man1/gccgo.1* -%{_mandir}/man1/go.1* -%{_mandir}/man1/gofmt.1* +%ghost %{_prefix}/bin/go%{binsuffix} +%{_prefix}/bin/go.gcc%{binsuffix} +%ghost %{_prefix}/bin/gofmt%{binsuffix} +%{_prefix}/bin/gofmt.gcc%{binsuffix} +%{_mandir}/man1/gccgo%{binsuffix}.1* +%{_mandir}/man1/go%{binsuffix}.1* +%{_mandir}/man1/gofmt%{binsuffix}.1* %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2032,11 +2059,12 @@ end %endif %doc rpm.doc/go/* -%files -n libgo +%files -n libgo%{pkgsuffix} +%{_prefix}/%{_lib}/libgo.so %attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.22* %doc rpm.doc/libgo/* -%files -n libgo-devel +%files -n libgo%{pkgsuffix}-devel %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2056,7 +2084,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so %endif -%files -n libgo-static +%files -n libgo%{pkgsuffix}-static %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} diff --git a/rpm/cross-x86_64-gcc13.spec b/rpm/cross-x86_64-gcc13.spec index 989fdc1..ee79522 100644 --- a/rpm/cross-x86_64-gcc13.spec +++ b/rpm/cross-x86_64-gcc13.spec @@ -104,6 +104,7 @@ ExclusiveArch: %ix86 x86_64 %endif %global binsuffix -13 +%global pkgsuffix 13 %global gcc_version 13.3.1 %global gcc_release 1 %global _unpackaged_files_terminate_build 0 @@ -212,9 +213,9 @@ BuildRequires: graphviz %endif %if !%{crossbuild} -Requires: cpp = %{version}-%{release} -Requires: libgcc >= %{version}-%{release} -Requires: libgomp = %{version}-%{release} +Requires: (cpp%{pkgsuffix} = %{version}-%{release} or cpp = %{version}-%{release}) +Requires: (libgcc%{pkgsuffix} >= %{version}-%{release} or libgcc >= %{version}-%{release}) +Requires: (libgomp%{pkgsuffix} = %{version}-%{release} or libgomp = %{version}-%{release}) Requires: glibc-devel Requires: binutils >= 2.25 %endif @@ -229,7 +230,7 @@ Requires: glibc64bit-helper BuildRequires: net-tools, procps %endif -Obsoletes: gcc < %{version}-%{release} +Obsoletes: gcc%{pkgsuffix} < %{version}-%{release} AutoReq: true # /!crossbuild %endif @@ -254,24 +255,24 @@ Man and info pages for %{name}. # !crossbuild %endif -%package -n libgcc +%package -n libgcc%{pkgsuffix} Summary: GCC version 13.3 shared support library -Obsoletes: libgcc < %{version}-%{release} +Obsoletes: libgcc%{pkgsuffix} < %{version}-%{release} Autoreq: true %if "%{version}" != "%{gcc_version}" Provides: libgcc = %{gcc_version} %endif -%description -n libgcc +%description -n libgcc%{pkgsuffix} This package contains GCC shared support library which is needed e.g. for exception handling support. %package c++ Summary: C++ support for GCC -Requires: gcc = %{version}-%{release} -Requires: libstdc++ = %{version}-%{release} -Requires: libstdc++-devel = %{version}-%{release} -Obsoletes: gcc-c++ < %{version}-%{release} +Requires: (gcc%{pkgsuffix} = %{version}-%{release} or gcc = %{version}-%{release}) +Requires: (libstdc++%{pkgsuffix} = %{version}-%{release} or libstdc++ = %{version}-%{release}) +Requires: (libstdc++%{pkgsuffix}-devel = %{version}-%{release} or libstdc++-devel = %{version}-%{release}) +Obsoletes: gcc%{pkgsuffix}-c++ < %{version}-%{release} Autoreq: true %description c++ @@ -279,182 +280,181 @@ 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 libstdc++ +%package -n libstdc++%{pkgsuffix} Summary: GNU Standard C++ Library -Obsoletes: libstdc++ < %{version}-%{release} -Obsoletes: libstdc++6 < %{version}-%{release} +Obsoletes: libstdc++%{pkgsuffix} < %{version}-%{release} Autoreq: true Requires: glibc -%description -n libstdc++ +%description -n libstdc++%{pkgsuffix} The libstdc++ package contains a rewritten standard compliant GCC Standard C++ Library. -%package -n libstdc++-devel +%package -n libstdc++%{pkgsuffix}-devel Summary: Header files and libraries for C++ development -Requires: libstdc++ = %{version}-%{release} -Obsoletes: libstdc++-devel < %{version}-%{release} +Requires: libstdc++%{pkgsuffix} = %{version}-%{release} +Obsoletes: libstdc++%{pkgsuffix}-devel < %{version}-%{release} Autoreq: true -%description -n libstdc++-devel +%description -n libstdc++%{pkgsuffix}-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 libstdc++-static +%package -n libstdc++%{pkgsuffix}-static Summary: Static libraries for the GNU standard C++ library -Requires: libstdc++-devel = %{version}-%{release} +Requires: libstdc++%{pkgsuffix}-devel = %{version}-%{release} Autoreq: true -%description -n libstdc++-static +%description -n libstdc++%{pkgsuffix}-static Static libraries for the GNU standard C++ library. %if !%{crossbuild} -%package -n libstdc++-doc +%package -n libstdc++%{pkgsuffix}-doc Summary: Documentation for the GNU standard C++ library -Requires: libstdc++ = %{version}-%{release} -Obsoletes: libstdc++-docs +Requires: libstdc++%{pkgsuffix} = %{version}-%{release} +Obsoletes: libstdc++%{pkgsuffix}-docs Autoreq: true -%description -n libstdc++-doc +%description -n libstdc++%{pkgsuffix}-doc Manual, doxygen generated API information and Frequently Asked Questions for the GNU standard C++ library. # !crossbuild %endif -%package -n libgomp +%package -n libgomp%{pkgsuffix} Summary: GCC OpenMP v4.5 shared support library -Obsoletes: libgomp < %{version}-%{release} +Obsoletes: libgomp%{pkgsuffix} < %{version}-%{release} -%description -n libgomp +%description -n libgomp%{pkgsuffix} This package contains GCC shared support library which is needed for OpenMP v3.0 support. -%package -n libquadmath +%package -n libquadmath%{pkgsuffix} Summary: GCC __float128 shared support library -%description -n libquadmath +%description -n libquadmath%{pkgsuffix} This package contains GCC shared support library which is needed for __float128 math support and for Fortran REAL*16 support. -%package -n libquadmath-devel +%package -n libquadmath%{pkgsuffix}-devel Summary: GCC __float128 support -Requires: libquadmath = %{version}-%{release} -Requires: gcc = %{version}-%{release} +Requires: libquadmath%{pkgsuffix} = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} -%description -n libquadmath-devel +%description -n libquadmath%{pkgsuffix}-devel This package contains headers for building Fortran programs using REAL*16 and programs using __float128 math. -%package -n libquadmath-static +%package -n libquadmath%{pkgsuffix}-static Summary: Static libraries for __float128 support -Requires: libquadmath-devel = %{version}-%{release} +Requires: libquadmath%{pkgsuffix}-devel = %{version}-%{release} -%description -n libquadmath-static +%description -n libquadmath%{pkgsuffix}-static This package contains static libraries for building Fortran programs using REAL*16 and programs using __float128 math. -%package -n libitm +%package -n libitm%{pkgsuffix} Summary: The GNU Transactional Memory library -%description -n libitm +%description -n libitm%{pkgsuffix} This package contains the GNU Transactional Memory library which is a GCC transactional memory support runtime library. -%package -n libitm-devel +%package -n libitm%{pkgsuffix}-devel Summary: The GNU Transactional Memory support -Requires: libitm = %{version}-%{release} -Requires: gcc = %{version}-%{release} +Requires: libitm%{pkgsuffix} = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} -%description -n libitm-devel +%description -n libitm%{pkgsuffix}-devel This package contains headers and support files for the GNU Transactional Memory library. -%package -n libitm-static +%package -n libitm%{pkgsuffix}-static Summary: The GNU Transactional Memory static library -Requires: libitm-devel = %{version}-%{release} +Requires: libitm%{pkgsuffix}-devel = %{version}-%{release} -%description -n libitm-static +%description -n libitm%{pkgsuffix}-static This package contains GNU Transactional Memory static libraries. -%package -n libatomic +%package -n libatomic%{pkgsuffix} Summary: The GNU Atomic library -%description -n libatomic +%description -n libatomic%{pkgsuffix} This package contains the GNU Atomic library which is a GCC support runtime library for atomic operations not supported by hardware. -%package -n libatomic-static +%package -n libatomic%{pkgsuffix}-static Summary: The GNU Atomic static library -Requires: libatomic = %{version}-%{release} +Requires: libatomic%{pkgsuffix} = %{version}-%{release} -%description -n libatomic-static +%description -n libatomic%{pkgsuffix}-static This package contains GNU Atomic static libraries. -%package -n libasan +%package -n libasan%{pkgsuffix} Summary: The Address Sanitizer runtime library -%description -n libasan +%description -n libasan%{pkgsuffix} This package contains the Address Sanitizer library which is used for -fsanitize=address instrumented programs. -%package -n libasan-static +%package -n libasan%{pkgsuffix}-static Summary: The Address Sanitizer static library -Requires: libasan = %{version}-%{release} +Requires: libasan%{pkgsuffix} = %{version}-%{release} -%description -n libasan-static +%description -n libasan%{pkgsuffix}-static This package contains Address Sanitizer static runtime library. -%package -n libtsan +%package -n libtsan%{pkgsuffix} Summary: The Thread Sanitizer runtime library -%description -n libtsan +%description -n libtsan%{pkgsuffix} This package contains the Thread Sanitizer library which is used for -fsanitize=thread instrumented programs. -%package -n libtsan-static +%package -n libtsan%{pkgsuffix}-static Summary: The Thread Sanitizer static library -Requires: libtsan = %{version}-%{release} +Requires: libtsan%{pkgsuffix} = %{version}-%{release} -%description -n libtsan-static +%description -n libtsan%{pkgsuffix}-static This package contains Thread Sanitizer static runtime library. -%package -n libubsan +%package -n libubsan%{pkgsuffix} Summary: The Undefined Behavior Sanitizer runtime library -%description -n libubsan +%description -n libubsan%{pkgsuffix} This package contains the Undefined Behavior Sanitizer library which is used for -fsanitize=undefined instrumented programs. -%package -n libubsan-static +%package -n libubsan%{pkgsuffix}-static Summary: The Undefined Behavior Sanitizer static library -Requires: libubsan = %{version}-%{release} +Requires: libubsan%{pkgsuffix} = %{version}-%{release} -%description -n libubsan-static +%description -n libubsan%{pkgsuffix}-static This package contains Undefined Behavior Sanitizer static runtime library. -%package -n liblsan +%package -n liblsan%{pkgsuffix} Summary: The Leak Sanitizer runtime library -%description -n liblsan +%description -n liblsan%{pkgsuffix} This package contains the Leak Sanitizer library which is used for -fsanitize=leak instrumented programs. -%package -n liblsan-static +%package -n liblsan%{pkgsuffix}-static Summary: The Leak Sanitizer static library -Requires: liblsan = %{version}-%{release} +Requires: liblsan%{pkgsuffix} = %{version}-%{release} -%description -n liblsan-static +%description -n liblsan%{pkgsuffix}-static This package contains Leak Sanitizer static runtime library. -%package -n cpp +%package -n cpp%{pkgsuffix} Summary: The C Preprocessor Requires: mpc -Obsoletes: cpp < %{version}-%{release} +Obsoletes: cpp%{pkgsuffix} < %{version}-%{release} Autoreq: true -%description -n cpp +%description -n cpp%{pkgsuffix} 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 @@ -476,19 +476,19 @@ compiler about where each source line originated). You should install this package if you are a C programmer and you use macros. -%package -n gcc-multilib +%package -n gcc%{pkgsuffix}-multilib Summary: for 64bit multilib support Autoreq: true -%description -n gcc-multilib +%description -n gcc%{pkgsuffix}-multilib This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %package go Summary: Go support -Requires: gcc = %{version}-%{release} -Requires: libgo = %{version}-%{release} -Requires: libgo-devel = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} +Requires: libgo%{pkgsuffix} = %{version}-%{release} +Requires: libgo%{pkgsuffix}-devel = %{version}-%{release} Provides: gccgo = %{version}-%{release} Autoreq: true @@ -496,34 +496,34 @@ Autoreq: true The gcc-go package provides support for compiling Go programs with the GNU Compiler Collection. -%package -n libgo +%package -n libgo%{pkgsuffix} Summary: Go runtime Autoreq: true -%description -n libgo +%description -n libgo%{pkgsuffix} This package contains Go shared library which is needed to run Go dynamically linked programs. -%package -n libgo-devel +%package -n libgo%{pkgsuffix}-devel Summary: Go development libraries -Requires: libgo = %{version}-%{release} +Requires: libgo%{pkgsuffix} = %{version}-%{release} Autoreq: true -%description -n libgo-devel +%description -n libgo%{pkgsuffix}-devel This package includes libraries and support files for compiling Go programs. -%package -n libgo-static +%package -n libgo%{pkgsuffix}-static Summary: Static Go libraries -Requires: libgo = %{version}-%{release} -Requires: gcc = %{version}-%{release} +Requires: libgo%{pkgsuffix} = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} -%description -n libgo-static +%description -n libgo%{pkgsuffix}-static This package contains static Go libraries. %package plugin-devel Summary: Support for compiling GCC plugins -Requires: gcc = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} Requires: gmp-devel >= 4.1.2-8, mpfr-devel >= 3.1.0, libmpc-devel >= 0.8.1 %description plugin-devel @@ -867,9 +867,9 @@ FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_versio mkdir -p $FULLPATH mkdir -p $FULLEPATH -ln -sf gcc %{buildroot}%{_prefix}/bin/cc +ln -sf gcc%{binsuffix} %{buildroot}%{_prefix}/bin/cc%{binsuffix} mkdir -p %{buildroot}/%{_lib} -ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp +ln -sf ..%{_prefix}/bin/cpp%{binsuffix} %{buildroot}/%{_lib}/cpp%{binsuffix} %if %{build_go} mv %{buildroot}%{_prefix}/bin/go{,.gcc}%{binsuffix} @@ -1032,7 +1032,7 @@ ln -sf ../../../libgdruntime.so.4.* libgdruntime.so ln -sf ../../../libgphobos.so.4.* libgphobos.so %endif %if %{build_libitm} -ln -sf ../../../libitm.so.1.* libitm.so +ln -sf ../../../libitm.so.1.* libitm%{binsuffix}.so %endif %if %{build_libatomic} ln -sf ../../../libatomic.so.1.* libatomic.so @@ -1225,7 +1225,7 @@ for h in `find $FULLPATH/include -name \*.h`; do fi done -cat > %{buildroot}%{_prefix}/bin/c89 <<"EOF" +cat > %{buildroot}%{_prefix}/bin/c89%{binsuffix} <<"EOF" #!/bin/sh fl="-std=c89" for opt; do @@ -1235,9 +1235,9 @@ for opt; do exit 1;; esac done -exec gcc $fl ${1+"$@"} +exec gcc%{binsuffix} $fl ${1+"$@"} EOF -cat > %{buildroot}%{_prefix}/bin/c99 <<"EOF" +cat > %{buildroot}%{_prefix}/bin/c99%{binsuffix} <<"EOF" #!/bin/sh fl="-std=c99" for opt; do @@ -1247,28 +1247,33 @@ for opt; do exit 1;; esac done -exec gcc $fl ${1+"$@"} +exec gcc%{binsuffix} $fl ${1+"$@"} EOF -chmod 755 %{buildroot}%{_prefix}/bin/c?9 +chmod 755 %{buildroot}%{_prefix}/bin/c?9%{binsuffix} cd .. -%find_lang %{name}%{binsuffix} -%find_lang cpplib%{binsuffix} + +for lc_messages in `ls -d %{buildroot}/%{_prefix}/share/locale/*/LC_MESSAGES/`; do + mv $lc_messages/gcc.mo $lc_messages/gcc13.mo || : + mv $lc_messages/libstdc++.mo $lc_messages/libstdc++13.mo || : +done +%find_lang gcc13 +%find_lang cpplib # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} || : -rm -f $FULLEPATH/install-tools/{mkheaders,fixincl} +rm -f $FULLEPATH/install-tools/* rm -f %{buildroot}%{_prefix}/lib/{32,64}/libiberty.a rm -f %{buildroot}%{_prefix}/%{_lib}/libssp* rm -f %{buildroot}%{_prefix}/%{_lib}/libvtv* || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gfortran || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gccgo || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcj || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ar || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-nm || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ranlib || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gdc || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gfortran%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gccgo%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcj%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ar%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-nm%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ranlib%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gdc%{binsuffix} || : %ifarch %{multilib_64_archs} # Remove libraries for the other arch on multilib arches @@ -1377,7 +1382,7 @@ rm -rf testlogs-%{_target_platform}-%{version}-%{release} # Because glibc Prereq's libgcc and /sbin/ldconfig # comes from glibc, it might not exist yet when # libgcc is installed -%post -n libgcc -p +%post -n libgcc%{pkgsuffix} -p if posix.access ("/sbin/ldconfig", "x") then local pid = posix.fork () if pid == 0 then @@ -1387,7 +1392,7 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%postun -n libgcc -p +%postun -n libgcc%{pkgsuffix} -p if posix.access ("/sbin/ldconfig", "x") then local pid = posix.fork () if pid == 0 then @@ -1397,41 +1402,61 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%post -n libstdc++ -p /sbin/ldconfig +%post go +pushd %{_bindir} +if [ ! -f go%{binsuffix} ] ; then + ln -s go.gcc%{binsuffix} go%{binsuffix} +fi +if [ ! -f gofmt%{binsuffix} ] ; then + ln -s gofmt.gcc%{binsuffix} gofmt%{binsuffix} +fi +popd + +%preun go +pushd %{_bindir} +if [ -L go%{binsuffix} ]; then + rm go%{binsuffix} +fi +if [ -L gofmt%{binsuffix} ]; then + rm gofmt%{binsuffix} +fi +popd + +%post -n libstdc++%{pkgsuffix} -p /sbin/ldconfig -%postun -n libstdc++ -p /sbin/ldconfig +%postun -n libstdc++%{pkgsuffix} -p /sbin/ldconfig -%post -n libgomp -p /sbin/ldconfig +%post -n libgomp%{pkgsuffix} -p /sbin/ldconfig -%postun -n libgomp -p /sbin/ldconfig +%postun -n libgomp%{pkgsuffix} -p /sbin/ldconfig -%post -n libquadmath -p /sbin/ldconfig +%post -n libquadmath%{pkgsuffix} -p /sbin/ldconfig -%postun -n libquadmath -p /sbin/ldconfig +%postun -n libquadmath%{pkgsuffix} -p /sbin/ldconfig -%post -n libitm -p /sbin/ldconfig +%post -n libitm%{pkgsuffix} -p /sbin/ldconfig -%postun -n libitm -p /sbin/ldconfig +%postun -n libitm%{pkgsuffix} -p /sbin/ldconfig -%post -n libatomic -p /sbin/ldconfig +%post -n libatomic%{pkgsuffix} -p /sbin/ldconfig -%postun -n libatomic -p /sbin/ldconfig +%postun -n libatomic%{pkgsuffix} -p /sbin/ldconfig -%post -n libasan -p /sbin/ldconfig +%post -n libasan%{pkgsuffix} -p /sbin/ldconfig -%postun -n libasan -p /sbin/ldconfig +%postun -n libasan%{pkgsuffix} -p /sbin/ldconfig -%post -n libubsan -p /sbin/ldconfig +%post -n libubsan%{pkgsuffix} -p /sbin/ldconfig -%postun -n libubsan -p /sbin/ldconfig +%postun -n libubsan%{pkgsuffix} -p /sbin/ldconfig -%post -n libtsan -p /sbin/ldconfig +%post -n libtsan%{pkgsuffix} -p /sbin/ldconfig -%postun -n libtsan -p /sbin/ldconfig +%postun -n libtsan%{pkgsuffix} -p /sbin/ldconfig -%post -n liblsan -p /sbin/ldconfig +%post -n liblsan%{pkgsuffix} -p /sbin/ldconfig -%postun -n liblsan -p /sbin/ldconfig +%postun -n liblsan%{pkgsuffix} -p /sbin/ldconfig %files -f %{name}.lang %defattr(-,root,root,-) @@ -1772,16 +1797,16 @@ end # !crossbuild %endif -%files -n cpp -f cpplib.lang +%files -n cpp%{pkgsuffix} -f cpplib.lang %defattr(-,root,root,-) -/%{_lib}/cpp -%{_prefix}/bin/cpp +/%{_lib}/cpp%{binsuffix} +%{_prefix}/bin/cpp%{binsuffix} %dir %{_prefix}/libexec/gcc %dir %{_prefix}/libexec/gcc/%{gcc_target_platform} %dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 -%files -n libgcc +%files -n libgcc%{pkgsuffix} %defattr(-,root,root,-) /%{_lib}/libgcc_s-%{gcc_version}.so.1 /%{_lib}/libgcc_s.* @@ -1790,7 +1815,7 @@ end %files c++ %defattr(-,root,root,-) %ifnarch %{arm} aarch64 mipsel -%{_prefix}/bin/%{gcc_target_platform}-*++ +%{_prefix}/bin/%{gcc_target_platform}-*++%{binsuffix} %endif %{_prefix}/bin/g++%{binsuffix} %{_prefix}/bin/c++%{binsuffix} @@ -1818,7 +1843,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif -%files -n libstdc++ +%files -n libstdc++%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libstdc++.so.6* %dir %{_datadir}/gdb @@ -1830,7 +1855,7 @@ end %{_prefix}/share/gcc-%{gcc_version}/python %{_prefix}/share/gcc-%{gcc_version}/python/libstdcxx -%files -n libstdc++-devel +%files -n libstdc++%{pkgsuffix}-devel %defattr(-,root,root,-) %dir %{_prefix}/include/c++ %dir %{_prefix}/include/c++/%{gcc_version} @@ -1845,7 +1870,7 @@ end %endif %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++fs.a -%files -n libstdc++-static +%files -n libstdc++%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1855,7 +1880,7 @@ end %if !%{crossbuild} %if %{build_libstdcxx_doc} -%files -n libstdc++-doc +%files -n libstdc++%{pkgsuffix}-doc %defattr(-,root,root) %{_mandir}/man3/* %{_docdir}/libstdc++-%{version} @@ -1863,12 +1888,12 @@ end # !crossbuild %endif -%files -n libgomp +%files -n libgomp%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libgomp.* %if %{build_64bit_multilib} -%files -n gcc-multilib +%files -n gcc%{pkgsuffix}-multilib %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64 %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/crt*.o @@ -1880,12 +1905,12 @@ end %endif %if %{build_libquadmath} -%files -n libquadmath +%files -n libquadmath%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libquadmath.so.0* %license rpm.doc/libquadmath/COPYING* -%files -n libquadmath-devel +%files -n libquadmath%{pkgsuffix}-devel %defattr(-,root,root,-) %{_prefix}/%{_lib}/libquadmath.so %dir %{_prefix}/%{_lib}/gcc @@ -1896,7 +1921,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/quadmath_weak.h %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.so -%files -n libquadmath-static +%files -n libquadmath%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1905,18 +1930,18 @@ end %endif %if %{build_libitm} -%files -n libitm +%files -n libitm%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libitm.so.1* -%files -n libitm-devel +%files -n libitm%{pkgsuffix}-devel %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include %doc rpm.doc/libitm/ChangeLog* -%files -n libitm-static +%files -n libitm%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1925,11 +1950,11 @@ end %endif %if %{build_libatomic} -%files -n libatomic +%files -n libatomic%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libatomic.so.1* -%files -n libatomic-static +%files -n libatomic%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1938,11 +1963,11 @@ end %endif %if %{build_libasan} -%files -n libasan +%files -n libasan%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libasan.so.8* -%files -n libasan-static +%files -n libasan%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1951,10 +1976,10 @@ end %endif %if %{build_libubsan} -%files -n libubsan +%files -n libubsan%{pkgsuffix} %{_prefix}/%{_lib}/libubsan.so.1* -%files -n libubsan-static +%files -n libubsan%{pkgsuffix}-static %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -1974,11 +1999,11 @@ end %endif %if %{build_libtsan} -%files -n libtsan +%files -n libtsan%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libtsan.so.2* -%files -n libtsan-static +%files -n libtsan%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1989,10 +2014,10 @@ end %endif %if %{build_liblsan} -%files -n liblsan +%files -n liblsan%{pkgsuffix} %{_prefix}/%{_lib}/liblsan.so.0* -%files -n liblsan-static +%files -n liblsan%{pkgsuffix}-static %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2004,11 +2029,13 @@ end %if %{build_go} %files go %{_prefix}/bin/gccgo%{binsuffix} -%{_prefix}/bin/go%{binsuffix} -%{_prefix}/bin/gofmt%{binsuffix} -%{_mandir}/man1/gccgo.1* -%{_mandir}/man1/go.1* -%{_mandir}/man1/gofmt.1* +%ghost %{_prefix}/bin/go%{binsuffix} +%{_prefix}/bin/go.gcc%{binsuffix} +%ghost %{_prefix}/bin/gofmt%{binsuffix} +%{_prefix}/bin/gofmt.gcc%{binsuffix} +%{_mandir}/man1/gccgo%{binsuffix}.1* +%{_mandir}/man1/go%{binsuffix}.1* +%{_mandir}/man1/gofmt%{binsuffix}.1* %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2032,11 +2059,12 @@ end %endif %doc rpm.doc/go/* -%files -n libgo +%files -n libgo%{pkgsuffix} +%{_prefix}/%{_lib}/libgo.so %attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.22* %doc rpm.doc/libgo/* -%files -n libgo-devel +%files -n libgo%{pkgsuffix}-devel %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2056,7 +2084,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so %endif -%files -n libgo-static +%files -n libgo%{pkgsuffix}-static %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} diff --git a/rpm/gcc13.spec b/rpm/gcc13.spec old mode 100644 new mode 100755 index fe746b4..bca1100 --- a/rpm/gcc13.spec +++ b/rpm/gcc13.spec @@ -103,6 +103,7 @@ ExclusiveArch: %ix86 x86_64 %endif %global binsuffix -13 +%global pkgsuffix 13 %global gcc_version 13.3.1 %global gcc_release 1 %global _unpackaged_files_terminate_build 0 @@ -211,9 +212,9 @@ BuildRequires: graphviz %endif %if !%{crossbuild} -Requires: cpp = %{version}-%{release} -Requires: libgcc >= %{version}-%{release} -Requires: libgomp = %{version}-%{release} +Requires: (cpp%{pkgsuffix} = %{version}-%{release} or cpp = %{version}-%{release}) +Requires: (libgcc%{pkgsuffix} >= %{version}-%{release} or libgcc >= %{version}-%{release}) +Requires: (libgomp%{pkgsuffix} = %{version}-%{release} or libgomp = %{version}-%{release}) Requires: glibc-devel Requires: binutils >= 2.25 %endif @@ -228,7 +229,7 @@ Requires: glibc64bit-helper BuildRequires: net-tools, procps %endif -Obsoletes: gcc < %{version}-%{release} +Obsoletes: gcc%{pkgsuffix} < %{version}-%{release} AutoReq: true # /!crossbuild %endif @@ -253,24 +254,24 @@ Man and info pages for %{name}. # !crossbuild %endif -%package -n libgcc +%package -n libgcc%{pkgsuffix} Summary: GCC version 13.3 shared support library -Obsoletes: libgcc < %{version}-%{release} +Obsoletes: libgcc%{pkgsuffix} < %{version}-%{release} Autoreq: true %if "%{version}" != "%{gcc_version}" Provides: libgcc = %{gcc_version} %endif -%description -n libgcc +%description -n libgcc%{pkgsuffix} This package contains GCC shared support library which is needed e.g. for exception handling support. %package c++ Summary: C++ support for GCC -Requires: gcc = %{version}-%{release} -Requires: libstdc++ = %{version}-%{release} -Requires: libstdc++-devel = %{version}-%{release} -Obsoletes: gcc-c++ < %{version}-%{release} +Requires: (gcc%{pkgsuffix} = %{version}-%{release} or gcc = %{version}-%{release}) +Requires: (libstdc++%{pkgsuffix} = %{version}-%{release} or libstdc++ = %{version}-%{release}) +Requires: (libstdc++%{pkgsuffix}-devel = %{version}-%{release} or libstdc++-devel = %{version}-%{release}) +Obsoletes: gcc%{pkgsuffix}-c++ < %{version}-%{release} Autoreq: true %description c++ @@ -278,182 +279,181 @@ 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 libstdc++ +%package -n libstdc++%{pkgsuffix} Summary: GNU Standard C++ Library -Obsoletes: libstdc++ < %{version}-%{release} -Obsoletes: libstdc++6 < %{version}-%{release} +Obsoletes: libstdc++%{pkgsuffix} < %{version}-%{release} Autoreq: true Requires: glibc -%description -n libstdc++ +%description -n libstdc++%{pkgsuffix} The libstdc++ package contains a rewritten standard compliant GCC Standard C++ Library. -%package -n libstdc++-devel +%package -n libstdc++%{pkgsuffix}-devel Summary: Header files and libraries for C++ development -Requires: libstdc++ = %{version}-%{release} -Obsoletes: libstdc++-devel < %{version}-%{release} +Requires: libstdc++%{pkgsuffix} = %{version}-%{release} +Obsoletes: libstdc++%{pkgsuffix}-devel < %{version}-%{release} Autoreq: true -%description -n libstdc++-devel +%description -n libstdc++%{pkgsuffix}-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 libstdc++-static +%package -n libstdc++%{pkgsuffix}-static Summary: Static libraries for the GNU standard C++ library -Requires: libstdc++-devel = %{version}-%{release} +Requires: libstdc++%{pkgsuffix}-devel = %{version}-%{release} Autoreq: true -%description -n libstdc++-static +%description -n libstdc++%{pkgsuffix}-static Static libraries for the GNU standard C++ library. %if !%{crossbuild} -%package -n libstdc++-doc +%package -n libstdc++%{pkgsuffix}-doc Summary: Documentation for the GNU standard C++ library -Requires: libstdc++ = %{version}-%{release} -Obsoletes: libstdc++-docs +Requires: libstdc++%{pkgsuffix} = %{version}-%{release} +Obsoletes: libstdc++%{pkgsuffix}-docs Autoreq: true -%description -n libstdc++-doc +%description -n libstdc++%{pkgsuffix}-doc Manual, doxygen generated API information and Frequently Asked Questions for the GNU standard C++ library. # !crossbuild %endif -%package -n libgomp +%package -n libgomp%{pkgsuffix} Summary: GCC OpenMP v4.5 shared support library -Obsoletes: libgomp < %{version}-%{release} +Obsoletes: libgomp%{pkgsuffix} < %{version}-%{release} -%description -n libgomp +%description -n libgomp%{pkgsuffix} This package contains GCC shared support library which is needed for OpenMP v3.0 support. -%package -n libquadmath +%package -n libquadmath%{pkgsuffix} Summary: GCC __float128 shared support library -%description -n libquadmath +%description -n libquadmath%{pkgsuffix} This package contains GCC shared support library which is needed for __float128 math support and for Fortran REAL*16 support. -%package -n libquadmath-devel +%package -n libquadmath%{pkgsuffix}-devel Summary: GCC __float128 support -Requires: libquadmath = %{version}-%{release} -Requires: gcc = %{version}-%{release} +Requires: libquadmath%{pkgsuffix} = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} -%description -n libquadmath-devel +%description -n libquadmath%{pkgsuffix}-devel This package contains headers for building Fortran programs using REAL*16 and programs using __float128 math. -%package -n libquadmath-static +%package -n libquadmath%{pkgsuffix}-static Summary: Static libraries for __float128 support -Requires: libquadmath-devel = %{version}-%{release} +Requires: libquadmath%{pkgsuffix}-devel = %{version}-%{release} -%description -n libquadmath-static +%description -n libquadmath%{pkgsuffix}-static This package contains static libraries for building Fortran programs using REAL*16 and programs using __float128 math. -%package -n libitm +%package -n libitm%{pkgsuffix} Summary: The GNU Transactional Memory library -%description -n libitm +%description -n libitm%{pkgsuffix} This package contains the GNU Transactional Memory library which is a GCC transactional memory support runtime library. -%package -n libitm-devel +%package -n libitm%{pkgsuffix}-devel Summary: The GNU Transactional Memory support -Requires: libitm = %{version}-%{release} -Requires: gcc = %{version}-%{release} +Requires: libitm%{pkgsuffix} = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} -%description -n libitm-devel +%description -n libitm%{pkgsuffix}-devel This package contains headers and support files for the GNU Transactional Memory library. -%package -n libitm-static +%package -n libitm%{pkgsuffix}-static Summary: The GNU Transactional Memory static library -Requires: libitm-devel = %{version}-%{release} +Requires: libitm%{pkgsuffix}-devel = %{version}-%{release} -%description -n libitm-static +%description -n libitm%{pkgsuffix}-static This package contains GNU Transactional Memory static libraries. -%package -n libatomic +%package -n libatomic%{pkgsuffix} Summary: The GNU Atomic library -%description -n libatomic +%description -n libatomic%{pkgsuffix} This package contains the GNU Atomic library which is a GCC support runtime library for atomic operations not supported by hardware. -%package -n libatomic-static +%package -n libatomic%{pkgsuffix}-static Summary: The GNU Atomic static library -Requires: libatomic = %{version}-%{release} +Requires: libatomic%{pkgsuffix} = %{version}-%{release} -%description -n libatomic-static +%description -n libatomic%{pkgsuffix}-static This package contains GNU Atomic static libraries. -%package -n libasan +%package -n libasan%{pkgsuffix} Summary: The Address Sanitizer runtime library -%description -n libasan +%description -n libasan%{pkgsuffix} This package contains the Address Sanitizer library which is used for -fsanitize=address instrumented programs. -%package -n libasan-static +%package -n libasan%{pkgsuffix}-static Summary: The Address Sanitizer static library -Requires: libasan = %{version}-%{release} +Requires: libasan%{pkgsuffix} = %{version}-%{release} -%description -n libasan-static +%description -n libasan%{pkgsuffix}-static This package contains Address Sanitizer static runtime library. -%package -n libtsan +%package -n libtsan%{pkgsuffix} Summary: The Thread Sanitizer runtime library -%description -n libtsan +%description -n libtsan%{pkgsuffix} This package contains the Thread Sanitizer library which is used for -fsanitize=thread instrumented programs. -%package -n libtsan-static +%package -n libtsan%{pkgsuffix}-static Summary: The Thread Sanitizer static library -Requires: libtsan = %{version}-%{release} +Requires: libtsan%{pkgsuffix} = %{version}-%{release} -%description -n libtsan-static +%description -n libtsan%{pkgsuffix}-static This package contains Thread Sanitizer static runtime library. -%package -n libubsan +%package -n libubsan%{pkgsuffix} Summary: The Undefined Behavior Sanitizer runtime library -%description -n libubsan +%description -n libubsan%{pkgsuffix} This package contains the Undefined Behavior Sanitizer library which is used for -fsanitize=undefined instrumented programs. -%package -n libubsan-static +%package -n libubsan%{pkgsuffix}-static Summary: The Undefined Behavior Sanitizer static library -Requires: libubsan = %{version}-%{release} +Requires: libubsan%{pkgsuffix} = %{version}-%{release} -%description -n libubsan-static +%description -n libubsan%{pkgsuffix}-static This package contains Undefined Behavior Sanitizer static runtime library. -%package -n liblsan +%package -n liblsan%{pkgsuffix} Summary: The Leak Sanitizer runtime library -%description -n liblsan +%description -n liblsan%{pkgsuffix} This package contains the Leak Sanitizer library which is used for -fsanitize=leak instrumented programs. -%package -n liblsan-static +%package -n liblsan%{pkgsuffix}-static Summary: The Leak Sanitizer static library -Requires: liblsan = %{version}-%{release} +Requires: liblsan%{pkgsuffix} = %{version}-%{release} -%description -n liblsan-static +%description -n liblsan%{pkgsuffix}-static This package contains Leak Sanitizer static runtime library. -%package -n cpp +%package -n cpp%{pkgsuffix} Summary: The C Preprocessor Requires: mpc -Obsoletes: cpp < %{version}-%{release} +Obsoletes: cpp%{pkgsuffix} < %{version}-%{release} Autoreq: true -%description -n cpp +%description -n cpp%{pkgsuffix} 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 @@ -475,19 +475,19 @@ compiler about where each source line originated). You should install this package if you are a C programmer and you use macros. -%package -n gcc-multilib +%package -n gcc%{pkgsuffix}-multilib Summary: for 64bit multilib support Autoreq: true -%description -n gcc-multilib +%description -n gcc%{pkgsuffix}-multilib This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %package go Summary: Go support -Requires: gcc = %{version}-%{release} -Requires: libgo = %{version}-%{release} -Requires: libgo-devel = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} +Requires: libgo%{pkgsuffix} = %{version}-%{release} +Requires: libgo%{pkgsuffix}-devel = %{version}-%{release} Provides: gccgo = %{version}-%{release} Autoreq: true @@ -495,34 +495,34 @@ Autoreq: true The gcc-go package provides support for compiling Go programs with the GNU Compiler Collection. -%package -n libgo +%package -n libgo%{pkgsuffix} Summary: Go runtime Autoreq: true -%description -n libgo +%description -n libgo%{pkgsuffix} This package contains Go shared library which is needed to run Go dynamically linked programs. -%package -n libgo-devel +%package -n libgo%{pkgsuffix}-devel Summary: Go development libraries -Requires: libgo = %{version}-%{release} +Requires: libgo%{pkgsuffix} = %{version}-%{release} Autoreq: true -%description -n libgo-devel +%description -n libgo%{pkgsuffix}-devel This package includes libraries and support files for compiling Go programs. -%package -n libgo-static +%package -n libgo%{pkgsuffix}-static Summary: Static Go libraries -Requires: libgo = %{version}-%{release} -Requires: gcc = %{version}-%{release} +Requires: libgo%{pkgsuffix} = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} -%description -n libgo-static +%description -n libgo%{pkgsuffix}-static This package contains static Go libraries. %package plugin-devel Summary: Support for compiling GCC plugins -Requires: gcc = %{version}-%{release} +Requires: gcc%{pkgsuffix} = %{version}-%{release} Requires: gmp-devel >= 4.1.2-8, mpfr-devel >= 3.1.0, libmpc-devel >= 0.8.1 %description plugin-devel @@ -866,9 +866,9 @@ FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_versio mkdir -p $FULLPATH mkdir -p $FULLEPATH -ln -sf gcc %{buildroot}%{_prefix}/bin/cc +ln -sf gcc%{binsuffix} %{buildroot}%{_prefix}/bin/cc%{binsuffix} mkdir -p %{buildroot}/%{_lib} -ln -sf ..%{_prefix}/bin/cpp %{buildroot}/%{_lib}/cpp +ln -sf ..%{_prefix}/bin/cpp%{binsuffix} %{buildroot}/%{_lib}/cpp%{binsuffix} %if %{build_go} mv %{buildroot}%{_prefix}/bin/go{,.gcc}%{binsuffix} @@ -1031,7 +1031,7 @@ ln -sf ../../../libgdruntime.so.4.* libgdruntime.so ln -sf ../../../libgphobos.so.4.* libgphobos.so %endif %if %{build_libitm} -ln -sf ../../../libitm.so.1.* libitm.so +ln -sf ../../../libitm.so.1.* libitm%{binsuffix}.so %endif %if %{build_libatomic} ln -sf ../../../libatomic.so.1.* libatomic.so @@ -1224,7 +1224,7 @@ for h in `find $FULLPATH/include -name \*.h`; do fi done -cat > %{buildroot}%{_prefix}/bin/c89 <<"EOF" +cat > %{buildroot}%{_prefix}/bin/c89%{binsuffix} <<"EOF" #!/bin/sh fl="-std=c89" for opt; do @@ -1234,9 +1234,9 @@ for opt; do exit 1;; esac done -exec gcc $fl ${1+"$@"} +exec gcc%{binsuffix} $fl ${1+"$@"} EOF -cat > %{buildroot}%{_prefix}/bin/c99 <<"EOF" +cat > %{buildroot}%{_prefix}/bin/c99%{binsuffix} <<"EOF" #!/bin/sh fl="-std=c99" for opt; do @@ -1246,28 +1246,33 @@ for opt; do exit 1;; esac done -exec gcc $fl ${1+"$@"} +exec gcc%{binsuffix} $fl ${1+"$@"} EOF -chmod 755 %{buildroot}%{_prefix}/bin/c?9 +chmod 755 %{buildroot}%{_prefix}/bin/c?9%{binsuffix} cd .. -%find_lang %{name}%{binsuffix} -%find_lang cpplib%{binsuffix} + +for lc_messages in `ls -d %{buildroot}/%{_prefix}/share/locale/*/LC_MESSAGES/`; do + mv $lc_messages/gcc.mo $lc_messages/gcc13.mo || : + mv $lc_messages/libstdc++.mo $lc_messages/libstdc++13.mo || : +done +%find_lang gcc13 +%find_lang cpplib # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} || : -rm -f $FULLEPATH/install-tools/{mkheaders,fixincl} +rm -f $FULLEPATH/install-tools/* rm -f %{buildroot}%{_prefix}/lib/{32,64}/libiberty.a rm -f %{buildroot}%{_prefix}/%{_lib}/libssp* rm -f %{buildroot}%{_prefix}/%{_lib}/libvtv* || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gfortran || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gccgo || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcj || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ar || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-nm || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ranlib || : -rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gdc || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gfortran%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gccgo%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcj%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ar%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-nm%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ranlib%{binsuffix} || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gdc%{binsuffix} || : %ifarch %{multilib_64_archs} # Remove libraries for the other arch on multilib arches @@ -1376,7 +1381,7 @@ rm -rf testlogs-%{_target_platform}-%{version}-%{release} # Because glibc Prereq's libgcc and /sbin/ldconfig # comes from glibc, it might not exist yet when # libgcc is installed -%post -n libgcc -p +%post -n libgcc%{pkgsuffix} -p if posix.access ("/sbin/ldconfig", "x") then local pid = posix.fork () if pid == 0 then @@ -1386,7 +1391,7 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%postun -n libgcc -p +%postun -n libgcc%{pkgsuffix} -p if posix.access ("/sbin/ldconfig", "x") then local pid = posix.fork () if pid == 0 then @@ -1396,41 +1401,61 @@ if posix.access ("/sbin/ldconfig", "x") then end end -%post -n libstdc++ -p /sbin/ldconfig +%post go +pushd %{_bindir} +if [ ! -f go%{binsuffix} ] ; then + ln -s go.gcc%{binsuffix} go%{binsuffix} +fi +if [ ! -f gofmt%{binsuffix} ] ; then + ln -s gofmt.gcc%{binsuffix} gofmt%{binsuffix} +fi +popd + +%preun go +pushd %{_bindir} +if [ -L go%{binsuffix} ]; then + rm go%{binsuffix} +fi +if [ -L gofmt%{binsuffix} ]; then + rm gofmt%{binsuffix} +fi +popd + +%post -n libstdc++%{pkgsuffix} -p /sbin/ldconfig -%postun -n libstdc++ -p /sbin/ldconfig +%postun -n libstdc++%{pkgsuffix} -p /sbin/ldconfig -%post -n libgomp -p /sbin/ldconfig +%post -n libgomp%{pkgsuffix} -p /sbin/ldconfig -%postun -n libgomp -p /sbin/ldconfig +%postun -n libgomp%{pkgsuffix} -p /sbin/ldconfig -%post -n libquadmath -p /sbin/ldconfig +%post -n libquadmath%{pkgsuffix} -p /sbin/ldconfig -%postun -n libquadmath -p /sbin/ldconfig +%postun -n libquadmath%{pkgsuffix} -p /sbin/ldconfig -%post -n libitm -p /sbin/ldconfig +%post -n libitm%{pkgsuffix} -p /sbin/ldconfig -%postun -n libitm -p /sbin/ldconfig +%postun -n libitm%{pkgsuffix} -p /sbin/ldconfig -%post -n libatomic -p /sbin/ldconfig +%post -n libatomic%{pkgsuffix} -p /sbin/ldconfig -%postun -n libatomic -p /sbin/ldconfig +%postun -n libatomic%{pkgsuffix} -p /sbin/ldconfig -%post -n libasan -p /sbin/ldconfig +%post -n libasan%{pkgsuffix} -p /sbin/ldconfig -%postun -n libasan -p /sbin/ldconfig +%postun -n libasan%{pkgsuffix} -p /sbin/ldconfig -%post -n libubsan -p /sbin/ldconfig +%post -n libubsan%{pkgsuffix} -p /sbin/ldconfig -%postun -n libubsan -p /sbin/ldconfig +%postun -n libubsan%{pkgsuffix} -p /sbin/ldconfig -%post -n libtsan -p /sbin/ldconfig +%post -n libtsan%{pkgsuffix} -p /sbin/ldconfig -%postun -n libtsan -p /sbin/ldconfig +%postun -n libtsan%{pkgsuffix} -p /sbin/ldconfig -%post -n liblsan -p /sbin/ldconfig +%post -n liblsan%{pkgsuffix} -p /sbin/ldconfig -%postun -n liblsan -p /sbin/ldconfig +%postun -n liblsan%{pkgsuffix} -p /sbin/ldconfig %files -f %{name}.lang %defattr(-,root,root,-) @@ -1771,16 +1796,16 @@ end # !crossbuild %endif -%files -n cpp -f cpplib.lang +%files -n cpp%{pkgsuffix} -f cpplib.lang %defattr(-,root,root,-) -/%{_lib}/cpp -%{_prefix}/bin/cpp +/%{_lib}/cpp%{binsuffix} +%{_prefix}/bin/cpp%{binsuffix} %dir %{_prefix}/libexec/gcc %dir %{_prefix}/libexec/gcc/%{gcc_target_platform} %dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 -%files -n libgcc +%files -n libgcc%{pkgsuffix} %defattr(-,root,root,-) /%{_lib}/libgcc_s-%{gcc_version}.so.1 /%{_lib}/libgcc_s.* @@ -1789,7 +1814,7 @@ end %files c++ %defattr(-,root,root,-) %ifnarch %{arm} aarch64 mipsel -%{_prefix}/bin/%{gcc_target_platform}-*++ +%{_prefix}/bin/%{gcc_target_platform}-*++%{binsuffix} %endif %{_prefix}/bin/g++%{binsuffix} %{_prefix}/bin/c++%{binsuffix} @@ -1817,7 +1842,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif -%files -n libstdc++ +%files -n libstdc++%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libstdc++.so.6* %dir %{_datadir}/gdb @@ -1829,7 +1854,7 @@ end %{_prefix}/share/gcc-%{gcc_version}/python %{_prefix}/share/gcc-%{gcc_version}/python/libstdcxx -%files -n libstdc++-devel +%files -n libstdc++%{pkgsuffix}-devel %defattr(-,root,root,-) %dir %{_prefix}/include/c++ %dir %{_prefix}/include/c++/%{gcc_version} @@ -1844,7 +1869,7 @@ end %endif %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++fs.a -%files -n libstdc++-static +%files -n libstdc++%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1854,7 +1879,7 @@ end %if !%{crossbuild} %if %{build_libstdcxx_doc} -%files -n libstdc++-doc +%files -n libstdc++%{pkgsuffix}-doc %defattr(-,root,root) %{_mandir}/man3/* %{_docdir}/libstdc++-%{version} @@ -1862,12 +1887,12 @@ end # !crossbuild %endif -%files -n libgomp +%files -n libgomp%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libgomp.* %if %{build_64bit_multilib} -%files -n gcc-multilib +%files -n gcc%{pkgsuffix}-multilib %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64 %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/64/crt*.o @@ -1879,12 +1904,12 @@ end %endif %if %{build_libquadmath} -%files -n libquadmath +%files -n libquadmath%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libquadmath.so.0* %license rpm.doc/libquadmath/COPYING* -%files -n libquadmath-devel +%files -n libquadmath%{pkgsuffix}-devel %defattr(-,root,root,-) %{_prefix}/%{_lib}/libquadmath.so %dir %{_prefix}/%{_lib}/gcc @@ -1895,7 +1920,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include/quadmath_weak.h %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.so -%files -n libquadmath-static +%files -n libquadmath%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1904,18 +1929,18 @@ end %endif %if %{build_libitm} -%files -n libitm +%files -n libitm%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libitm.so.1* -%files -n libitm-devel +%files -n libitm%{pkgsuffix}-devel %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/include %doc rpm.doc/libitm/ChangeLog* -%files -n libitm-static +%files -n libitm%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1924,11 +1949,11 @@ end %endif %if %{build_libatomic} -%files -n libatomic +%files -n libatomic%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libatomic.so.1* -%files -n libatomic-static +%files -n libatomic%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1937,11 +1962,11 @@ end %endif %if %{build_libasan} -%files -n libasan +%files -n libasan%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libasan.so.8* -%files -n libasan-static +%files -n libasan%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1950,10 +1975,10 @@ end %endif %if %{build_libubsan} -%files -n libubsan +%files -n libubsan%{pkgsuffix} %{_prefix}/%{_lib}/libubsan.so.1* -%files -n libubsan-static +%files -n libubsan%{pkgsuffix}-static %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -1973,11 +1998,11 @@ end %endif %if %{build_libtsan} -%files -n libtsan +%files -n libtsan%{pkgsuffix} %defattr(-,root,root,-) %{_prefix}/%{_lib}/libtsan.so.2* -%files -n libtsan-static +%files -n libtsan%{pkgsuffix}-static %defattr(-,root,root,-) %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} @@ -1988,10 +2013,10 @@ end %endif %if %{build_liblsan} -%files -n liblsan +%files -n liblsan%{pkgsuffix} %{_prefix}/%{_lib}/liblsan.so.0* -%files -n liblsan-static +%files -n liblsan%{pkgsuffix}-static %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2003,11 +2028,13 @@ end %if %{build_go} %files go %{_prefix}/bin/gccgo%{binsuffix} -%{_prefix}/bin/go%{binsuffix} -%{_prefix}/bin/gofmt%{binsuffix} -%{_mandir}/man1/gccgo.1* -%{_mandir}/man1/go.1* -%{_mandir}/man1/gofmt.1* +%ghost %{_prefix}/bin/go%{binsuffix} +%{_prefix}/bin/go.gcc%{binsuffix} +%ghost %{_prefix}/bin/gofmt%{binsuffix} +%{_prefix}/bin/gofmt.gcc%{binsuffix} +%{_mandir}/man1/gccgo%{binsuffix}.1* +%{_mandir}/man1/go%{binsuffix}.1* +%{_mandir}/man1/gofmt%{binsuffix}.1* %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2031,11 +2058,12 @@ end %endif %doc rpm.doc/go/* -%files -n libgo +%files -n libgo%{pkgsuffix} +%{_prefix}/%{_lib}/libgo.so %attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.22* %doc rpm.doc/libgo/* -%files -n libgo-devel +%files -n libgo%{pkgsuffix}-devel %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} @@ -2055,7 +2083,7 @@ end %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version}/libgo.so %endif -%files -n libgo-static +%files -n libgo%{pkgsuffix}-static %dir %{_prefix}/%{_lib}/gcc %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform} %dir %{_prefix}/%{_lib}/gcc/%{gcc_target_platform}/%{gcc_version} From c955ea9b9ef50ae8e8a81bfc3cb4d0141668dbe1 Mon Sep 17 00:00:00 2001 From: Matti Viljanen Date: Thu, 19 Dec 2024 08:12:22 +0200 Subject: [PATCH 8/8] fixup! Change (base) name to gcc13, use --program-suffix --- rpm/cross-aarch64-gcc13.spec | 2 +- rpm/cross-armv7hl-gcc13.spec | 2 +- rpm/cross-i486-gcc13.spec | 2 +- rpm/cross-x86_64-gcc13.spec | 2 +- rpm/gcc13.spec | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rpm/cross-aarch64-gcc13.spec b/rpm/cross-aarch64-gcc13.spec index a4171a8..00bd9d0 100644 --- a/rpm/cross-aarch64-gcc13.spec +++ b/rpm/cross-aarch64-gcc13.spec @@ -174,7 +174,7 @@ License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2 URL: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads Source0: %{name}-%{version}.tar.xz Source1: isl-0.24.tar.bz2 -Source3: gcc-rpmlintrc +Source3: gcc13-rpmlintrc Source4: baselibs.conf Source5: precheckin.sh Source6: aaa_README.PACKAGER diff --git a/rpm/cross-armv7hl-gcc13.spec b/rpm/cross-armv7hl-gcc13.spec index 7321e88..5adb194 100644 --- a/rpm/cross-armv7hl-gcc13.spec +++ b/rpm/cross-armv7hl-gcc13.spec @@ -174,7 +174,7 @@ License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2 URL: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads Source0: %{name}-%{version}.tar.xz Source1: isl-0.24.tar.bz2 -Source3: gcc-rpmlintrc +Source3: gcc13-rpmlintrc Source4: baselibs.conf Source5: precheckin.sh Source6: aaa_README.PACKAGER diff --git a/rpm/cross-i486-gcc13.spec b/rpm/cross-i486-gcc13.spec index f546525..ac34028 100644 --- a/rpm/cross-i486-gcc13.spec +++ b/rpm/cross-i486-gcc13.spec @@ -174,7 +174,7 @@ License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2 URL: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads Source0: %{name}-%{version}.tar.xz Source1: isl-0.24.tar.bz2 -Source3: gcc-rpmlintrc +Source3: gcc13-rpmlintrc Source4: baselibs.conf Source5: precheckin.sh Source6: aaa_README.PACKAGER diff --git a/rpm/cross-x86_64-gcc13.spec b/rpm/cross-x86_64-gcc13.spec index ee79522..6b85dcf 100644 --- a/rpm/cross-x86_64-gcc13.spec +++ b/rpm/cross-x86_64-gcc13.spec @@ -174,7 +174,7 @@ License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2 URL: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads Source0: %{name}-%{version}.tar.xz Source1: isl-0.24.tar.bz2 -Source3: gcc-rpmlintrc +Source3: gcc13-rpmlintrc Source4: baselibs.conf Source5: precheckin.sh Source6: aaa_README.PACKAGER diff --git a/rpm/gcc13.spec b/rpm/gcc13.spec index bca1100..99b7320 100755 --- a/rpm/gcc13.spec +++ b/rpm/gcc13.spec @@ -173,7 +173,7 @@ License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2 URL: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads Source0: %{name}-%{version}.tar.xz Source1: isl-0.24.tar.bz2 -Source3: gcc-rpmlintrc +Source3: gcc13-rpmlintrc Source4: baselibs.conf Source5: precheckin.sh Source6: aaa_README.PACKAGER