]> git.pld-linux.org Git - packages/crossmingw64-gcc.git/blame - crossmingw64-gcc.spec
- remove temporary 'make distclean', release 0.2.
[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
e3e90931 12Version: 4.5.1
8ac66bce 13Release: 0.2
fb214454
PS
14Epoch: 1
15License: GPL v3+
16Group: Development/Languages
e3e90931 17Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
212a96f8 18# Source0-md5: 48231a8e33ed6e058a341c53b819de1a
e3e90931
PS
19# svn co https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/branches/releases/v1.0/mingw-w64-crt mingw64-crt
20%define _rev 3654
21Source1: mingw64-crt.tar.bz2
22# Source1-md5: fd2acf22ae08c8929e384bd74c0cfa55
23Patch0: gcc-branch.diff
24Patch1: gcc-mingw-dirs.patch
fb214454
PS
25BuildRequires: autoconf
26BuildRequires: automake
27BuildRequires: bison
28BuildRequires: crossmingw64-binutils
620b7a54 29%{!?with_bootstrap:BuildRequires: crossmingw64-gcc}
e3e90931 30BuildRequires: crossmingw64-headers
fb214454 31BuildRequires: flex
e3e90931
PS
32BuildRequires: gmp-devel >= 4.1
33BuildRequires: libmpc-devel
34BuildRequires: mpfr-devel >= 2.3.0
fb214454
PS
35BuildRequires: texinfo >= 4.2
36Requires: crossmingw64-binutils
e3e90931 37Requires: crossmingw64-headers
fb214454
PS
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
e3e90931 40%define target x86_64-pc-mingw32
fb214454
PS
41%define arch %{_prefix}/%{target}
42%define gccarch %{_libdir}/gcc/%{target}
43%define gcclib %{gccarch}/%{version}
44
45%define _noautostrip .*/lib.*\\.a
46
47%description
48crossmingw64 is a complete cross-compiling development system for
49building stand-alone Microsoft Windows applications under Linux using
50the Mingw64 build libraries. This includes a binutils, gcc with g++
e3e90931 51and libstdc++, all cross targeted to x86_64-pc-mingw32.
fb214454
PS
52
53This package contains cross targeted gcc.
54
55%package c++
56Summary: Mingw64 binary utility development utilities - g++
57Summary(pl.UTF-8): Zestaw narzędzi mingw64 - g++
58Group: Development/Languages
59Requires: %{name} = %{epoch}:%{version}-%{release}
60
61%description c++
62crossmingw64 is a complete cross-compiling development system for
63building stand-alone Microsoft Windows applications under Linux using
64the Mingw64 build libraries. This includes a binutils, gcc with g++
e3e90931 65and libstdc++, all cross targeted to x86_64-pc-mingw32.
fb214454 66
e3e90931 67This package contains cross targeted g++ and libstdc++.
fb214454
PS
68
69%prep
e3e90931
PS
70%setup -q -n gcc-%{version} -a 1
71%patch0 -p0
72%patch1 -p1
73
74# override snapshot version.
75echo %{version} > gcc/BASE-VER
76echo "release" > gcc/DEV-PHASE
77
78if [ "`svnversion -n mingw64-crt`" != "%{_rev}" ]; then
79 exit 1
80fi
fb214454
PS
81
82%build
e3e90931 83rm -rf BUILDDIR && install -d BUILDDIR/%{target} && cd BUILDDIR
fb214454 84
e3e90931
PS
85# setup system headers for local build.
86cp -ar %{arch}/include %{target}/include
fb214454
PS
87
88CFLAGS="%{rpmcflags}" \
89CXXFLAGS="%{rpmcflags}" \
90LDFLAGS="%{rpmldflags}" \
91TEXCONFIG=false \
92../configure \
e3e90931 93 --enable-checking=release \
fb214454
PS
94 --prefix=%{_prefix} \
95 --infodir=%{_infodir} \
96 --mandir=%{_mandir} \
fb214454
PS
97 --libdir=%{_libdir} \
98 --libexecdir=%{_libexecdir} \
99 --includedir=%{arch}/include \
620b7a54
PS
100 --with-gnu-as \
101 --with-gnu-ld \
fb214454 102 --with-sysroot=%{arch} \
620b7a54 103 --%{?with_bootstrap:dis}%{!?with_bootstrap:en}able-shared \
e3e90931 104 --disable-win32-registry \
fb214454 105 --enable-threads=win32 \
e3e90931 106 --enable-tls \
6252559d 107 --enable-sjlj-exceptions \
fb214454 108 --enable-languages="c%{!?with_bootstrap:,c++}" \
e3e90931
PS
109 --disable-multilib \
110 --disable-nls \
111 --disable-libmudflap \
112 --disable-libssp \
113 --disable-plugin \
114 --disable-lto \
fb214454
PS
115 --enable-c99 \
116 --enable-long-long \
620b7a54 117 --enable-decimal-float=yes \
fb214454 118 --enable-cmath \
fb214454
PS
119 --with-mangler-in-ld \
120 --with-gxx-include-dir=%{arch}/include/c++/%{version} \
e3e90931
PS
121 --enable-fully-dynamic-string \
122 --enable-libstdcxx-allocator=new \
fb214454
PS
123 --disable-libstdcxx-pch \
124 --enable-__cxa_atexit \
2fa5f249
PS
125 --with-pkgversion="PLD-Linux" \
126 --with-bugurl="http://bugs.pld-linux.org" \
3b61ff9a
PS
127 --build=%{_target_platform} \
128 --host=%{_target_platform} \
fb214454
PS
129 --target=%{target}
130
e3e90931 131%{__make} -j4
423846e1
PS
132cd ..
133
e3e90931 134cd mingw64-crt
e3e90931 135CC="$PWD/../BUILDDIR/gcc/gcc-cross -B$PWD/../BUILDDIR/gcc/" \
423846e1
PS
136./configure \
137 --host=%{target} \
138 --prefix=%{_prefix} \
e3e90931 139 --disable-lib32 --enable-lib64
423846e1
PS
140
141%{__make}
e3e90931 142cd ..
fb214454
PS
143
144%install
145rm -rf $RPM_BUILD_ROOT
e3e90931 146install -d $RPM_BUILD_ROOT
fb214454
PS
147
148cd BUILDDIR
7fc88b33 149%{__make} install \
fb214454
PS
150 DESTDIR=$RPM_BUILD_ROOT
151
152install gcc/specs $RPM_BUILD_ROOT%{gcclib}
fb214454
PS
153cd ..
154
fb214454
PS
155gccdir=$RPM_BUILD_ROOT%{gcclib}
156mv $gccdir/include-fixed/{limits,syslimits}.h $gccdir/include
157rm -r $gccdir/include-fixed
158rm -r $gccdir/install-tools
159
e3e90931 160%{__make} -C mingw64-crt install \
423846e1
PS
161 DESTDIR=$RPM_BUILD_ROOT
162
fb214454
PS
163%if 0%{!?debug:1}
164%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
165%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
763b9ff5
PS
166find $RPM_BUILD_ROOT%{arch}/lib -type f -name '*.a' -o -name '*.o' \
167 -exec %{target}-strip -g -R.note -R.comment "{}" ";"
fb214454
PS
168%endif
169
fb214454
PS
170%clean
171rm -rf $RPM_BUILD_ROOT
172
173%files
174%defattr(644,root,root,755)
175%attr(755,root,root) %{_bindir}/%{target}-gcc*
176%attr(755,root,root) %{_bindir}/%{target}-cpp
177%attr(755,root,root) %{_bindir}/%{target}-gcov
fb214454
PS
178%dir %{gccarch}
179%dir %{gcclib}
2fa5f249 180%dir %{gcclib}/include
e3e90931 181%{gcclib}/include/abmintrin.h
2fa5f249 182%{gcclib}/include/ammintrin.h
620b7a54 183%{gcclib}/include/avxintrin.h
2fa5f249
PS
184%{gcclib}/include/bmmintrin.h
185%{gcclib}/include/cpuid.h
620b7a54 186%{gcclib}/include/cross-stdarg.h
2fa5f249
PS
187%{gcclib}/include/emmintrin.h
188%{gcclib}/include/float.h
e3e90931
PS
189%{gcclib}/include/fma4intrin.h
190%{gcclib}/include/ia32intrin.h
620b7a54 191%{gcclib}/include/immintrin.h
2fa5f249
PS
192%{gcclib}/include/iso646.h
193%{gcclib}/include/limits.h
e3e90931 194%{gcclib}/include/lwpintrin.h
2fa5f249
PS
195%{gcclib}/include/mm3dnow.h
196%{gcclib}/include/mm_malloc.h
2fa5f249
PS
197%{gcclib}/include/mmintrin.h
198%{gcclib}/include/nmmintrin.h
199%{gcclib}/include/pmmintrin.h
e3e90931 200%{gcclib}/include/popcntintrin.h
2fa5f249
PS
201%{gcclib}/include/smmintrin.h
202%{gcclib}/include/stdarg.h
203%{gcclib}/include/stdbool.h
204%{gcclib}/include/stddef.h
205%{gcclib}/include/stdfix.h
e3e90931
PS
206%{gcclib}/include/stdint-gcc.h
207%{gcclib}/include/stdint.h
2fa5f249
PS
208%{gcclib}/include/syslimits.h
209%{gcclib}/include/tgmath.h
210%{gcclib}/include/tmmintrin.h
211%{gcclib}/include/unwind.h
212%{gcclib}/include/varargs.h
620b7a54
PS
213%{gcclib}/include/wmmintrin.h
214%{gcclib}/include/x86intrin.h
2fa5f249 215%{gcclib}/include/xmmintrin.h
e3e90931 216%{gcclib}/include/xopintrin.h
fb214454
PS
217%attr(755,root,root) %{gcclib}/cc1
218%attr(755,root,root) %{gcclib}/collect2
e3e90931 219%attr(755,root,root) %{gcclib}/lto-wrapper
620b7a54 220%{gcclib}/*.o
fb214454 221%{gcclib}/libgcc.a
620b7a54 222%if %{without bootstrap}
5ec0ebfe 223%{_bindir}/libgcc_s_sjlj-1.dll
620b7a54
PS
224%{gcclib}/libgcc_eh.a
225%endif
fb214454
PS
226%{gcclib}/libgcov.a
227%{gcclib}/specs*
fb214454
PS
228%{_mandir}/man1/%{target}-cpp.1*
229%{_mandir}/man1/%{target}-gcc.1*
230%{_mandir}/man1/%{target}-gcov.1*
423846e1 231%{arch}/lib/*.a
7fc88b33
PS
232%if %{without bootstrap}
233%exclude %{arch}/include/c++
234%exclude %{arch}/lib/libstdc++.a
235%exclude %{arch}/lib/libsupc++.a
236%endif
423846e1 237%{arch}/lib/*.o
fb214454 238
7fc88b33 239%if %{without bootstrap}
fb214454
PS
240%files c++
241%defattr(644,root,root,755)
242%attr(755,root,root) %{_bindir}/%{target}-[cg]++
fb214454
PS
243%attr(755,root,root) %{gcclib}/cc1plus
244%{arch}/lib/libstdc++.a
245%{arch}/lib/libstdc++.la
246%{arch}/lib/libsupc++.a
247%{arch}/lib/libsupc++.la
7fc88b33 248%{arch}/include/c++
fb214454
PS
249%{_mandir}/man1/%{target}-g++.1*
250%endif
This page took 0.145588 seconds and 4 git commands to generate.