summaryrefslogtreecommitdiffstats
path: root/contrib/crossrpms/gcc/gccnewlib.add
blob: f5f9f97122fe2ed14b2ed066ca9c1c56b8f6f632 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

%define gcc_pkgvers @GCC_PKGVERS@
%define gcc_version @GCC_VERS@
%define gcc_rpmvers %{expand:%(echo "@GCC_VERS@" | tr - _ )}

%if %build_newlib
%define newlib_pkgvers		@NEWLIB_PKGVERS@
%define newlib_version		@NEWLIB_VERS@
%endif

Name:         	@rpmprefix@@tool_target@-gcc
Summary:      	@tool_target@ gcc

Group:	      	Development/Tools
Version:        %{gcc_rpmvers}
Release:      	@GCC_RPMREL@
License:      	GPL
URL:		http://gcc.gnu.org
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%define _use_internal_dependency_generator 0

BuildRequires:  %{_host_rpmprefix}gcc

%if "%{gcc_version}" >= "4.3.0"
%define _gmp_minvers		4.1
%else
%if "%{gcc_version}" >= "4.2.0"
%if %build_fortran
%define _gmp_minvers		4.1
%endif
%endif
%endif

%if %{defined _gmp_minvers}
BuildRequires: gmp-devel >= %{_gmp_minvers}
%if "%{_build}" != "%{_host}"
BuildRequires:  %{_host_rpmprefix}gmp-devel >= %{_gmp_minvers}
%endif
%endif


%if "%{gcc_version}" >= "4.4.0"
%define _mpfr_minvers	2.3.2
%define mpfr_version	2.4.1
%else
%if "%{gcc_version}" >= "4.3.0"
%define _mpfr_minvers	2.3.1
%define mpfr_version	2.3.2
%else
%if "%{gcc_version}" >= "4.2.0"
%if %build_fortran
%define _mpfr_minvers	2.2.1
%define mpfr_version	2.3.2
%endif
%endif
%endif
%endif

%if %{defined _mpfr_minvers}
# FIXME: This is an ugly cludge
%{?fc10:%global mpfr_provided 2.3.2}
%{?fc11:%global mpfr_provided 2.4.1}
%{?suse10_3:%global mpfr_provided 2.2.1}
%{?suse11_0:%global mpfr_provided 2.3.1}
%{?suse11_1:%global mpfr_provided 2.3.2}
%{?cygwin:%global mpfr_provided 2.4.1}
%{?mingw32:%global mpfr_provided %{nil}}

%if %{defined mpfr_provided}
%if "%{mpfr_provided}" < "%{_mpfr_minvers}"
%define _build_mpfr 1
%else
%if "%{_build}" != "%{_host}"
BuildRequires:  %{_host_rpmprefix}mpfr-devel >= %{_mpfr_minvers}
%else
BuildRequires: mpfr-devel >= %{_mpfr_minvers}
%endif
%endif
%else
%define _build_mpfr 1
%endif

%endif

%if "%{_build}" != "%{_host}"
BuildRequires:  @rpmprefix@@tool_target@-gcc = %{gcc_rpmvers}
%endif

%if "%{gcc_version}" >= "4.2.0"
BuildRequires:	flex bison
%endif

%if %build_gcj
# Building gcj requires bison and zlib
BuildRequires:	bison
%endif

BuildRequires:	texinfo >= 4.2
BuildRequires:	@rpmprefix@@tool_target@-binutils
BuildRequires:	@rpmprefix@@tool_target@-sys-root
BuildRequires:	@rpmprefix@@tool_target@-w32api-sys-root

%if %build_infos
Requires:	@rpmprefix@gcc-common
%endif
Requires:	@rpmprefix@@tool_target@-binutils
Requires:	@rpmprefix@@tool_target@-sys-root
Requires:	@rpmprefix@@tool_target@-w32api-sys-root
%if %build_newlib
Requires:	@rpmprefix@@tool_target@-newlib = %{newlib_version}-@NEWLIB_RPMREL@
%endif

%if %build_gcj
BuildRequires:	zlib-devel
%endif
%if %build_gnat
# Building gnat requires gnat
BuildRequires:	gcc-gnat
BuildRequires:	@rpmprefix@@tool_target@-newlib < %{newlib_version}-@NEWLIB_RPMREL@
%endif

%define gcclib %{_libdir}/gcc

@SOURCES@

%if "%{gcc_version}" >= "4.3.0"
Source60:    http://www.mpfr.org/mpfr-current/mpfr-%{mpfr_version}.tar.bz2
%endif

%description
Cross gcc for @tool_target@.