]> git.pld-linux.org Git - packages/crossmingw64-gcc.git/blame - crossmingw64-gcc.spec
- md5 for gcc tarball.
[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
PS
12Version: 4.5.1
13Release: 0.1
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
PS
134cd mingw64-crt
135%{__make} distclean
136CC="$PWD/../BUILDDIR/gcc/gcc-cross -B$PWD/../BUILDDIR/gcc/" \
423846e1
PS
137./configure \
138 --host=%{target} \
139 --prefix=%{_prefix} \
e3e90931 140 --disable-lib32 --enable-lib64
423846e1
PS
141
142%{__make}
e3e90931 143cd ..
fb214454
PS
144
145%install
146rm -rf $RPM_BUILD_ROOT
e3e90931 147install -d $RPM_BUILD_ROOT
fb214454
PS
148
149cd BUILDDIR
7fc88b33 150%{__make} install \
fb214454
PS
151 DESTDIR=$RPM_BUILD_ROOT
152
153install gcc/specs $RPM_BUILD_ROOT%{gcclib}
fb214454
PS
154cd ..
155
fb214454
PS
156gccdir=$RPM_BUILD_ROOT%{gcclib}
157mv $gccdir/include-fixed/{limits,syslimits}.h $gccdir/include
158rm -r $gccdir/include-fixed
159rm -r $gccdir/install-tools
160
e3e90931 161%{__make} -C mingw64-crt install \
423846e1
PS
162 DESTDIR=$RPM_BUILD_ROOT
163
fb214454
PS
164%if 0%{!?debug:1}
165%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
166%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
763b9ff5
PS
167find $RPM_BUILD_ROOT%{arch}/lib -type f -name '*.a' -o -name '*.o' \
168 -exec %{target}-strip -g -R.note -R.comment "{}" ";"
fb214454
PS
169%endif
170
fb214454
PS
171%clean
172rm -rf $RPM_BUILD_ROOT
173
174%files
175%defattr(644,root,root,755)
176%attr(755,root,root) %{_bindir}/%{target}-gcc*
177%attr(755,root,root) %{_bindir}/%{target}-cpp
178%attr(755,root,root) %{_bindir}/%{target}-gcov
fb214454
PS
179%dir %{gccarch}
180%dir %{gcclib}
2fa5f249 181%dir %{gcclib}/include
e3e90931 182%{gcclib}/include/abmintrin.h
2fa5f249 183%{gcclib}/include/ammintrin.h
620b7a54 184%{gcclib}/include/avxintrin.h
2fa5f249
PS
185%{gcclib}/include/bmmintrin.h
186%{gcclib}/include/cpuid.h
620b7a54 187%{gcclib}/include/cross-stdarg.h
2fa5f249
PS
188%{gcclib}/include/emmintrin.h
189%{gcclib}/include/float.h
e3e90931
PS
190%{gcclib}/include/fma4intrin.h
191%{gcclib}/include/ia32intrin.h
620b7a54 192%{gcclib}/include/immintrin.h
2fa5f249
PS
193%{gcclib}/include/iso646.h
194%{gcclib}/include/limits.h
e3e90931 195%{gcclib}/include/lwpintrin.h
2fa5f249
PS
196%{gcclib}/include/mm3dnow.h
197%{gcclib}/include/mm_malloc.h
2fa5f249
PS
198%{gcclib}/include/mmintrin.h
199%{gcclib}/include/nmmintrin.h
200%{gcclib}/include/pmmintrin.h
e3e90931 201%{gcclib}/include/popcntintrin.h
2fa5f249
PS
202%{gcclib}/include/smmintrin.h
203%{gcclib}/include/stdarg.h
204%{gcclib}/include/stdbool.h
205%{gcclib}/include/stddef.h
206%{gcclib}/include/stdfix.h
e3e90931
PS
207%{gcclib}/include/stdint-gcc.h
208%{gcclib}/include/stdint.h
2fa5f249
PS
209%{gcclib}/include/syslimits.h
210%{gcclib}/include/tgmath.h
211%{gcclib}/include/tmmintrin.h
212%{gcclib}/include/unwind.h
213%{gcclib}/include/varargs.h
620b7a54
PS
214%{gcclib}/include/wmmintrin.h
215%{gcclib}/include/x86intrin.h
2fa5f249 216%{gcclib}/include/xmmintrin.h
e3e90931 217%{gcclib}/include/xopintrin.h
fb214454
PS
218%attr(755,root,root) %{gcclib}/cc1
219%attr(755,root,root) %{gcclib}/collect2
e3e90931 220%attr(755,root,root) %{gcclib}/lto-wrapper
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 232%{arch}/lib/*.a
7fc88b33
PS
233%if %{without bootstrap}
234%exclude %{arch}/include/c++
235%exclude %{arch}/lib/libstdc++.a
236%exclude %{arch}/lib/libsupc++.a
237%endif
423846e1 238%{arch}/lib/*.o
fb214454 239
7fc88b33 240%if %{without bootstrap}
fb214454
PS
241%files c++
242%defattr(644,root,root,755)
243%attr(755,root,root) %{_bindir}/%{target}-[cg]++
fb214454
PS
244%attr(755,root,root) %{gcclib}/cc1plus
245%{arch}/lib/libstdc++.a
246%{arch}/lib/libstdc++.la
247%{arch}/lib/libsupc++.a
248%{arch}/lib/libsupc++.la
7fc88b33 249%{arch}/include/c++
fb214454
PS
250%{_mandir}/man1/%{target}-g++.1*
251%endif
This page took 4.367231 seconds and 4 git commands to generate.