]>
Commit | Line | Data |
---|---|---|
fb214454 PS |
1 | # |
2 | # Conditional build: | |
620b7a54 | 3 | %bcond_with bootstrap # bootstrap build (only C compiler with static runtime) |
fb214454 PS |
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 | |
2b495347 | 12 | Version: 4.6.0 |
3ac90df6 | 13 | Release: 1 |
fb214454 PS |
14 | Epoch: 1 |
15 | License: GPL v3+ | |
16 | Group: Development/Languages | |
e3e90931 | 17 | Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2 |
2b495347 | 18 | # Source0-md5: 93d1c436bf991564524701259b6285a2 |
e3e90931 | 19 | # svn co https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/branches/releases/v1.0/mingw-w64-crt mingw64-crt |
2b495347 PS |
20 | %define _rev 4121 |
21 | Source1: mingw64-crt.tar.xz | |
22 | # Source1-md5: 761c887436a8f362b77f5a00f40335b5 | |
e3e90931 PS |
23 | Patch0: gcc-branch.diff |
24 | Patch1: gcc-mingw-dirs.patch | |
fb214454 PS |
25 | BuildRequires: autoconf |
26 | BuildRequires: automake | |
27 | BuildRequires: bison | |
28 | BuildRequires: crossmingw64-binutils | |
620b7a54 | 29 | %{!?with_bootstrap:BuildRequires: crossmingw64-gcc} |
e3e90931 | 30 | BuildRequires: crossmingw64-headers |
fb214454 | 31 | BuildRequires: flex |
e3e90931 PS |
32 | BuildRequires: gmp-devel >= 4.1 |
33 | BuildRequires: libmpc-devel | |
34 | BuildRequires: mpfr-devel >= 2.3.0 | |
0e008fec | 35 | BuildRequires: subversion |
fb214454 PS |
36 | BuildRequires: texinfo >= 4.2 |
37 | Requires: crossmingw64-binutils | |
e3e90931 | 38 | Requires: crossmingw64-headers |
fb214454 PS |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
e3e90931 | 41 | %define target x86_64-pc-mingw32 |
fb214454 PS |
42 | %define arch %{_prefix}/%{target} |
43 | %define gccarch %{_libdir}/gcc/%{target} | |
44 | %define gcclib %{gccarch}/%{version} | |
45 | ||
46 | %define _noautostrip .*/lib.*\\.a | |
47 | ||
073e0415 PS |
48 | # workaround bootstrap bug: http://gcc.gnu.org/bugzilla/PR25672 |
49 | %define filterout -march=i486 -march=i686 -mtune=pentium4 | |
50 | ||
fb214454 PS |
51 | %description |
52 | crossmingw64 is a complete cross-compiling development system for | |
53 | building stand-alone Microsoft Windows applications under Linux using | |
54 | the Mingw64 build libraries. This includes a binutils, gcc with g++ | |
e3e90931 | 55 | and libstdc++, all cross targeted to x86_64-pc-mingw32. |
fb214454 PS |
56 | |
57 | This package contains cross targeted gcc. | |
58 | ||
59 | %package c++ | |
60 | Summary: Mingw64 binary utility development utilities - g++ | |
61 | Summary(pl.UTF-8): Zestaw narzędzi mingw64 - g++ | |
62 | Group: Development/Languages | |
63 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
64 | ||
65 | %description c++ | |
66 | crossmingw64 is a complete cross-compiling development system for | |
67 | building stand-alone Microsoft Windows applications under Linux using | |
68 | the Mingw64 build libraries. This includes a binutils, gcc with g++ | |
e3e90931 | 69 | and libstdc++, all cross targeted to x86_64-pc-mingw32. |
fb214454 | 70 | |
e3e90931 | 71 | This package contains cross targeted g++ and libstdc++. |
fb214454 PS |
72 | |
73 | %prep | |
e3e90931 PS |
74 | %setup -q -n gcc-%{version} -a 1 |
75 | %patch0 -p0 | |
76 | %patch1 -p1 | |
77 | ||
78 | # override snapshot version. | |
79 | echo %{version} > gcc/BASE-VER | |
80 | echo "release" > gcc/DEV-PHASE | |
81 | ||
82 | if [ "`svnversion -n mingw64-crt`" != "%{_rev}" ]; then | |
83 | exit 1 | |
84 | fi | |
fb214454 PS |
85 | |
86 | %build | |
e3e90931 | 87 | rm -rf BUILDDIR && install -d BUILDDIR/%{target} && cd BUILDDIR |
fb214454 | 88 | |
e3e90931 PS |
89 | # setup system headers for local build. |
90 | cp -ar %{arch}/include %{target}/include | |
fb214454 PS |
91 | |
92 | CFLAGS="%{rpmcflags}" \ | |
93 | CXXFLAGS="%{rpmcflags}" \ | |
94 | LDFLAGS="%{rpmldflags}" \ | |
95 | TEXCONFIG=false \ | |
96 | ../configure \ | |
e3e90931 | 97 | --enable-checking=release \ |
fb214454 PS |
98 | --prefix=%{_prefix} \ |
99 | --infodir=%{_infodir} \ | |
100 | --mandir=%{_mandir} \ | |
fb214454 PS |
101 | --libdir=%{_libdir} \ |
102 | --libexecdir=%{_libexecdir} \ | |
103 | --includedir=%{arch}/include \ | |
620b7a54 PS |
104 | --with-gnu-as \ |
105 | --with-gnu-ld \ | |
fb214454 | 106 | --with-sysroot=%{arch} \ |
620b7a54 | 107 | --%{?with_bootstrap:dis}%{!?with_bootstrap:en}able-shared \ |
e3e90931 | 108 | --disable-win32-registry \ |
fb214454 | 109 | --enable-threads=win32 \ |
e3e90931 | 110 | --enable-tls \ |
6252559d | 111 | --enable-sjlj-exceptions \ |
fb214454 | 112 | --enable-languages="c%{!?with_bootstrap:,c++}" \ |
e3e90931 PS |
113 | --disable-multilib \ |
114 | --disable-nls \ | |
115 | --disable-libmudflap \ | |
2b495347 | 116 | --disable-libquadmath \ |
e3e90931 PS |
117 | --disable-libssp \ |
118 | --disable-plugin \ | |
119 | --disable-lto \ | |
fb214454 PS |
120 | --enable-c99 \ |
121 | --enable-long-long \ | |
620b7a54 | 122 | --enable-decimal-float=yes \ |
fb214454 | 123 | --enable-cmath \ |
fb214454 PS |
124 | --with-mangler-in-ld \ |
125 | --with-gxx-include-dir=%{arch}/include/c++/%{version} \ | |
e3e90931 PS |
126 | --enable-fully-dynamic-string \ |
127 | --enable-libstdcxx-allocator=new \ | |
fb214454 PS |
128 | --disable-libstdcxx-pch \ |
129 | --enable-__cxa_atexit \ | |
2fa5f249 PS |
130 | --with-pkgversion="PLD-Linux" \ |
131 | --with-bugurl="http://bugs.pld-linux.org" \ | |
3b61ff9a PS |
132 | --build=%{_target_platform} \ |
133 | --host=%{_target_platform} \ | |
fb214454 PS |
134 | --target=%{target} |
135 | ||
e3e90931 | 136 | %{__make} -j4 |
423846e1 PS |
137 | cd .. |
138 | ||
e3e90931 | 139 | cd mingw64-crt |
e3e90931 | 140 | CC="$PWD/../BUILDDIR/gcc/gcc-cross -B$PWD/../BUILDDIR/gcc/" \ |
423846e1 PS |
141 | ./configure \ |
142 | --host=%{target} \ | |
143 | --prefix=%{_prefix} \ | |
e3e90931 | 144 | --disable-lib32 --enable-lib64 |
423846e1 PS |
145 | |
146 | %{__make} | |
e3e90931 | 147 | cd .. |
fb214454 PS |
148 | |
149 | %install | |
150 | rm -rf $RPM_BUILD_ROOT | |
e3e90931 | 151 | install -d $RPM_BUILD_ROOT |
fb214454 PS |
152 | |
153 | cd BUILDDIR | |
7fc88b33 | 154 | %{__make} install \ |
fb214454 PS |
155 | DESTDIR=$RPM_BUILD_ROOT |
156 | ||
157 | install gcc/specs $RPM_BUILD_ROOT%{gcclib} | |
08ae3d8f | 158 | |
fb214454 PS |
159 | cd .. |
160 | ||
fb214454 PS |
161 | gccdir=$RPM_BUILD_ROOT%{gcclib} |
162 | mv $gccdir/include-fixed/{limits,syslimits}.h $gccdir/include | |
163 | rm -r $gccdir/include-fixed | |
164 | rm -r $gccdir/install-tools | |
165 | ||
e3e90931 | 166 | %{__make} -C mingw64-crt install \ |
423846e1 PS |
167 | DESTDIR=$RPM_BUILD_ROOT |
168 | ||
fb214454 PS |
169 | %if 0%{!?debug:1} |
170 | %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a | |
171 | %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a | |
763b9ff5 PS |
172 | find $RPM_BUILD_ROOT%{arch}/lib -type f -name '*.a' -o -name '*.o' \ |
173 | -exec %{target}-strip -g -R.note -R.comment "{}" ";" | |
fb214454 PS |
174 | %endif |
175 | ||
fb214454 PS |
176 | %clean |
177 | rm -rf $RPM_BUILD_ROOT | |
178 | ||
179 | %files | |
180 | %defattr(644,root,root,755) | |
181 | %attr(755,root,root) %{_bindir}/%{target}-gcc* | |
182 | %attr(755,root,root) %{_bindir}/%{target}-cpp | |
183 | %attr(755,root,root) %{_bindir}/%{target}-gcov | |
fb214454 PS |
184 | %dir %{gccarch} |
185 | %dir %{gcclib} | |
2fa5f249 | 186 | %dir %{gcclib}/include |
e3e90931 | 187 | %{gcclib}/include/abmintrin.h |
2fa5f249 | 188 | %{gcclib}/include/ammintrin.h |
620b7a54 | 189 | %{gcclib}/include/avxintrin.h |
2b495347 | 190 | %{gcclib}/include/bmiintrin.h |
2fa5f249 PS |
191 | %{gcclib}/include/bmmintrin.h |
192 | %{gcclib}/include/cpuid.h | |
620b7a54 | 193 | %{gcclib}/include/cross-stdarg.h |
2fa5f249 PS |
194 | %{gcclib}/include/emmintrin.h |
195 | %{gcclib}/include/float.h | |
e3e90931 PS |
196 | %{gcclib}/include/fma4intrin.h |
197 | %{gcclib}/include/ia32intrin.h | |
620b7a54 | 198 | %{gcclib}/include/immintrin.h |
2fa5f249 PS |
199 | %{gcclib}/include/iso646.h |
200 | %{gcclib}/include/limits.h | |
e3e90931 | 201 | %{gcclib}/include/lwpintrin.h |
2fa5f249 PS |
202 | %{gcclib}/include/mm3dnow.h |
203 | %{gcclib}/include/mm_malloc.h | |
2fa5f249 PS |
204 | %{gcclib}/include/mmintrin.h |
205 | %{gcclib}/include/nmmintrin.h | |
206 | %{gcclib}/include/pmmintrin.h | |
e3e90931 | 207 | %{gcclib}/include/popcntintrin.h |
2fa5f249 | 208 | %{gcclib}/include/smmintrin.h |
2b495347 | 209 | %{gcclib}/include/tbmintrin.h |
2fa5f249 PS |
210 | %{gcclib}/include/stdarg.h |
211 | %{gcclib}/include/stdbool.h | |
212 | %{gcclib}/include/stddef.h | |
213 | %{gcclib}/include/stdfix.h | |
e3e90931 PS |
214 | %{gcclib}/include/stdint-gcc.h |
215 | %{gcclib}/include/stdint.h | |
2fa5f249 PS |
216 | %{gcclib}/include/syslimits.h |
217 | %{gcclib}/include/tgmath.h | |
218 | %{gcclib}/include/tmmintrin.h | |
219 | %{gcclib}/include/unwind.h | |
220 | %{gcclib}/include/varargs.h | |
620b7a54 PS |
221 | %{gcclib}/include/wmmintrin.h |
222 | %{gcclib}/include/x86intrin.h | |
2fa5f249 | 223 | %{gcclib}/include/xmmintrin.h |
e3e90931 | 224 | %{gcclib}/include/xopintrin.h |
fb214454 PS |
225 | %attr(755,root,root) %{gcclib}/cc1 |
226 | %attr(755,root,root) %{gcclib}/collect2 | |
e3e90931 | 227 | %attr(755,root,root) %{gcclib}/lto-wrapper |
620b7a54 | 228 | %{gcclib}/*.o |
fb214454 | 229 | %{gcclib}/libgcc.a |
620b7a54 | 230 | %if %{without bootstrap} |
3ac90df6 | 231 | %{arch}/lib/libgcc_s_sjlj-1.dll |
620b7a54 PS |
232 | %{gcclib}/libgcc_eh.a |
233 | %endif | |
fb214454 PS |
234 | %{gcclib}/libgcov.a |
235 | %{gcclib}/specs* | |
fb214454 PS |
236 | %{_mandir}/man1/%{target}-cpp.1* |
237 | %{_mandir}/man1/%{target}-gcc.1* | |
238 | %{_mandir}/man1/%{target}-gcov.1* | |
423846e1 | 239 | %{arch}/lib/*.a |
7fc88b33 PS |
240 | %if %{without bootstrap} |
241 | %exclude %{arch}/include/c++ | |
242 | %exclude %{arch}/lib/libstdc++.a | |
243 | %exclude %{arch}/lib/libsupc++.a | |
244 | %endif | |
423846e1 | 245 | %{arch}/lib/*.o |
fb214454 | 246 | |
7fc88b33 | 247 | %if %{without bootstrap} |
fb214454 PS |
248 | %files c++ |
249 | %defattr(644,root,root,755) | |
250 | %attr(755,root,root) %{_bindir}/%{target}-[cg]++ | |
fb214454 | 251 | %attr(755,root,root) %{gcclib}/cc1plus |
3ac90df6 | 252 | %{arch}/lib/libstdc++-6.dll |
fb214454 PS |
253 | %{arch}/lib/libstdc++.a |
254 | %{arch}/lib/libstdc++.la | |
255 | %{arch}/lib/libsupc++.a | |
256 | %{arch}/lib/libsupc++.la | |
7fc88b33 | 257 | %{arch}/include/c++ |
fb214454 PS |
258 | %{_mandir}/man1/%{target}-g++.1* |
259 | %endif |