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