Update to 4.3.2 and patch to workaround build problems on Fedora 10
[fedora-mingw.git] / gcc / mingw-gcc.spec
1 %define __os_install_post /usr/lib/rpm/brp-compress %{nil}
2
3 Name:           mingw-gcc
4 Version:        4.3.2
5 Release:        3%{?dist}
6 Summary:        MinGW Windows cross-compiler (GCC) for C and C++
7
8 License:        GPLv2+
9 Group:          Development/Libraries
10 URL:            http://www.mingw.org/
11 Source0:        ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-core-%{version}.tar.bz2
12 Source1:        ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-g++-%{version}.tar.bz2
13 Patch1:         %{name}-build.patch
14 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
15
16 BuildRequires:  texinfo
17 BuildRequires:  mingw-binutils
18 BuildRequires:  mingw-runtime
19 BuildRequires:  mingw-w32api
20 BuildRequires:  gmp-devel
21 BuildRequires:  mpfr-devel
22 BuildRequires:  libgomp
23
24 Requires:       mingw-binutils
25 Requires:       mingw-runtime
26 Requires:       mingw-w32api
27
28
29 %description
30 MinGW Windows cross-compiler (GCC) for C and C++.
31
32
33 %prep
34 %setup -q -c
35 %setup -q -D -T -a1
36 %patch1 -p1
37
38 %build
39 cd gcc-%{version}
40
41 mkdir -p build
42 cd build
43
44 #languages="c,c++"
45 languages="c"
46 # XXX C++ disabled for now because of a strange GCC bug.
47
48 CC="%{__cc} ${RPM_OPT_FLAGS}" \
49 ../configure \
50   --prefix=%{_prefix} \
51   --bindir=%{_bindir} \
52   --includedir=%{_includedir} \
53   --libdir=%{_libdir} \
54   --mandir=%{_mandir} \
55   --infodir=%{_infodir} \
56   --datadir=%{_datadir} \
57   --build=%_build --host=%_host \
58   --target=i686-pc-mingw32 \
59   --with-gnu-as --with-gnu-ld --verbose \
60   --without-newlib \
61   --disable-multilib \
62   --with-system-zlib \
63   --disable-nls --without-included-gettext \
64   --disable-win32-registry \
65   --enable-version-specific-runtime-libs \
66   --with-sysroot=%{_prefix}/i686-pc-mingw32/sys-root \
67   --enable-languages="$languages" $optargs
68
69 make all
70
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74
75 cd gcc-%{version}
76 cd build
77 make DESTDIR=$RPM_BUILD_ROOT install
78
79 # These files conflict with existing installed files.
80 rm -rf $RPM_BUILD_ROOT%{_infodir}
81 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty*
82 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/*
83
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88
89 %files
90 %defattr(-,root,root)
91 %{_prefix}/i686-pc-mingw32/lib/libiberty.a
92 %{_libdir}/gcc/i686-pc-mingw32
93 %{_libexecdir}/gcc/i686-pc-mingw32
94 %{_bindir}/i686-pc-mingw32-*
95 %{_mandir}/man1/i686-pc-mingw32-*
96
97
98 %changelog
99 * Mon Jul  7 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.1-3
100 - Initial RPM release, largely based on earlier work from several sources.