]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blame - crossmingw32-gcc.spec
- up to 4.5.1 (with branch diff like in regular gcc.spec)
[packages/crossmingw32-gcc.git] / crossmingw32-gcc.spec
CommitLineData
a3bdc2a1 1#
83afd976
ŁK
2# TODO:
3# - restore languages other than c, c++
4# - openmp
5#
a3bdc2a1 6# Conditional build:
a09cdaa3 7%bcond_with bootstrap # bootstrap build (using binary w32api/mingw)
a3bdc2a1 8#
9dd4c848 9Summary: Cross Mingw32 GNU binary utility development utilities - gcc
34f34e0d
ER
10Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - Mingw32 gcc
11Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - Mingw32 gcc
12Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla Mingw32 - gcc
13Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - Mingw32 gcc
14Summary(tr.UTF-8): GNU geliştirme araçları - Mingw32 gcc
b336056d 15Name: crossmingw32-gcc
83afd976
ŁK
16Version: 4.5.1
17Release: 1
d3f237e2 18Epoch: 1
d81c803d 19License: GPL v2+
d3f237e2 20Group: Development/Languages
dee9b92f 21Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
83afd976 22# Source0-md5: 48231a8e33ed6e058a341c53b819de1a
d81c803d 23%define apiver 3.10
dee9b92f 24Source1: http://dl.sourceforge.net/mingw/w32api-%{apiver}.tar.gz
d81c803d
JB
25# Source1-md5: 7067a6b3ac9d94bb753f9f6f37e2033c
26%define runver 3.13
dee9b92f 27Source2: http://dl.sourceforge.net/mingw/mingw-runtime-%{runver}.tar.gz
d81c803d 28# Source2-md5: 22179021f41d5eee76447b78fb94a3fb
83afd976
ŁK
29# svn diff -x --ignore-eol-style svn://gcc.gnu.org/svn/gcc/tags/gcc_4_5_1_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch > gcc-branch.diff
30Patch100: gcc-branch.diff
31Patch0: %{name}-buildsystem1.patch
32Patch1: %{name}-buildsystem2.patch
33Patch2: %{name}-lfs.patch
d12aabe0 34BuildRequires: autoconf
59d75dd2 35BuildRequires: automake
d12aabe0 36BuildRequires: bison
43a95438 37BuildRequires: crossmingw32-binutils >= 2.15.91.0.2-2
b336056d 38BuildRequires: flex
83afd976 39BuildRequires: libmpc-devel
5b936a1d 40%if %{without bootstrap}
43a95438
JK
41BuildRequires: crossmingw32-runtime >= 3.5
42BuildRequires: crossmingw32-w32api >= 3.1
b399bc1a 43%endif
f24c8266 44BuildRequires: mpfr-devel
d81c803d 45BuildRequires: texinfo >= 4.2
43a95438 46Requires: crossmingw32-binutils >= 2.15.91.0.2-2
6ab368b0 47Requires: gcc-dirs
b336056d
JB
48BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
d3f237e2 50%define target i386-mingw32
d3f237e2 51%define arch %{_prefix}/%{target}
a0d467f7 52%define gccarch %{_libdir}/gcc/%{target}
dee9b92f
PS
53%define gcclib %{gccarch}/%{version}
54
5b936a1d 55%define _noautostrip .*/lib.*\\.a
b336056d 56
66f480ce
JP
57%define _enable_debug_packages 0
58
b336056d
JB
59%description
60crossmingw32 is a complete cross-compiling development system for
61building stand-alone Microsoft Windows applications under Linux using
62the Mingw32 build libraries. This includes a binutils, gcc with g++
63and objc, and libstdc++, all cross targeted to i386-mingw32, along
64with supporting Win32 libraries in 'coff' format from free sources.
65
d3f237e2 66This package contains cross targeted gcc.
b336056d 67
4a6c89d0 68%description -l de.UTF-8
69Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
70anderem Rechner Code für Win32 zu generieren.
9dd4c848 71
4a6c89d0 72%description -l pl.UTF-8
73crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
74pozwalającym budować aplikacje MS Windows pod Linuksem używając
75bibliotek Mingw32. System składa się z binutils, gcc z g++ i objc,
76libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
2e5b9011 77z bibliotek w formacie COFF.
d790a8ba 78
4a6c89d0 79Ten pakiet zawiera gcc generujące skrośnie kod dla Win32.
d790a8ba 80
d3f237e2 81%package c++
2e5b9011 82Summary: Mingw32 binary utility development utilities - g++
34f34e0d 83Summary(pl.UTF-8): Zestaw narzędzi mingw32 - g++
d3f237e2 84Group: Development/Languages
cae974d4 85Requires: %{name} = %{epoch}:%{version}-%{release}
b336056d 86
d3f237e2
JB
87%description c++
88crossmingw32 is a complete cross-compiling development system for
89building stand-alone Microsoft Windows applications under Linux using
90the Mingw32 build libraries. This includes a binutils, gcc with g++
91and objc, and libstdc++, all cross targeted to i386-mingw32, along
92with supporting Win32 libraries in 'coff' format from free sources.
93
94This package contains cross targeted g++ and (static) libstdc++.
95
4a6c89d0 96%description c++ -l pl.UTF-8
97crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
98pozwalającym budować aplikacje MS Windows pod Linuksem używając
99bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
100libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
2e5b9011 101z bibliotek w formacie COFF.
d790a8ba 102
4a6c89d0 103Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę
d790a8ba
JB
104libstdc++.
105
83afd976
ŁK
106# no obj-c, fortran, java for the moment
107%if 0
d3f237e2
JB
108# does this even work?
109%package objc
2e5b9011 110Summary: Mingw32 binary utility development utilities - objc
34f34e0d 111Summary(pl.UTF-8): Zestaw narzędzi mingw32 - objc
d3f237e2 112Group: Development/Languages
cae974d4 113Requires: %{name} = %{epoch}:%{version}-%{release}
d3f237e2
JB
114
115%description objc
116crossmingw32 is a complete cross-compiling development system for
117building stand-alone Microsoft Windows applications under Linux using
118the Mingw32 build libraries. This includes a binutils, gcc with g++
119and objc, and libstdc++, all cross targeted to i386-mingw32, along
120with supporting Win32 libraries in 'coff' format from free sources.
121
37948e2b 122This package contains cross targeted objc compiler.
d3f237e2 123
4a6c89d0 124%description objc -l pl.UTF-8
125crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
126pozwalającym budować aplikacje MS Windows pod Linuksem używając
127bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
128libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
2e5b9011 129z bibliotek w formacie COFF.
d790a8ba 130
4a6c89d0 131Ten pakiet zawiera kompilator objc generujący kod pod Win32.
d790a8ba 132
d3f237e2 133# does this even work?
52a544a1 134%package fortran
37948e2b 135Summary: Mingw32 binary utility development utilities - Fortran
34f34e0d 136Summary(pl.UTF-8): Zestaw narzędzi mingw32 - Fortran
d3f237e2 137Group: Development/Languages
cae974d4 138Requires: %{name} = %{epoch}:%{version}-%{release}
37948e2b 139Obsoletes: crossmingw32-gcc-g77
d3f237e2 140
52a544a1 141%description fortran
d3f237e2
JB
142crossmingw32 is a complete cross-compiling development system for
143building stand-alone Microsoft Windows applications under Linux using
144the Mingw32 build libraries. This includes a binutils, gcc with g++
145and objc, and libstdc++, all cross targeted to i386-mingw32, along
146with supporting Win32 libraries in 'coff' format from free sources.
147
37948e2b 148This package contains cross targeted Fortran compiler.
d3f237e2 149
4a6c89d0 150%description fortran -l pl.UTF-8
151crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
152pozwalającym budować aplikacje MS Windows pod Linuksem używając
153bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
154libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
2e5b9011 155z bibliotek w formacie COFF.
d790a8ba 156
4a6c89d0 157Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32.
d790a8ba 158
d3f237e2
JB
159# does this even work?
160%package java
37948e2b 161Summary: Mingw32 binary utility development utilities - Java
34f34e0d 162Summary(pl.UTF-8): Zestaw narzędzi mingw32 - Java
d3f237e2 163Group: Development/Languages
cae974d4 164Requires: %{name} = %{epoch}:%{version}-%{release}
d3f237e2
JB
165
166%description java
167crossmingw32 is a complete cross-compiling development system for
168building stand-alone Microsoft Windows applications under Linux using
169the Mingw32 build libraries. This includes a binutils, gcc with g++
170and objc, and libstdc++, all cross targeted to i386-mingw32, along
171with supporting Win32 libraries in 'coff' format from free sources.
172
37948e2b 173This package contains cross targeted Java compiler.
d3f237e2 174
4a6c89d0 175%description java -l pl.UTF-8
2e5b9011 176
4a6c89d0 177crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
178pozwalającym budować aplikacje MS Windows pod Linuksem używając
179bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
180libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
2e5b9011 181z bibliotek w formacie COFF.
d790a8ba 182
4a6c89d0 183Ten pakiet zawiera kompilator Javy generujący kod pod Win32.
83afd976 184%endif
d790a8ba 185
d3f237e2 186%prep
dee9b92f 187%setup -q -n gcc-%{version}
83afd976
ŁK
188%patch100 -p0
189%patch0 -p1
190%patch2 -p1
191
b399bc1a
AF
192%if %{with bootstrap}
193mkdir winsup
194tar xzf %{SOURCE1} -C winsup
195tar xzf %{SOURCE2} -C winsup
196%endif
83afd976
ŁK
197
198# override snapshot version.
199echo %{version} > gcc/BASE-VER
200echo "release" > gcc/DEV-PHASE
b336056d
JB
201
202%build
b399bc1a
AF
203%if %{with bootstrap}
204for tool in as ar dlltool ld nm ranlib strip ; do
205 ln -sf %{arch}/bin/$tool winsup/bin/$tool
206done
b399bc1a
AF
207%endif
208
83afd976 209rm -rf builddir && install -d builddir && cd builddir
b336056d 210
83afd976 211CC="%{__cc}" \
b4c37c30 212CFLAGS="%{rpmcflags}" \
83afd976 213CXXFLAGS="%{rpmcxxflags}" \
b4c37c30 214TEXCONFIG=false \
b336056d 215../configure \
83afd976 216 --prefix=%{arch} \
b336056d
JB
217 --infodir=%{_infodir} \
218 --mandir=%{_mandir} \
83afd976
ŁK
219 --with-headers=%{arch}/include \
220 --with-libs=%{arch}/lib \
221 --with-build-time-tools=%{arch}/bin \
222 --with-dwarf2 \
223 --with-gnu-as \
224 --with-gnu-ld \
225 --with-mangler-in-ld \
226 --with-long-double-128 \
0dcd3a97 227 --enable-threads \
83afd976 228 --enable-languages="c,c++" \
0dcd3a97
PS
229 --enable-c99 \
230 --enable-long-long \
83afd976
ŁK
231 --enable-fully-dynamic-string \
232 --enable-libstdcxx-allocator=new \
233 --enable-version-specific-runtime-libs \
234 --enable-shared \
0dcd3a97 235 --disable-nls \
83afd976
ŁK
236 --disable-symvers \
237 --disable-sjlj-exceptions \
238 --disable-win32-registry \
239 --disable-multilib \
240 --disable-libssp \
b336056d
JB
241 --target=%{target}
242
83afd976
ŁK
243cd ..
244%{__make} -C builddir all-host
245patch -p1 <%{PATCH1}
246%{__make} -C builddir
b336056d
JB
247
248%install
b336056d 249rm -rf $RPM_BUILD_ROOT
dee9b92f 250install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}}
b336056d 251
83afd976 252%{__make} -C builddir install \
d12aabe0 253 DESTDIR=$RPM_BUILD_ROOT
b336056d 254
d12aabe0 255%if 0%{!?debug:1}
dee9b92f 256%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{arch}/lib/lib*.a
d12aabe0
JB
257%endif
258
259# restore hardlinks
83afd976
ŁK
260ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
261ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-g++ $RPM_BUILD_ROOT%{_bindir}/%{target}-g++
262ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-cpp $RPM_BUILD_ROOT%{_bindir}/%{target}-cpp
263ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-gcov $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov
264
265install -d $RPM_BUILD_ROOT%{_libdir}
266install -d $RPM_BUILD_ROOT%{_libdir}/gcc
d12aabe0 267
83afd976
ŁK
268cp -r $RPM_BUILD_ROOT%{arch}/libexec/gcc/%{target} $RPM_BUILD_ROOT%{_libdir}/gcc
269cp -r $RPM_BUILD_ROOT%{arch}/lib/gcc/%{target} $RPM_BUILD_ROOT%{_libdir}/gcc
270rm -rf $RPM_BUILD_ROOT%{_libdir}/gcc/%{target}/%{version}/install-tools
271rm -rf $RPM_BUILD_ROOT%{arch}/libexec
272rm -rf $RPM_BUILD_ROOT%{arch}/lib/gcc
b336056d 273
83afd976
ŁK
274mv -f $RPM_BUILD_ROOT%{_libdir}/gcc/%{target}/%{version}/cc1 $RPM_BUILD_ROOT%{arch}/bin/cc1
275mv -f $RPM_BUILD_ROOT%{_libdir}/gcc/%{target}/%{version}/cc1plus $RPM_BUILD_ROOT%{arch}/bin/cc1plus
276mv -f $RPM_BUILD_ROOT%{_libdir}/gcc/%{target}/%{version}/collect2 $RPM_BUILD_ROOT%{arch}/bin/collect2
277
278install builddir/i386-mingw32/libgcc/shlib/libgcc_s_dw2-1.dll $RPM_BUILD_ROOT%{arch}/bin
b336056d 279%clean
b336056d
JB
280rm -rf $RPM_BUILD_ROOT
281
282%files
283%defattr(644,root,root,755)
83afd976 284%attr(755,root,root) %{_bindir}/%{target}-gcc
b4c37c30 285%attr(755,root,root) %{_bindir}/%{target}-cpp
286%attr(755,root,root) %{_bindir}/%{target}-gcov
83afd976
ŁK
287%attr(755,root,root) %{arch}/bin/%{target}-gcc*
288%attr(755,root,root) %{arch}/bin/%{target}-cpp
289%attr(755,root,root) %{arch}/bin/%{target}-gcov
290%attr(755,root,root) %{arch}/bin/cc1
291%attr(755,root,root) %{arch}/bin/collect2
292%{arch}/bin/*.dll
293
294%{_libdir}/gcc/%{target}
295%{arch}/%{_lib}/libiberty.a
b4c37c30 296
539d7886 297%{_mandir}/man1/%{target}-cpp.1*
d3f237e2 298%{_mandir}/man1/%{target}-gcc.1*
539d7886 299%{_mandir}/man1/%{target}-gcov.1*
d3f237e2
JB
300
301%files c++
302%defattr(644,root,root,755)
83afd976
ŁK
303%attr(755,root,root) %{_bindir}/%{target}-g++
304%attr(755,root,root) %{arch}/bin/%{target}-c++
305%attr(755,root,root) %{arch}/bin/%{target}-g++
306%attr(755,root,root) %{arch}/bin/cc1plus
307
d3f237e2
JB
308%{_mandir}/man1/%{target}-g++.1*
309
83afd976
ŁK
310# no obj-c, fortran, java for the moment
311%if 0
d3f237e2
JB
312%files objc
313%defattr(644,root,root,755)
314%attr(755,root,root) %{gcclib}/cc1obj
95f44aa0 315%{arch}/lib/libobjc.a
316%{arch}/lib/libobjc.la
d3f237e2 317
52a544a1 318%files fortran
d3f237e2 319%defattr(644,root,root,755)
52a544a1 320%attr(755,root,root) %{_bindir}/%{target}-gfortran
321%attr(755,root,root) %{arch}/bin/gfortran
322%attr(755,root,root) %{gcclib}/f951
323%{arch}/lib/libgfortran.a
324%{arch}/lib/libgfortran.la
325%{arch}/lib/libgfortranbegin.a
326%{arch}/lib/libgfortranbegin.la
327%{_mandir}/man1/%{target}-gfortran.1*
d3f237e2 328
d3f237e2
JB
329%files java
330%defattr(644,root,root,755)
331%attr(755,root,root) %{_bindir}/%{target}-gcj
b4c37c30 332%attr(755,root,root) %{_bindir}/%{target}-gcjh
152664fa 333%attr(755,root,root) %{_bindir}/%{target}-gjnih
a0d467f7 334%attr(755,root,root) %{_bindir}/%{target}-grepjar
52a544a1 335%attr(755,root,root) %{_bindir}/%{target}-fastjar
7fc2a2bb
JB
336%attr(755,root,root) %{_bindir}/%{target}-jcf-dump
337%attr(755,root,root) %{_bindir}/%{target}-jv-scan
a0d467f7 338#%attr(755,root,root) %{arch}/bin/grepjar
339#%attr(755,root,root) %{arch}/bin/jar
d3f237e2
JB
340%attr(755,root,root) %{gcclib}/jc1
341%attr(755,root,root) %{gcclib}/jvgenmain
d12aabe0 342%{_mandir}/man1/%{target}-gcj.1*
539d7886 343%{_mandir}/man1/%{target}-gcjh.1*
152664fa 344%{_mandir}/man1/%{target}-gjnih.1*
7fc2a2bb 345%{_mandir}/man1/%{target}-grepjar.1*
52a544a1 346%{_mandir}/man1/%{target}-fastjar.1*
539d7886
JB
347%{_mandir}/man1/%{target}-jcf-dump.1*
348%{_mandir}/man1/%{target}-jv-scan.1*
83afd976 349%endif
This page took 0.080194 seconds and 4 git commands to generate.