]> git.pld-linux.org Git - packages/crossmingw64-gcc.git/blob - crossmingw64-gcc.spec
- disable red zone for w64 abi.
[packages/crossmingw64-gcc.git] / crossmingw64-gcc.spec
1 #
2 # Conditional build:
3 %bcond_with     bootstrap       # bootstrap build (only C compiler)
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 Patch1:         %{name}-no_red_zone.patch
23 BuildRequires:  autoconf
24 BuildRequires:  automake
25 BuildRequires:  bison
26 BuildRequires:  crossmingw64-binutils
27 BuildRequires:  flex
28 BuildRequires:  mpfr-devel
29 BuildRequires:  texinfo >= 4.2
30 Requires:       crossmingw64-binutils
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %define         target          x86_64-mingw32
34 %define         arch            %{_prefix}/%{target}
35 %define         gccarch         %{_libdir}/gcc/%{target}
36 %define         gcclib          %{gccarch}/%{version}
37
38 %define         _noautostrip    .*/lib.*\\.a
39
40 %description
41 crossmingw64 is a complete cross-compiling development system for
42 building stand-alone Microsoft Windows applications under Linux using
43 the Mingw64 build libraries. This includes a binutils, gcc with g++
44 and libstdc++, all cross targeted to x86_64-mingw32.
45
46 This package contains cross targeted gcc.
47
48 %package c++
49 Summary:        Mingw64 binary utility development utilities - g++
50 Summary(pl.UTF-8):      Zestaw narzędzi mingw64 - g++
51 Group:          Development/Languages
52 Requires:       %{name} = %{epoch}:%{version}-%{release}
53
54 %description c++
55 crossmingw64 is a complete cross-compiling development system for
56 building stand-alone Microsoft Windows applications under Linux using
57 the Mingw64 build libraries. This includes a binutils, gcc with g++
58 and libstdc++, all cross targeted to x86_64-mingw32.
59
60 This package contains cross targeted g++ and (static) libstdc++.
61
62 %prep
63 %setup -q -n gcc-%{version} -a 1
64 %patch0 -p1
65 %patch1 -p1
66 mkdir -p winsup/mingw
67 cp -ar trunk/mingw-w64-headers/include winsup/mingw
68
69 %build
70 build_sysroot=`pwd`/winsup
71
72 rm -rf BUILDDIR && install -d BUILDDIR && cd BUILDDIR
73
74 CFLAGS="%{rpmcflags}" \
75 CXXFLAGS="%{rpmcflags}" \
76 LDFLAGS="%{rpmldflags}" \
77 TEXCONFIG=false \
78 ../configure \
79         --prefix=%{_prefix} \
80         --infodir=%{_infodir} \
81         --mandir=%{_mandir} \
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 \
89         --disable-sjlj-exceptions \
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 \
103         --with-pkgversion="PLD-Linux" \
104         --with-bugurl="http://bugs.pld-linux.org" \
105         --build=%{_target_platform} \
106         --host=%{_target_platform} \
107         --target=%{target}
108
109 %{__make}
110
111 cd ..
112
113 cat <<EOF >cross-gcc
114 #!/bin/sh
115 p=`pwd`/BUILDDIR/gcc
116 \${p}/xgcc -B\${p} \$@
117 EOF
118 chmod 755 cross-gcc
119
120 export CC=`pwd`/cross-gcc
121
122 cd trunk/mingw-w64-crt
123
124 ./configure \
125         --host=%{target} \
126         --prefix=%{_prefix} \
127         --with-sysroot=$build_sysroot \
128
129 %{__make}
130
131 cd -
132
133 %install
134 build_sysroot=`pwd`/winsup
135
136 rm -rf $RPM_BUILD_ROOT
137 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir},%{arch}/lib,%{arch}/mingw/include}
138
139 cd BUILDDIR
140
141 %{__make} install \
142         DESTDIR=$RPM_BUILD_ROOT
143
144 install gcc/specs $RPM_BUILD_ROOT%{gcclib}
145
146 cd ..
147
148 gccdir=$RPM_BUILD_ROOT%{gcclib}
149 mv $gccdir/include-fixed/{limits,syslimits}.h $gccdir/include
150 rm -r $gccdir/include-fixed
151 rm -r $gccdir/install-tools
152
153
154 cp -ar $build_sysroot/mingw/include $RPM_BUILD_ROOT%{arch}
155
156 make -C trunk/mingw-w64-crt install \
157         DESTDIR=$RPM_BUILD_ROOT
158
159 mv $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/lib/* \
160         $RPM_BUILD_ROOT%{arch}/lib
161
162 %if 0%{!?debug:1}
163 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
164 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
165 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{arch}/lib/*.{a,o}
166 %endif
167
168 %clean
169 rm -rf $RPM_BUILD_ROOT
170
171 %files
172 %defattr(644,root,root,755)
173 %attr(755,root,root) %{_bindir}/%{target}-gcc*
174 %attr(755,root,root) %{_bindir}/%{target}-cpp
175 %attr(755,root,root) %{_bindir}/%{target}-gcov
176 %dir %{gccarch}
177 %dir %{gcclib}
178 %dir %{gcclib}/include
179 %{gcclib}/include/ammintrin.h
180 %{gcclib}/include/bmmintrin.h
181 %{gcclib}/include/cpuid.h
182 %{gcclib}/include/emmintrin.h
183 %{gcclib}/include/float.h
184 %{gcclib}/include/iso646.h
185 %{gcclib}/include/limits.h
186 %{gcclib}/include/mm3dnow.h
187 %{gcclib}/include/mm_malloc.h
188 %{gcclib}/include/mmintrin-common.h
189 %{gcclib}/include/mmintrin.h
190 %{gcclib}/include/nmmintrin.h
191 %{gcclib}/include/pmmintrin.h
192 %{gcclib}/include/smmintrin.h
193 %{gcclib}/include/stdarg.h
194 %{gcclib}/include/stdbool.h
195 %{gcclib}/include/stddef.h
196 %{gcclib}/include/stdfix.h
197 %{gcclib}/include/syslimits.h
198 %{gcclib}/include/tgmath.h
199 %{gcclib}/include/tmmintrin.h
200 %{gcclib}/include/unwind.h
201 %{gcclib}/include/varargs.h
202 %{gcclib}/include/xmmintrin.h
203 %attr(755,root,root) %{gcclib}/cc1
204 %attr(755,root,root) %{gcclib}/collect2
205 %{gcclib}/libgcc.a
206 %{gcclib}/libgcov.a
207 %{gcclib}/specs*
208 %{_mandir}/man1/%{target}-cpp.1*
209 %{_mandir}/man1/%{target}-gcc.1*
210 %{_mandir}/man1/%{target}-gcov.1*
211 %{arch}/include
212 %{arch}/lib/*.a
213 %if %{without bootstrap}
214 %exclude %{arch}/include/c++
215 %exclude %{arch}/lib/libstdc++.a
216 %exclude %{arch}/lib/libsupc++.a
217 %endif
218 %{arch}/lib/*.o
219 %dir %{arch}/mingw
220 %{arch}/mingw/include
221
222 %if %{without bootstrap}
223 %files c++
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
226 %attr(755,root,root) %{gcclib}/cc1plus
227 %{arch}/lib/libstdc++.a
228 %{arch}/lib/libstdc++.la
229 %{arch}/lib/libsupc++.a
230 %{arch}/lib/libsupc++.la
231 %{arch}/include/c++
232 %{_mandir}/man1/%{target}-g++.1*
233 %endif
This page took 0.049695 seconds and 4 git commands to generate.