]> git.pld-linux.org Git - packages/crossmingw64-gcc.git/blame - crossmingw64-gcc.spec
- build'n'install crt.
[packages/crossmingw64-gcc.git] / crossmingw64-gcc.spec
CommitLineData
fb214454
PS
1#
2# Conditional build:
3%bcond_with bootstrap # bootstrap build (only pure C compiler w/o startfiles)
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
12Version: 4.3.1
13Release: 0.1
14Epoch: 1
15License: GPL v3+
16Group: Development/Languages
17Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
18# Source0-md5: 4afa0290cc3a41ac8822666f1110de98
19Source1: http://dl.sourceforge.net/mingw-w64/mingw-w64-snapshot-20080424.tar.bz2
20# Source1-md5: e2eea49233efd0be3a40fc774abeb1a2
21Patch0: %{name}-no_include64.patch
22BuildRequires: autoconf
23BuildRequires: automake
24BuildRequires: bison
25BuildRequires: crossmingw64-binutils
26BuildRequires: flex
27BuildRequires: mpfr-devel
28BuildRequires: texinfo >= 4.2
29Requires: crossmingw64-binutils
fb214454
PS
30BuildRoot: %{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
40crossmingw64 is a complete cross-compiling development system for
41building stand-alone Microsoft Windows applications under Linux using
42the Mingw64 build libraries. This includes a binutils, gcc with g++
43and libstdc++, all cross targeted to x86_64-mingw32.
44
45This package contains cross targeted gcc.
46
47%package c++
48Summary: Mingw64 binary utility development utilities - g++
49Summary(pl.UTF-8): Zestaw narzędzi mingw64 - g++
50Group: Development/Languages
51Requires: %{name} = %{epoch}:%{version}-%{release}
52
53%description c++
54crossmingw64 is a complete cross-compiling development system for
55building stand-alone Microsoft Windows applications under Linux using
56the Mingw64 build libraries. This includes a binutils, gcc with g++
57and libstdc++, all cross targeted to x86_64-mingw32.
58
59This package contains cross targeted g++ and (static) libstdc++.
60
61%prep
423846e1 62%setup -q -n gcc-%{version} -a 1
fb214454 63%patch0 -p1
423846e1
PS
64mkdir -p winsup/mingw
65cp -ar trunk/mingw-w64-headers/include winsup/mingw
fb214454
PS
66
67%build
423846e1 68build_sysroot=`pwd`/winsup
fb214454
PS
69
70rm -rf BUILDDIR && install -d BUILDDIR && cd BUILDDIR
71
72CFLAGS="%{rpmcflags}" \
73CXXFLAGS="%{rpmcflags}" \
74LDFLAGS="%{rpmldflags}" \
75TEXCONFIG=false \
76../configure \
77 --prefix=%{_prefix} \
78 --infodir=%{_infodir} \
79 --mandir=%{_mandir} \
fb214454
PS
80 --libdir=%{_libdir} \
81 --libexecdir=%{_libexecdir} \
82 --includedir=%{arch}/include \
83 --with-sysroot=%{arch} \
84 --with-build-sysroot=$build_sysroot \
85 --disable-shared \
86 --enable-threads=win32 \
2fa5f249 87 --disable-sjlj-exceptions \
fb214454
PS
88 --enable-languages="c%{!?with_bootstrap:,c++}" \
89 --enable-c99 \
90 --enable-long-long \
91 --enable-cmath \
92 --disable-nls \
93 --with-gnu-as \
94 --with-gnu-ld \
95 --with-mangler-in-ld \
96 --with-gxx-include-dir=%{arch}/include/c++/%{version} \
97 --disable-libstdcxx-pch \
98 --enable-__cxa_atexit \
99 --disable-libmudflap \
100 --disable-libssp \
2fa5f249
PS
101 --with-pkgversion="PLD-Linux" \
102 --with-bugurl="http://bugs.pld-linux.org" \
423846e1
PS
103 --build=%{_target_platform} \
104 --host=%{_target_platform} \
fb214454
PS
105 --target=%{target}
106
423846e1
PS
107%{__make} all-gcc -j2
108%{__make} all-target-libgcc
109
110cd ..
111
112cat <<EOF >cross-gcc
113#!/bin/sh
114p=`pwd`/BUILDDIR/gcc
115\${p}/xgcc -B\${p} \$@
116EOF
117chmod 755 cross-gcc
118
119export CC=`pwd`/cross-gcc
120
121cd trunk/mingw-w64-crt
122
123./configure \
124 --host=%{target} \
125 --prefix=%{_prefix} \
126 --with-sysroot=$build_sysroot \
127
128%{__make}
129
130cd -
fb214454
PS
131
132%install
423846e1 133build_sysroot=`pwd`/winsup
892ff872 134
fb214454 135rm -rf $RPM_BUILD_ROOT
423846e1 136install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir},%{arch}/mingw/include}
fb214454
PS
137
138cd BUILDDIR
139
892ff872 140%{__make} install-gcc install-target-libgcc \
fb214454
PS
141 DESTDIR=$RPM_BUILD_ROOT
142
143install gcc/specs $RPM_BUILD_ROOT%{gcclib}
144
145cd ..
146
fb214454
PS
147gccdir=$RPM_BUILD_ROOT%{gcclib}
148mv $gccdir/include-fixed/{limits,syslimits}.h $gccdir/include
149rm -r $gccdir/include-fixed
150rm -r $gccdir/install-tools
151
423846e1
PS
152
153cp -ar $build_sysroot/mingw/include $RPM_BUILD_ROOT%{arch}
154
155make -C trunk/mingw-w64-crt install \
156 DESTDIR=$RPM_BUILD_ROOT
157
158mv $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/lib \
159 $RPM_BUILD_ROOT%{arch}
160
fb214454
PS
161%if 0%{!?debug:1}
162%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
163%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
423846e1 164%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{arch}/lib/*.{a,o}
fb214454
PS
165%endif
166
fb214454
PS
167%clean
168rm -rf $RPM_BUILD_ROOT
169
170%files
171%defattr(644,root,root,755)
172%attr(755,root,root) %{_bindir}/%{target}-gcc*
173%attr(755,root,root) %{_bindir}/%{target}-cpp
174%attr(755,root,root) %{_bindir}/%{target}-gcov
fb214454
PS
175%dir %{gccarch}
176%dir %{gcclib}
2fa5f249
PS
177%dir %{gcclib}/include
178%{gcclib}/include/ammintrin.h
179%{gcclib}/include/bmmintrin.h
180%{gcclib}/include/cpuid.h
181%{gcclib}/include/emmintrin.h
182%{gcclib}/include/float.h
183%{gcclib}/include/iso646.h
184%{gcclib}/include/limits.h
185%{gcclib}/include/mm3dnow.h
186%{gcclib}/include/mm_malloc.h
187%{gcclib}/include/mmintrin-common.h
188%{gcclib}/include/mmintrin.h
189%{gcclib}/include/nmmintrin.h
190%{gcclib}/include/pmmintrin.h
191%{gcclib}/include/smmintrin.h
192%{gcclib}/include/stdarg.h
193%{gcclib}/include/stdbool.h
194%{gcclib}/include/stddef.h
195%{gcclib}/include/stdfix.h
196%{gcclib}/include/syslimits.h
197%{gcclib}/include/tgmath.h
198%{gcclib}/include/tmmintrin.h
199%{gcclib}/include/unwind.h
200%{gcclib}/include/varargs.h
201%{gcclib}/include/xmmintrin.h
fb214454
PS
202%attr(755,root,root) %{gcclib}/cc1
203%attr(755,root,root) %{gcclib}/collect2
204%{gcclib}/libgcc.a
205%{gcclib}/libgcov.a
206%{gcclib}/specs*
fb214454
PS
207%{_mandir}/man1/%{target}-cpp.1*
208%{_mandir}/man1/%{target}-gcc.1*
209%{_mandir}/man1/%{target}-gcov.1*
423846e1
PS
210%{arch}/include
211%{arch}/lib/*.a
212%{arch}/lib/*.o
892ff872
PS
213%dir %{arch}/mingw
214%{arch}/mingw/include
fb214454
PS
215
216%if 0
217%files c++
218%defattr(644,root,root,755)
219%attr(755,root,root) %{_bindir}/%{target}-[cg]++
220%attr(755,root,root) %{arch}/bin/[cg]++
221%attr(755,root,root) %{gcclib}/cc1plus
222%{arch}/lib/libstdc++.a
223%{arch}/lib/libstdc++.la
224%{arch}/lib/libsupc++.a
225%{arch}/lib/libsupc++.la
226%{arch}/include/g++
227%{_mandir}/man1/%{target}-g++.1*
228%endif
This page took 0.105912 seconds and 4 git commands to generate.