]> git.pld-linux.org Git - packages/crossmingw64-gcc.git/blame - crossmingw64-gcc.spec
- obsolete.
[packages/crossmingw64-gcc.git] / crossmingw64-gcc.spec
CommitLineData
fb214454
PS
1#
2# Conditional build:
620b7a54 3%bcond_with bootstrap # bootstrap build (only C compiler with static runtime)
fb214454
PS
4#
5Summary: Cross Mingw64 GNU binary utility development utilities - gcc
6Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - Mingw64 gcc
7Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - Mingw64 gcc
8Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla Mingw64 - gcc
9Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - Mingw64 gcc
10Summary(tr.UTF-8): GNU geliştirme araçları - Mingw64 gcc
11Name: crossmingw64-gcc
620b7a54
PS
12%define _major_ver 4.4
13%define _minor_ver 0
14Version: %{_major_ver}.%{_minor_ver}
5ec0ebfe 15%define _snap 20090206
620b7a54 16Release: 0.%{_snap}.1
fb214454
PS
17Epoch: 1
18License: GPL v3+
19Group: Development/Languages
620b7a54
PS
20#Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
21Source0: ftp://gcc.gnu.org/pub/gcc/snapshots/LATEST-%{_major_ver}/gcc-%{_major_ver}-%{_snap}.tar.bz2
22Source1: http://dl.sourceforge.net/mingw-w64/mingw-w64-snapshot-20081115.tar.bz2
23# Source1-md5: b472282419e6aea64e14763e30d5bb63
24Patch100: gcc-branch.diff.bz2
fb214454
PS
25Patch0: %{name}-no_include64.patch
26BuildRequires: autoconf
27BuildRequires: automake
28BuildRequires: bison
29BuildRequires: crossmingw64-binutils
620b7a54 30%{!?with_bootstrap:BuildRequires: crossmingw64-gcc}
fb214454
PS
31BuildRequires: flex
32BuildRequires: mpfr-devel
33BuildRequires: texinfo >= 4.2
34Requires: crossmingw64-binutils
fb214454
PS
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%define target x86_64-mingw32
38%define arch %{_prefix}/%{target}
39%define gccarch %{_libdir}/gcc/%{target}
40%define gcclib %{gccarch}/%{version}
41
42%define _noautostrip .*/lib.*\\.a
43
44%description
45crossmingw64 is a complete cross-compiling development system for
46building stand-alone Microsoft Windows applications under Linux using
47the Mingw64 build libraries. This includes a binutils, gcc with g++
48and libstdc++, all cross targeted to x86_64-mingw32.
49
50This package contains cross targeted gcc.
51
52%package c++
53Summary: Mingw64 binary utility development utilities - g++
54Summary(pl.UTF-8): Zestaw narzędzi mingw64 - g++
55Group: Development/Languages
56Requires: %{name} = %{epoch}:%{version}-%{release}
57
58%description c++
59crossmingw64 is a complete cross-compiling development system for
60building stand-alone Microsoft Windows applications under Linux using
61the Mingw64 build libraries. This includes a binutils, gcc with g++
62and libstdc++, all cross targeted to x86_64-mingw32.
63
64This package contains cross targeted g++ and (static) libstdc++.
65
66%prep
620b7a54
PS
67#setup -q -n gcc-%{version} -a 1
68%setup -q -n gcc-%{_major_ver}-%{_snap} -a 1
69#patch100 -p0
fb214454 70%patch0 -p1
423846e1
PS
71mkdir -p winsup/mingw
72cp -ar trunk/mingw-w64-headers/include winsup/mingw
fb214454
PS
73
74%build
423846e1 75build_sysroot=`pwd`/winsup
fb214454
PS
76
77rm -rf BUILDDIR && install -d BUILDDIR && cd BUILDDIR
78
79CFLAGS="%{rpmcflags}" \
80CXXFLAGS="%{rpmcflags}" \
81LDFLAGS="%{rpmldflags}" \
82TEXCONFIG=false \
83../configure \
84 --prefix=%{_prefix} \
85 --infodir=%{_infodir} \
86 --mandir=%{_mandir} \
fb214454
PS
87 --libdir=%{_libdir} \
88 --libexecdir=%{_libexecdir} \
89 --includedir=%{arch}/include \
620b7a54
PS
90 --with-gnu-as \
91 --with-gnu-ld \
fb214454 92 --with-sysroot=%{arch} \
620b7a54
PS
93 %{?with_bootstrap:--with-build-sysroot=$build_sysroot} \
94 --%{?with_bootstrap:dis}%{!?with_bootstrap:en}able-shared \
fb214454 95 --enable-threads=win32 \
6252559d 96 --enable-sjlj-exceptions \
fb214454
PS
97 --enable-languages="c%{!?with_bootstrap:,c++}" \
98 --enable-c99 \
99 --enable-long-long \
620b7a54 100 --enable-decimal-float=yes \
fb214454
PS
101 --enable-cmath \
102 --disable-nls \
5ec0ebfe 103 --disable-win32-registry \
fb214454
PS
104 --with-gnu-as \
105 --with-gnu-ld \
106 --with-mangler-in-ld \
107 --with-gxx-include-dir=%{arch}/include/c++/%{version} \
108 --disable-libstdcxx-pch \
5ec0ebfe 109 --disable-symvers \
fb214454
PS
110 --enable-__cxa_atexit \
111 --disable-libmudflap \
112 --disable-libssp \
2fa5f249
PS
113 --with-pkgversion="PLD-Linux" \
114 --with-bugurl="http://bugs.pld-linux.org" \
3b61ff9a
PS
115 --build=%{_target_platform} \
116 --host=%{_target_platform} \
fb214454
PS
117 --target=%{target}
118
8754b0d8 119%{__make}
423846e1
PS
120
121cd ..
122
123cat <<EOF >cross-gcc
124#!/bin/sh
125p=`pwd`/BUILDDIR/gcc
126\${p}/xgcc -B\${p} \$@
127EOF
128chmod 755 cross-gcc
129
620b7a54 130export CC=%{?with_bootstrap:`pwd`/cross-gcc}%{!?with_bootstrap:%{_bindir}/%{target}-gcc}
423846e1
PS
131
132cd trunk/mingw-w64-crt
133
134./configure \
135 --host=%{target} \
136 --prefix=%{_prefix} \
620b7a54 137 --with-sysroot=%{?with_bootstrap:$build_sysroot}%{!?with_bootstrap:%{arch}}
423846e1
PS
138
139%{__make}
140
141cd -
fb214454
PS
142
143%install
423846e1 144build_sysroot=`pwd`/winsup
892ff872 145
fb214454 146rm -rf $RPM_BUILD_ROOT
7fc88b33 147install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir},%{arch}/lib,%{arch}/mingw/include}
fb214454
PS
148
149cd BUILDDIR
150
7fc88b33 151%{__make} install \
fb214454
PS
152 DESTDIR=$RPM_BUILD_ROOT
153
154install gcc/specs $RPM_BUILD_ROOT%{gcclib}
155
156cd ..
157
fb214454
PS
158gccdir=$RPM_BUILD_ROOT%{gcclib}
159mv $gccdir/include-fixed/{limits,syslimits}.h $gccdir/include
160rm -r $gccdir/include-fixed
161rm -r $gccdir/install-tools
162
423846e1
PS
163
164cp -ar $build_sysroot/mingw/include $RPM_BUILD_ROOT%{arch}
165
166make -C trunk/mingw-w64-crt install \
167 DESTDIR=$RPM_BUILD_ROOT
168
763b9ff5
PS
169find $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/lib -type f \
170 -exec mv "{}" "$RPM_BUILD_ROOT%{arch}/lib" ";"
423846e1 171
fb214454
PS
172%if 0%{!?debug:1}
173%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
174%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
763b9ff5
PS
175find $RPM_BUILD_ROOT%{arch}/lib -type f -name '*.a' -o -name '*.o' \
176 -exec %{target}-strip -g -R.note -R.comment "{}" ";"
fb214454
PS
177%endif
178
fb214454
PS
179%clean
180rm -rf $RPM_BUILD_ROOT
181
182%files
183%defattr(644,root,root,755)
184%attr(755,root,root) %{_bindir}/%{target}-gcc*
185%attr(755,root,root) %{_bindir}/%{target}-cpp
186%attr(755,root,root) %{_bindir}/%{target}-gcov
fb214454
PS
187%dir %{gccarch}
188%dir %{gcclib}
2fa5f249
PS
189%dir %{gcclib}/include
190%{gcclib}/include/ammintrin.h
620b7a54 191%{gcclib}/include/avxintrin.h
2fa5f249
PS
192%{gcclib}/include/bmmintrin.h
193%{gcclib}/include/cpuid.h
620b7a54 194%{gcclib}/include/cross-stdarg.h
2fa5f249
PS
195%{gcclib}/include/emmintrin.h
196%{gcclib}/include/float.h
620b7a54 197%{gcclib}/include/immintrin.h
2fa5f249
PS
198%{gcclib}/include/iso646.h
199%{gcclib}/include/limits.h
200%{gcclib}/include/mm3dnow.h
201%{gcclib}/include/mm_malloc.h
202%{gcclib}/include/mmintrin-common.h
203%{gcclib}/include/mmintrin.h
204%{gcclib}/include/nmmintrin.h
205%{gcclib}/include/pmmintrin.h
206%{gcclib}/include/smmintrin.h
207%{gcclib}/include/stdarg.h
208%{gcclib}/include/stdbool.h
209%{gcclib}/include/stddef.h
210%{gcclib}/include/stdfix.h
211%{gcclib}/include/syslimits.h
212%{gcclib}/include/tgmath.h
213%{gcclib}/include/tmmintrin.h
214%{gcclib}/include/unwind.h
215%{gcclib}/include/varargs.h
620b7a54
PS
216%{gcclib}/include/wmmintrin.h
217%{gcclib}/include/x86intrin.h
2fa5f249 218%{gcclib}/include/xmmintrin.h
fb214454
PS
219%attr(755,root,root) %{gcclib}/cc1
220%attr(755,root,root) %{gcclib}/collect2
620b7a54 221%{gcclib}/*.o
fb214454 222%{gcclib}/libgcc.a
620b7a54 223%if %{without bootstrap}
5ec0ebfe 224%{_bindir}/libgcc_s_sjlj-1.dll
620b7a54
PS
225%{gcclib}/libgcc_eh.a
226%endif
fb214454
PS
227%{gcclib}/libgcov.a
228%{gcclib}/specs*
fb214454
PS
229%{_mandir}/man1/%{target}-cpp.1*
230%{_mandir}/man1/%{target}-gcc.1*
231%{_mandir}/man1/%{target}-gcov.1*
423846e1
PS
232%{arch}/include
233%{arch}/lib/*.a
7fc88b33
PS
234%if %{without bootstrap}
235%exclude %{arch}/include/c++
236%exclude %{arch}/lib/libstdc++.a
237%exclude %{arch}/lib/libsupc++.a
238%endif
423846e1 239%{arch}/lib/*.o
892ff872
PS
240%dir %{arch}/mingw
241%{arch}/mingw/include
fb214454 242
7fc88b33 243%if %{without bootstrap}
fb214454
PS
244%files c++
245%defattr(644,root,root,755)
246%attr(755,root,root) %{_bindir}/%{target}-[cg]++
fb214454
PS
247%attr(755,root,root) %{gcclib}/cc1plus
248%{arch}/lib/libstdc++.a
249%{arch}/lib/libstdc++.la
250%{arch}/lib/libsupc++.a
251%{arch}/lib/libsupc++.la
7fc88b33 252%{arch}/include/c++
fb214454
PS
253%{_mandir}/man1/%{target}-g++.1*
254%endif
This page took 0.149295 seconds and 4 git commands to generate.