diff --git a/gcc.spec b/gcc.spec index b59ef526eb80197dd36f747f050f3f9987eb713e..7a4681349a93f6f0c56d4564b2cef36f646ca6cb 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,6 +1,6 @@ %global gcc_version 12.3.1.2 %global gcc_major 12 -%global gcc_release 1 +%global gcc_release 2 %global isl_version 0.18 %global tgcc_summary Tencent Compiler %global _unpackaged_files_terminate_build 0 @@ -820,6 +820,16 @@ in the sense that it respects the user's freedom. This package contains annobin plugin for gcc. %endif +%package source +Summary: source code included %{_vendor} patch +BuildRequires: tar, xz +BuildArch: noarch + +%description source +This package provides source code included %{_vendor} patch +for cross toolchains + + %prep %setup -q -n tgcc-%{version} @@ -855,6 +865,9 @@ sed -i -e 's/context->report_bug = false;/context->report_bug = true;/' gcc/diag # This test causes fork failures, because it spawns way too many threads rm -f gcc/testsuite/go.test/test/chan/goroutines.go +# take tarball of source code +tar acvf %{name}-%{version}-%{release}.tar.xz * + %build @@ -1551,6 +1564,10 @@ ln -sf gcc-annobin.so.0.0.0 $FULLPATH/plugin/gcc-annobin.so.0 ln -sf gcc-annobin.so.0.0.0 $FULLPATH/plugin/gcc-annobin.so %endif +# copy source code tarball to installing directory +mkdir -p %{buildroot}%{_usrsrc}/%{name} +cp -f %{name}-%{version}-%{release}.tar.xz %{buildroot}%{_usrsrc}/%{name}/ + %check @@ -2375,7 +2392,15 @@ end %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/gcc-annobin.so.0.0.0 %endif +%files source +%{_usrsrc}/%{name}/%{name}-%{version}-%{release}.tar.xz + + + %changelog +* Mon Jun 24 2024 Zhao Zhen - 12.3.1.2-2 +- provides a new subpackage included patched source for cross toolchains + * Mon Jun 17 2024 Zhao Zhen - 12.3.1.2-1 - fixed error installed directories when disabled multilib in loongarch