summaryrefslogtreecommitdiffstats
path: root/contrib/crossrpms/gcc/prep.add
blob: 93817c53482f2c40f27b7060c22b4958cc661536 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
%prep
%setup -c -T -n %{name}-%{version}

%setup -q -T -D -n %{name}-%{version} -a0
%{?PATCH0:%patch0 -p0}

%if %build_cxx
%setup -q -T -D -n %{name}-%{version} -a1
%{?PATCH1:%patch1 -p0}
%endif

%if %build_f95
%setup -q -T -D -n %{name}-%{version} -a2
%{?PATCH2:%patch2 -p0}
%endif

%if %build_gcj
%setup -q -T -D -n %{name}-%{version} -a3
%{?PATCH3:%patch3 -p0}
%endif

%if %build_gnat
%setup -q -T -D -n %{name}-%{version} -a4
%{?PATCH4:%patch4 -p0}
%endif

%if %build_objc
%setup -T -D -n %{name}-%{version} -a5
%{?PATCH5:%patch5 -p0}
%endif

%if %build_newlib
%setup -q -T -D -n %{name}-%{version} -a50
cd newlib-%{newlib_version}
%{?PATCH50:%patch50 -p1}
cd ..
  # Copy the C library into gcc's source tree
  ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
%endif

@PREP@

  # Fix timestamps
  cd gcc-%{gcc_pkgvers}
  contrib/gcc_update --touch
  cd ..