Merge back in the multi-patch support to the gcc common configuration.

This commit is contained in:
Chris Johns 2013-04-02 10:17:57 +11:00
parent ec11cecf1b
commit 2b069dc82a

View File

@ -32,23 +32,37 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
# Prepare the source code.
#
%prep
# gcc core
# gcc and optional the g++ core if separate packages
%setup -q -c -n %{name}-%{version}
cd gcc-%{gcc_version}
%{?patch0:%patch0 -p1}
cd ..
# g++
%{?source1:%setup -q -D -T -n %{name}-%{version} -a1}
cd gcc-%{gcc_version}
%{?patch1:%patch1 -p1}
%{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
%{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
%{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
%{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
%{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
%{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
%{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
%{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
%{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
%{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
cd ..
# newlib
%setup -q -D -T -n %{name}-%{version} -a10
cd newlib-%{newlib_version}
%{?patch10:%patch10 -p1}
%{?patch10:%patch10 %{?patch10_opts:%{patch10_opts}}%{!?patch10_opts:-p1}}
%{?patch11:%patch11 %{?patch11_opts:%{patch11_opts}}%{!?patch11_opts:-p1}}
%{?patch12:%patch12 %{?patch12_opts:%{patch12_opts}}%{!?patch12_opts:-p1}}
%{?patch13:%patch13 %{?patch13_opts:%{patch13_opts}}%{!?patch13_opts:-p1}}
%{?patch14:%patch14 %{?patch14_opts:%{patch14_opts}}%{!?patch14_opts:-p1}}
%{?patch15:%patch15 %{?patch15_opts:%{patch15_opts}}%{!?patch15_opts:-p1}}
%{?patch16:%patch16 %{?patch16_opts:%{patch16_opts}}%{!?patch16_opts:-p1}}
%{?patch17:%patch17 %{?patch17_opts:%{patch17_opts}}%{!?patch17_opts:-p1}}
%{?patch18:%patch18 %{?patch18_opts:%{patch18_opts}}%{!?patch18_opts:-p1}}
%{?patch19:%patch19 %{?patch19_opts:%{patch19_opts}}%{!?patch19_opts:-p1}}
cd ..
# Link newlib into the gcc source tree
ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_version}