]> git.pld-linux.org Git - packages/crossmingw64-gcc.git/blame - crossmingw64-gcc.spec
- noticed Windows .dlls in wrong place
[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
fb214454
PS
36BuildRequires: texinfo >= 4.2
37Requires: crossmingw64-binutils
e3e90931 38Requires: crossmingw64-headers
fb214454
PS
39BuildRoot: %{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
52crossmingw64 is a complete cross-compiling development system for
53building stand-alone Microsoft Windows applications under Linux using
54the Mingw64 build libraries. This includes a binutils, gcc with g++
e3e90931 55and libstdc++, all cross targeted to x86_64-pc-mingw32.
fb214454
PS
56
57This package contains cross targeted gcc.
58
59%package c++
60Summary: Mingw64 binary utility development utilities - g++
61Summary(pl.UTF-8): Zestaw narzędzi mingw64 - g++
62Group: Development/Languages
63Requires: %{name} = %{epoch}:%{version}-%{release}
64
65%description c++
66crossmingw64 is a complete cross-compiling development system for
67building stand-alone Microsoft Windows applications under Linux using
68the Mingw64 build libraries. This includes a binutils, gcc with g++
e3e90931 69and libstdc++, all cross targeted to x86_64-pc-mingw32.
fb214454 70
e3e90931 71This 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.
79echo %{version} > gcc/BASE-VER
80echo "release" > gcc/DEV-PHASE
81
82if [ "`svnversion -n mingw64-crt`" != "%{_rev}" ]; then
83 exit 1
84fi
fb214454
PS
85
86%build
e3e90931 87rm -rf BUILDDIR && install -d BUILDDIR/%{target} && cd BUILDDIR
fb214454 88
e3e90931
PS
89# setup system headers for local build.
90cp -ar %{arch}/include %{target}/include
fb214454
PS
91
92CFLAGS="%{rpmcflags}" \
93CXXFLAGS="%{rpmcflags}" \
94LDFLAGS="%{rpmldflags}" \
95TEXCONFIG=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 \
116 --disable-libssp \
117 --disable-plugin \
118 --disable-lto \
fb214454
PS
119 --enable-c99 \
120 --enable-long-long \
620b7a54 121 --enable-decimal-float=yes \
fb214454 122 --enable-cmath \
fb214454
PS
123 --with-mangler-in-ld \
124 --with-gxx-include-dir=%{arch}/include/c++/%{version} \
e3e90931
PS
125 --enable-fully-dynamic-string \
126 --enable-libstdcxx-allocator=new \
fb214454
PS
127 --disable-libstdcxx-pch \
128 --enable-__cxa_atexit \
2fa5f249
PS
129 --with-pkgversion="PLD-Linux" \
130 --with-bugurl="http://bugs.pld-linux.org" \
3b61ff9a
PS
131 --build=%{_target_platform} \
132 --host=%{_target_platform} \
fb214454
PS
133 --target=%{target}
134
e3e90931 135%{__make} -j4
423846e1
PS
136cd ..
137
e3e90931 138cd mingw64-crt
e3e90931 139CC="$PWD/../BUILDDIR/gcc/gcc-cross -B$PWD/../BUILDDIR/gcc/" \
423846e1
PS
140./configure \
141 --host=%{target} \
142 --prefix=%{_prefix} \
e3e90931 143 --disable-lib32 --enable-lib64
423846e1
PS
144
145%{__make}
e3e90931 146cd ..
fb214454
PS
147
148%install
149rm -rf $RPM_BUILD_ROOT
e3e90931 150install -d $RPM_BUILD_ROOT
fb214454
PS
151
152cd BUILDDIR
7fc88b33 153%{__make} install \
fb214454
PS
154 DESTDIR=$RPM_BUILD_ROOT
155
156install gcc/specs $RPM_BUILD_ROOT%{gcclib}
08ae3d8f
PS
157
158if [ ! -f "$RPM_BUILD_ROOT%{_bindir}/libgcc_s_sjlj-1.dll" ]; then
159 echo "libgcc_s_sjlj-1.dll install still broken?"
160 install %{target}/libgcc/shlib/libgcc_s_sjlj-1.dll $RPM_BUILD_ROOT%{_bindir}
161fi
162
fb214454
PS
163cd ..
164
fb214454
PS
165gccdir=$RPM_BUILD_ROOT%{gcclib}
166mv $gccdir/include-fixed/{limits,syslimits}.h $gccdir/include
167rm -r $gccdir/include-fixed
168rm -r $gccdir/install-tools
169
e3e90931 170%{__make} -C mingw64-crt install \
423846e1
PS
171 DESTDIR=$RPM_BUILD_ROOT
172
fb214454
PS
173%if 0%{!?debug:1}
174%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
175%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
763b9ff5
PS
176find $RPM_BUILD_ROOT%{arch}/lib -type f -name '*.a' -o -name '*.o' \
177 -exec %{target}-strip -g -R.note -R.comment "{}" ";"
fb214454
PS
178%endif
179
fb214454
PS
180%clean
181rm -rf $RPM_BUILD_ROOT
182
183%files
184%defattr(644,root,root,755)
185%attr(755,root,root) %{_bindir}/%{target}-gcc*
186%attr(755,root,root) %{_bindir}/%{target}-cpp
187%attr(755,root,root) %{_bindir}/%{target}-gcov
fb214454
PS
188%dir %{gccarch}
189%dir %{gcclib}
2fa5f249 190%dir %{gcclib}/include
e3e90931 191%{gcclib}/include/abmintrin.h
2fa5f249 192%{gcclib}/include/ammintrin.h
620b7a54 193%{gcclib}/include/avxintrin.h
2fa5f249
PS
194%{gcclib}/include/bmmintrin.h
195%{gcclib}/include/cpuid.h
620b7a54 196%{gcclib}/include/cross-stdarg.h
2fa5f249
PS
197%{gcclib}/include/emmintrin.h
198%{gcclib}/include/float.h
e3e90931
PS
199%{gcclib}/include/fma4intrin.h
200%{gcclib}/include/ia32intrin.h
620b7a54 201%{gcclib}/include/immintrin.h
2fa5f249
PS
202%{gcclib}/include/iso646.h
203%{gcclib}/include/limits.h
e3e90931 204%{gcclib}/include/lwpintrin.h
2fa5f249
PS
205%{gcclib}/include/mm3dnow.h
206%{gcclib}/include/mm_malloc.h
2fa5f249
PS
207%{gcclib}/include/mmintrin.h
208%{gcclib}/include/nmmintrin.h
209%{gcclib}/include/pmmintrin.h
e3e90931 210%{gcclib}/include/popcntintrin.h
2fa5f249
PS
211%{gcclib}/include/smmintrin.h
212%{gcclib}/include/stdarg.h
213%{gcclib}/include/stdbool.h
214%{gcclib}/include/stddef.h
215%{gcclib}/include/stdfix.h
e3e90931
PS
216%{gcclib}/include/stdint-gcc.h
217%{gcclib}/include/stdint.h
2fa5f249
PS
218%{gcclib}/include/syslimits.h
219%{gcclib}/include/tgmath.h
220%{gcclib}/include/tmmintrin.h
221%{gcclib}/include/unwind.h
222%{gcclib}/include/varargs.h
620b7a54
PS
223%{gcclib}/include/wmmintrin.h
224%{gcclib}/include/x86intrin.h
2fa5f249 225%{gcclib}/include/xmmintrin.h
e3e90931 226%{gcclib}/include/xopintrin.h
fb214454
PS
227%attr(755,root,root) %{gcclib}/cc1
228%attr(755,root,root) %{gcclib}/collect2
e3e90931 229%attr(755,root,root) %{gcclib}/lto-wrapper
620b7a54 230%{gcclib}/*.o
fb214454 231%{gcclib}/libgcc.a
620b7a54 232%if %{without bootstrap}
5ec0ebfe 233%{_bindir}/libgcc_s_sjlj-1.dll
620b7a54
PS
234%{gcclib}/libgcc_eh.a
235%endif
fb214454
PS
236%{gcclib}/libgcov.a
237%{gcclib}/specs*
fb214454
PS
238%{_mandir}/man1/%{target}-cpp.1*
239%{_mandir}/man1/%{target}-gcc.1*
240%{_mandir}/man1/%{target}-gcov.1*
423846e1 241%{arch}/lib/*.a
7fc88b33
PS
242%if %{without bootstrap}
243%exclude %{arch}/include/c++
244%exclude %{arch}/lib/libstdc++.a
245%exclude %{arch}/lib/libsupc++.a
246%endif
423846e1 247%{arch}/lib/*.o
fb214454 248
7fc88b33 249%if %{without bootstrap}
fb214454
PS
250%files c++
251%defattr(644,root,root,755)
252%attr(755,root,root) %{_bindir}/%{target}-[cg]++
fb214454 253%attr(755,root,root) %{gcclib}/cc1plus
08ae3d8f 254%{_bindir}/libstdc++-6.dll
fb214454
PS
255%{arch}/lib/libstdc++.a
256%{arch}/lib/libstdc++.la
257%{arch}/lib/libsupc++.a
258%{arch}/lib/libsupc++.la
7fc88b33 259%{arch}/include/c++
fb214454
PS
260%{_mandir}/man1/%{target}-g++.1*
261%endif
This page took 0.078611 seconds and 4 git commands to generate.