summaryrefslogtreecommitdiff
path: root/contrib/crossrpms/gcc/prep.add
blob: a3adba1a09cf7fbf90b3ec2cd3d1e3365d687bc1 (plain)
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
47
48
49
50
51
52
53
%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_fortran
%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 -q -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

%if 0%{?_build_mpfr}
%setup -q -T -D -n %{name}-%{version} -a60
%{?PATCH60:%patch60 -p1}
  # Build mpfr one-tree style
  ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
%endif

@PREP@

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