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