]>
Commit | Line | Data |
---|---|---|
fb214454 PS |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with bootstrap # bootstrap build (only pure C compiler w/o startfiles) | |
4 | # | |
5 | Summary: Cross Mingw64 GNU binary utility development utilities - gcc | |
6 | Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - Mingw64 gcc | |
7 | Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - Mingw64 gcc | |
8 | Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla Mingw64 - gcc | |
9 | Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - Mingw64 gcc | |
10 | Summary(tr.UTF-8): GNU geliştirme araçları - Mingw64 gcc | |
11 | Name: crossmingw64-gcc | |
12 | Version: 4.3.1 | |
13 | Release: 0.1 | |
14 | Epoch: 1 | |
15 | License: GPL v3+ | |
16 | Group: Development/Languages | |
17 | Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2 | |
18 | # Source0-md5: 4afa0290cc3a41ac8822666f1110de98 | |
19 | Source1: http://dl.sourceforge.net/mingw-w64/mingw-w64-snapshot-20080424.tar.bz2 | |
20 | # Source1-md5: e2eea49233efd0be3a40fc774abeb1a2 | |
21 | Patch0: %{name}-no_include64.patch | |
22 | BuildRequires: autoconf | |
23 | BuildRequires: automake | |
24 | BuildRequires: bison | |
25 | BuildRequires: crossmingw64-binutils | |
26 | BuildRequires: flex | |
27 | BuildRequires: mpfr-devel | |
28 | BuildRequires: texinfo >= 4.2 | |
29 | Requires: crossmingw64-binutils | |
fb214454 PS |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %define target x86_64-mingw32 | |
33 | %define arch %{_prefix}/%{target} | |
34 | %define gccarch %{_libdir}/gcc/%{target} | |
35 | %define gcclib %{gccarch}/%{version} | |
36 | ||
37 | %define _noautostrip .*/lib.*\\.a | |
38 | ||
39 | %description | |
40 | crossmingw64 is a complete cross-compiling development system for | |
41 | building stand-alone Microsoft Windows applications under Linux using | |
42 | the Mingw64 build libraries. This includes a binutils, gcc with g++ | |
43 | and libstdc++, all cross targeted to x86_64-mingw32. | |
44 | ||
45 | This package contains cross targeted gcc. | |
46 | ||
47 | %package c++ | |
48 | Summary: Mingw64 binary utility development utilities - g++ | |
49 | Summary(pl.UTF-8): Zestaw narzędzi mingw64 - g++ | |
50 | Group: Development/Languages | |
51 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
52 | ||
53 | %description c++ | |
54 | crossmingw64 is a complete cross-compiling development system for | |
55 | building stand-alone Microsoft Windows applications under Linux using | |
56 | the Mingw64 build libraries. This includes a binutils, gcc with g++ | |
57 | and libstdc++, all cross targeted to x86_64-mingw32. | |
58 | ||
59 | This package contains cross targeted g++ and (static) libstdc++. | |
60 | ||
61 | %prep | |
62 | %setup -q -n gcc-%{version} | |
63 | %patch0 -p1 | |
64 | mkdir winsup | |
65 | tar -xjf %{SOURCE1} -C winsup | |
66 | ln -s mingw-w64-headers winsup/trunk/mingw | |
67 | ||
68 | %build | |
69 | build_sysroot=`pwd`/winsup/trunk | |
70 | ||
71 | rm -rf BUILDDIR && install -d BUILDDIR && cd BUILDDIR | |
72 | ||
73 | CFLAGS="%{rpmcflags}" \ | |
74 | CXXFLAGS="%{rpmcflags}" \ | |
75 | LDFLAGS="%{rpmldflags}" \ | |
76 | TEXCONFIG=false \ | |
77 | ../configure \ | |
78 | --prefix=%{_prefix} \ | |
79 | --infodir=%{_infodir} \ | |
80 | --mandir=%{_mandir} \ | |
81 | --bindir=%{arch}/bin \ | |
82 | --libdir=%{_libdir} \ | |
83 | --libexecdir=%{_libexecdir} \ | |
84 | --includedir=%{arch}/include \ | |
85 | --with-sysroot=%{arch} \ | |
86 | --with-build-sysroot=$build_sysroot \ | |
87 | --disable-shared \ | |
88 | --enable-threads=win32 \ | |
2fa5f249 | 89 | --disable-sjlj-exceptions \ |
fb214454 PS |
90 | --enable-languages="c%{!?with_bootstrap:,c++}" \ |
91 | --enable-c99 \ | |
92 | --enable-long-long \ | |
93 | --enable-cmath \ | |
94 | --disable-nls \ | |
95 | --with-gnu-as \ | |
96 | --with-gnu-ld \ | |
97 | --with-mangler-in-ld \ | |
98 | --with-gxx-include-dir=%{arch}/include/c++/%{version} \ | |
99 | --disable-libstdcxx-pch \ | |
100 | --enable-__cxa_atexit \ | |
101 | --disable-libmudflap \ | |
102 | --disable-libssp \ | |
2fa5f249 PS |
103 | --with-pkgversion="PLD-Linux" \ |
104 | --with-bugurl="http://bugs.pld-linux.org" \ | |
fb214454 PS |
105 | --target=%{target} |
106 | ||
107 | %{__make} all | |
108 | ||
109 | %install | |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}} | |
112 | ||
113 | cd BUILDDIR | |
114 | ||
115 | %{__make} install \ | |
116 | DESTDIR=$RPM_BUILD_ROOT | |
117 | ||
118 | install gcc/specs $RPM_BUILD_ROOT%{gcclib} | |
119 | ||
120 | cd .. | |
121 | ||
2fa5f249 PS |
122 | mv $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir} |
123 | #rm $RPM_BUILD_ROOT%{_libdir}/libiberty.a | |
fb214454 PS |
124 | |
125 | gccdir=$RPM_BUILD_ROOT%{gcclib} | |
126 | mv $gccdir/include-fixed/{limits,syslimits}.h $gccdir/include | |
127 | rm -r $gccdir/include-fixed | |
128 | rm -r $gccdir/install-tools | |
129 | ||
130 | %if 0%{!?debug:1} | |
131 | %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a | |
132 | %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a | |
133 | %endif | |
134 | ||
fb214454 PS |
135 | %clean |
136 | rm -rf $RPM_BUILD_ROOT | |
137 | ||
138 | %files | |
139 | %defattr(644,root,root,755) | |
140 | %attr(755,root,root) %{_bindir}/%{target}-gcc* | |
141 | %attr(755,root,root) %{_bindir}/%{target}-cpp | |
142 | %attr(755,root,root) %{_bindir}/%{target}-gcov | |
143 | %attr(755,root,root) %{arch}/bin/gcc | |
fb214454 PS |
144 | %dir %{gccarch} |
145 | %dir %{gcclib} | |
2fa5f249 PS |
146 | %dir %{gcclib}/include |
147 | %{gcclib}/include/ammintrin.h | |
148 | %{gcclib}/include/bmmintrin.h | |
149 | %{gcclib}/include/cpuid.h | |
150 | %{gcclib}/include/emmintrin.h | |
151 | %{gcclib}/include/float.h | |
152 | %{gcclib}/include/iso646.h | |
153 | %{gcclib}/include/limits.h | |
154 | %{gcclib}/include/mm3dnow.h | |
155 | %{gcclib}/include/mm_malloc.h | |
156 | %{gcclib}/include/mmintrin-common.h | |
157 | %{gcclib}/include/mmintrin.h | |
158 | %{gcclib}/include/nmmintrin.h | |
159 | %{gcclib}/include/pmmintrin.h | |
160 | %{gcclib}/include/smmintrin.h | |
161 | %{gcclib}/include/stdarg.h | |
162 | %{gcclib}/include/stdbool.h | |
163 | %{gcclib}/include/stddef.h | |
164 | %{gcclib}/include/stdfix.h | |
165 | %{gcclib}/include/syslimits.h | |
166 | %{gcclib}/include/tgmath.h | |
167 | %{gcclib}/include/tmmintrin.h | |
168 | %{gcclib}/include/unwind.h | |
169 | %{gcclib}/include/varargs.h | |
170 | %{gcclib}/include/xmmintrin.h | |
fb214454 PS |
171 | %attr(755,root,root) %{gcclib}/cc1 |
172 | %attr(755,root,root) %{gcclib}/collect2 | |
173 | %{gcclib}/libgcc.a | |
174 | %{gcclib}/libgcov.a | |
175 | %{gcclib}/specs* | |
fb214454 PS |
176 | %{_mandir}/man1/%{target}-cpp.1* |
177 | %{_mandir}/man1/%{target}-gcc.1* | |
178 | %{_mandir}/man1/%{target}-gcov.1* | |
179 | ||
180 | %if 0 | |
181 | %files c++ | |
182 | %defattr(644,root,root,755) | |
183 | %attr(755,root,root) %{_bindir}/%{target}-[cg]++ | |
184 | %attr(755,root,root) %{arch}/bin/[cg]++ | |
185 | %attr(755,root,root) %{gcclib}/cc1plus | |
186 | %{arch}/lib/libstdc++.a | |
187 | %{arch}/lib/libstdc++.la | |
188 | %{arch}/lib/libsupc++.a | |
189 | %{arch}/lib/libsupc++.la | |
190 | %{arch}/include/g++ | |
191 | %{_mandir}/man1/%{target}-g++.1* | |
192 | %endif |