X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=crossmingw32-gcc.spec;h=f198d4a15f5bb8f57b44ac79bcf4224023d056ef;hb=0d9cd0a82ba78761b0b44aec811b7ce4f4ee1a00;hp=b1404ef2fa8c8d12745d8265ba6e52230952c5be;hpb=6df34e9f65fe8654ce160c99a81d84c5e80ef9ed;p=packages%2Fcrossmingw32-gcc.git diff --git a/crossmingw32-gcc.spec b/crossmingw32-gcc.spec index b1404ef..f198d4a 100644 --- a/crossmingw32-gcc.spec +++ b/crossmingw32-gcc.spec @@ -1,305 +1,382 @@ -Summary: Mingw32 Binary Utility Development Utilities - gcc -Summary(pl): Zestaw narzêdzi mingw32 - gcc +# +# TODO: +# - openmp +# +# Conditional build: +%bcond_with bootstrap # bootstrap build (using binary w32api/mingwrt) +# +Summary: Cross MinGW32 GNU binary utility development utilities - gcc +Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - MinGW32 gcc +Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - MinGW32 gcc +Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla MinGW32 - gcc +Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - MinGW32 gcc +Summary(tr.UTF-8): GNU geliştirme araçları - MinGW32 gcc Name: crossmingw32-gcc -Version: 2.95.3 -Release: 7 +Version: 4.5.1 +Release: 1 Epoch: 1 -License: GPL +License: GPL v3+ Group: Development/Languages -ExclusiveArch: %{ix86} -Source0: ftp://ftp.gnu.org/pub/gnu/gcc-%{version}.tar.gz -Patch0: gcc-info.patch -Patch1: gcc-pld-linux.patch -Patch2: gcc-libstdc++.patch -Patch3: gcc-bootstrap.patch -Patch4: gcc-cpp-macro-doc.patch -Patch5: gcc-default-arch.patch -Patch6: gcc-libstdc++-out-of-mem.patch -Patch7: gcc-libstdc++-wstring.patch -Patch8: gcc-libstdc++-bastring.patch -Patch9: gcc-manpage.patch -Patch10: gcc-cpp-dos-newlines.patch -Patch11: gcc-gpc.patch -Patch12: gcc-m68k-pic.patch -Patch13: gcc-sparc32-rfi.patch -Patch14: gcc-builtin-apply.patch -Patch15: gcc-ppc-ice.patch -Patch16: gcc-ppc-descriptions.patch -Patch17: gcc-alpha-complex-float.patch -Patch18: gcc-gcj-vs-iconv.patch -Patch19: gcc-libobjc.patch -Patch20: gcc-pointer-arith.patch -Patch21: gcc-crtendS.patch -Patch22: %{name}-libio.patch -Patch23: %{name}-includes.patch -Patch24: %{name}-libiberty.patch -BuildRequires: crossmingw32-platform -BuildRequires: crossmingw32-binutils -BuildRequires: flex -BuildRequires: bison +Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2 +# Source0-md5: 48231a8e33ed6e058a341c53b819de1a +%define apiver 3.15 +Source1: http://downloads.sourceforge.net/mingw/w32api-%{apiver}-1-mingw32-dev.tar.lzma +# Source1-md5: efcbcadd0299a6413d95b9ce919ede9f +%define runver 3.18 +Source2: http://downloads.sourceforge.net/mingw/mingwrt-%{runver}-mingw32-dev.tar.gz +# Source2-md5: e49803d8c14b1ffa6e24e5b5fee31a3d +# 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 +Patch100: gcc-branch.diff +Patch0: %{name}-buildsystem1.patch +Patch1: %{name}-buildsystem2.patch +Patch2: %{name}-lfs.patch BuildRequires: autoconf -Requires: crossmingw32-binutils -Requires: crossmingw32-platform +BuildRequires: automake +BuildRequires: bison +BuildRequires: crossmingw32-binutils >= 2.15.91.0.2-2 +BuildRequires: flex +BuildRequires: libmpc-devel +%if %{without bootstrap} +BuildRequires: crossmingw32-runtime >= 3.5 +BuildRequires: crossmingw32-w32api >= 3.1 +%endif +BuildRequires: mpfr-devel +BuildRequires: texinfo >= 4.2 +%if %{with booststrap} +BuildRequires: tar >= 1:1.22 +BuildRequires: xz +%endif +Requires: crossmingw32-binutils >= 2.15.91.0.2-2 +Requires: gcc-dirs BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define target i386-mingw32 -%define target_platform i386-pc-mingw32 -%define _prefix /usr -%define arch %{_prefix}/%{target} -%define gccarch %{_prefix}/lib/gcc-lib/%{target} -%define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version} +%define sysprefix /usr +%define arch %{sysprefix}/%{target} +%define gccarchdir %{_libdir}/gcc/%{target} +%define gcclibdir %{gccarchdir}/%{version} +%define _dlldir /usr/share/wine/windows/system + +%define _noautostrip .*/lib.*\\.a + +%define _enable_debug_packages 0 %description crossmingw32 is a complete cross-compiling development system for building stand-alone Microsoft Windows applications under Linux using -the Mingw32 build libraries. This includes a binutils, gcc with g++ +the MinGW32 build libraries. This includes a binutils, gcc with g++ and objc, and libstdc++, all cross targeted to i386-mingw32, along with supporting Win32 libraries in 'coff' format from free sources. This package contains cross targeted gcc. -%description -l pl -crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym -budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32. -System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie -generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie -COFF. +%description -l de.UTF-8 +Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem +anderem Rechner Code für Win32 zu generieren. + +%description -l pl.UTF-8 +crossmingw32 jest kompletnym systemem do kompilacji skrośnej, +pozwalającym budować aplikacje MS Windows pod Linuksem używając +bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc, +libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz +z bibliotek w formacie COFF. -Ten pakiet zawiera gcc generuj±ce kod dla Win32. +Ten pakiet zawiera gcc generujące skrośnie kod dla Win32. + +%package -n crossmingw32-libgcc-dll +Summary: libgcc DLL library for Windows +Summary(pl.UTF-8): Biblioteka DLL libgcc dla Windows +Group: Applications/Emulators +Requires: wine + +%description -n crossmingw32-libgcc-dll +libgcc DLL library for Windows. + +%description -n crossmingw32-libgcc-dll -l pl.UTF-8 +Biblioteka DLL libgcc dla Windows. %package c++ -Summary: Mingw32 Binary Utility Development Utilities - g++ -Summary(pl): Zestaw narzêdzi mingw32 - g++ +Summary: MinGW32 binary utility development utilities - g++ +Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - g++ Group: Development/Languages -Requires: %{name} = %{version} +Requires: %{name} = %{epoch}:%{version}-%{release} %description c++ crossmingw32 is a complete cross-compiling development system for building stand-alone Microsoft Windows applications under Linux using -the Mingw32 build libraries. This includes a binutils, gcc with g++ +the MinGW32 build libraries. This includes a binutils, gcc with g++ and objc, and libstdc++, all cross targeted to i386-mingw32, along with supporting Win32 libraries in 'coff' format from free sources. This package contains cross targeted g++ and (static) libstdc++. -%description c++ -l pl -crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym -budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32. -System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie -generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie -COFF. +%description c++ -l pl.UTF-8 +crossmingw32 jest kompletnym systemem do kompilacji skrośnej, +pozwalającym budować aplikacje MS Windows pod Linuksem używając +bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc, +libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz +z bibliotek w formacie COFF. -Ten pakiet zawiera g++ generuj±ce kod pod Win32 oraz bibliotekê +Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę libstdc++. -# does this even work? +%package -n crossmingw32-libstdc++-static +Summary: Static standard C++ library - cross MinGW32 version +Summary(pl.UTF-8): Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32 +Group: Development/Libraries +Requires: %{name}-c++ = %{epoch}:%{version}-%{release} + +%description -n crossmingw32-libstdc++-static +Static standard C++ library - cross MinGW32 version. + +%description -n crossmingw32-libstdc++-static -l pl.UTF-8 +Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32. + +%package -n crossmingw32-libstdc++-dll +Summary: libstdc++ DLL library for Windows +Summary(pl.UTF-8): Biblioteka DLL libstdc++ dla Windows +Group: Applications/Emulators +Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release} +Requires: wine + +%description -n crossmingw32-libstdc++-dll +libstdc++ DLL library for Windows. + +%description -n crossmingw32-libstdc++-dll -l pl.UTF-8 +Biblioteka DLL libstdc++ dla Windows. + %package objc -Summary: Mingw32 Binary Utility Development Utilities - objc -Summary(pl): Zestaw narzêdzi mingw32 - objc +Summary: MinGW32 binary utility development utilities - objc +Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - objc Group: Development/Languages -Requires: %{name} = %{version} +Requires: %{name} = %{epoch}:%{version}-%{release} %description objc crossmingw32 is a complete cross-compiling development system for building stand-alone Microsoft Windows applications under Linux using -the Mingw32 build libraries. This includes a binutils, gcc with g++ +the MinGW32 build libraries. This includes a binutils, gcc with g++ and objc, and libstdc++, all cross targeted to i386-mingw32, along with supporting Win32 libraries in 'coff' format from free sources. -This package contains cross targeted objc. +This package contains cross targeted objc compiler. -%description objc -l pl -crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym -budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32. -System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie -generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie -COFF. +%description objc -l pl.UTF-8 +crossmingw32 jest kompletnym systemem do kompilacji skrośnej, +pozwalającym budować aplikacje MS Windows pod Linuksem używając +bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc, +libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz +z bibliotek w formacie COFF. -Ten pakiet zawiera kompilator objc generuj±cy kod pod Win32. +Ten pakiet zawiera kompilator objc generujący kod pod Win32. -# does this even work? -%package g77 -Summary: Mingw32 Binary Utility Development Utilities - g77 -Summary(pl): Zestaw narzêdzi mingw32 - g77 -Group: Development/Languages -Requires: %{name} = %{version} +%package -n crossmingw32-libobjc-static +Summary: Static Objective C library - cross MinGW32 version +Summary(pl.UTF-8): Statyczna biblioteka Objective C - wersja skrośna MinGW32 +Group: Development/Libraries +Requires: %{name}-objc = %{epoch}:%{version}-%{release} -%description g77 -crossmingw32 is a complete cross-compiling development system for -building stand-alone Microsoft Windows applications under Linux using -the Mingw32 build libraries. This includes a binutils, gcc with g++ -and objc, and libstdc++, all cross targeted to i386-mingw32, along -with supporting Win32 libraries in 'coff' format from free sources. +%description -n crossmingw32-libobjc-static +Static Objective C library - cross MinGW32 version. -This package contains cross targeted g77. +%description -n crossmingw32-libobjc-static -l pl.UTF-8 +Statyczna biblioteka Objective C - wersja skrośna MinGW32. -%description g77 -l pl -crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym -budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32. -System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie -generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie -COFF. +%package -n crossmingw32-libobjc-dll +Summary: libobjc DLL library for Windows +Summary(pl.UTF-8): Biblioteka DLL libobjc dla Windows +Group: Applications/Emulators +Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release} +Requires: wine -Ten pakiet zawiera g77 generuj±cy kod pod Win32. +%description -n crossmingw32-libobjc-dll +libobjc DLL library for Windows. -# does this even work? -%package chill -Summary: Mingw32 Binary Utility Development Utilities - chill -Summary(pl): Zestaw narzêdzi mingw32 - chill +%description -n crossmingw32-libobjc-dll -l pl.UTF-8 +Biblioteka DLL libobjc dla Windows. + +%package fortran +Summary: MinGW32 binary utility development utilities - Fortran +Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - Fortran Group: Development/Languages -Requires: %{name} = %{version} +Requires: %{name} = %{epoch}:%{version}-%{release} +Obsoletes: crossmingw32-gcc-g77 -%description chill +%description fortran crossmingw32 is a complete cross-compiling development system for building stand-alone Microsoft Windows applications under Linux using -the Mingw32 build libraries. This includes a binutils, gcc with g++ +the MinGW32 build libraries. This includes a binutils, gcc with g++ and objc, and libstdc++, all cross targeted to i386-mingw32, along with supporting Win32 libraries in 'coff' format from free sources. -This package contains cross targeted chill. +This package contains cross targeted Fortran compiler. + +%description fortran -l pl.UTF-8 +crossmingw32 jest kompletnym systemem do kompilacji skrośnej, +pozwalającym budować aplikacje MS Windows pod Linuksem używając +bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc, +libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz +z bibliotek w formacie COFF. + +Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32. + +%package -n crossmingw32-libgfortran-static +Summary: Static Fortran library - cross MinGW32 version +Summary(pl.UTF-8): Statyczna biblioteka Fortrana - wersja skrośna MinGW32 +Group: Development/Libraries +Requires: %{name}-fortran = %{epoch}:%{version}-%{release} + +%description -n crossmingw32-libgfortran-static +Static Fortran library - cross MinGW32 version. -%description chill -l pl -crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym -budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32. -System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie -generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie -COFF. +%description -n crossmingw32-libgfortran-static -l pl.UTF-8 +Statyczna biblioteka Fortrana - wersja skrośna MinGW32. -Ten pakiet zawiera kompilator chill generuj±cy kod pod Win32. +%package -n crossmingw32-libgfortran-dll +Summary: libgfortran DLL library for Windows +Summary(pl.UTF-8): Biblioteka DLL libgfortran dla Windows +Group: Applications/Emulators +Requires: wine + +%description -n crossmingw32-libgfortran-dll +libgfortran DLL library for Windows. + +%description -n crossmingw32-libgfortran-dll -l pl.UTF-8 +Biblioteka DLL libgfortran dla Windows. -# does this even work? %package java -Summary: Mingw32 Binary Utility Development Utilities - java -Summary(pl): Zestaw narzêdzi mingw32 - java +Summary: MinGW32 binary utility development utilities - Java +Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - Java Group: Development/Languages -Requires: %{name} = %{version} +Requires: %{name} = %{epoch}:%{version}-%{release} %description java crossmingw32 is a complete cross-compiling development system for building stand-alone Microsoft Windows applications under Linux using -the Mingw32 build libraries. This includes a binutils, gcc with g++ +the MinGW32 build libraries. This includes a binutils, gcc with g++ and objc, and libstdc++, all cross targeted to i386-mingw32, along with supporting Win32 libraries in 'coff' format from free sources. -This package contains cross targeted java. +This package contains cross targeted Java compiler. -%description java -l pl -crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym -budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32. -System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie -generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie -COFF. +%description java -l pl.UTF-8 +crossmingw32 jest kompletnym systemem do kompilacji skrośnej, +pozwalającym budować aplikacje MS Windows pod Linuksem używając +bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc, +libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz +z bibliotek w formacie COFF. -Ten pakiet zawiera kompilator Javy generuj±cy kod pod Win32. +Ten pakiet zawiera kompilator Javy generujący kod pod Win32. %prep %setup -q -n gcc-%{version} +%patch100 -p0 %patch0 -p1 -%patch1 -p1 %patch2 -p1 -%patch3 -p1 -%patch4 -p0 -%patch5 -p0 -%patch6 -p0 -%patch7 -p0 -%patch8 -p0 -%patch9 -p0 -%patch10 -p0 -%patch11 -p1 -%ifarch m68k -%patch12 -p0 -%endif -%ifarch sparc sparc32 -%patch13 -p0 -%patch14 -p0 -%endif -%ifarch ppc -%patch15 -p0 -%patch16 -p0 -%endif -%ifarch alpha -%patch17 -p1 + +%if %{with bootstrap} +# note: "winsup" dirs below are special, handled by gcc's configure +install -d winsup/{mingw,w32api} +tar xf %{SOURCE1} -C winsup/w32api +tar xf %{SOURCE2} -C winsup/mingw %endif -%patch18 -p0 -%patch19 -p0 -%patch20 -p0 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 -%patch24 -p1 +# override snapshot version. +echo %{version} > gcc/BASE-VER +echo "release" > gcc/DEV-PHASE %build -#(cd libiberty ; autoconf) -(cd gcc ; autoconf) -rm -rf obj-%{target_platform} -install -d obj-%{target_platform} -cd obj-%{target_platform} +rm -rf builddir && install -d builddir && cd builddir +%if %{with bootstrap} +install -d %{target}/winsup +ln -sf ../../../winsup/mingw/lib %{target}/winsup/mingw +ln -sf ../../../winsup/w32api %{target}/winsup/w32api +WINSUPDIR=$(cd ..; pwd)/winsup +%endif -CFLAGS="%{rpmcflags}" CXXFLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}" \ +CC="%{__cc}" \ +CFLAGS="%{rpmcflags}" \ +CXXFLAGS="%{rpmcxxflags}" \ +TEXCONFIG=false \ ../configure \ - --prefix=%{_prefix} \ + --prefix=%{sysprefix} \ + --bindir=%{arch}/bin \ + --libdir=%{_libdir} \ + --includedir=%{arch}/include \ + --libexecdir=%{_libdir} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ - --bindir=%{arch}/bin \ + %{!?with_bootstrap:--with-headers=%{arch}/include} \ + --with-libs=%{!?with_bootstrap:%{arch}/lib}%{?with_bootstrap:${WINSUPDIR}/mingw/lib} \ + --with-build-time-tools=%{arch}/bin \ + --with-dwarf2 \ --with-gnu-as \ --with-gnu-ld \ - --with-gxx-include-dir=%{arch}/include/g++ \ + --with-mangler-in-ld \ + --with-long-double-128 \ + --enable-threads \ + --enable-languages="c,c++,fortran,java,objc" \ + --enable-c99 \ + --enable-long-long \ + --enable-fully-dynamic-string \ + --enable-libstdcxx-allocator=new \ + --enable-version-specific-runtime-libs \ + --enable-shared \ + --disable-nls \ + --disable-symvers \ + --disable-sjlj-exceptions \ + --disable-win32-registry \ + --disable-multilib \ + --disable-libssp \ --target=%{target} -# to nie dzia³a bo kto¶ ukrad³ gthr-win32.h i nie wiem co tam wpisaæ -# --enable-threads \ - -touch ../gcc/c-gperf.h - -%{__make} \ - LDFLAGS_FOR_TARGET="%{rpmldflags}" \ - TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" - -# build libobjc.dll for Objective C -# to trzeba wywo³ywaæ z katalogu obj-%{target_platform}/%{target}/libobjc -# ale trzeba podaæ jeszcze GCC_FOR_TARGET - a mi siê nie chce. -# BTW, ten dll jest do czego¶ potrzebny??? -# -#make \ -# LDFLAGS="%{rpmldflags}" \ -# TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \ -# DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll - -# spec files for msvcrt*.dll configurations -cd gcc -for n in msvcrt msvcrt20 msvcrt40; do - sed "s/crtdll/$n/g" specs.$n -done +cd .. +%{__make} -C builddir all-host +patch -p1 <%{PATCH1} +%{__make} -C builddir %install rm -rf $RPM_BUILD_ROOT - install -d $RPM_BUILD_ROOT%{_bindir} -install -d $RPM_BUILD_ROOT%{_datadir} -(cd obj-%{target_platform} - -%{__make} install \ - prefix=$RPM_BUILD_ROOT%{_prefix} \ - bindir=$RPM_BUILD_ROOT%{arch}/bin \ - mandir=$RPM_BUILD_ROOT%{_mandir} \ - infodir=$RPM_BUILD_ROOT%{_infodir} \ - gxx_include_dir=$RPM_BUILD_ROOT%{arch}/include/g++ -cd gcc -install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib} -) - -mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir} - -# c++filt is provided by binutils -rm -f $RPM_BUILD_ROOT%{_bindir}/i386-mingw32-c++filt - -# what is this there for??? -rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a +%{__make} -C builddir install \ + DESTDIR=$RPM_BUILD_ROOT + +# host (ELF) library +%{__rm} $RPM_BUILD_ROOT%{_libdir}/libiberty.a + +mv $RPM_BUILD_ROOT%{gcclibdir}/include-fixed/{limits,syslimits}.h $RPM_BUILD_ROOT%{gcclibdir}/include +%{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/include-fixed +%{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/install-tools + +# make links in host bindir +ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc +ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-g++ $RPM_BUILD_ROOT%{_bindir}/%{target}-g++ +ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-cpp $RPM_BUILD_ROOT%{_bindir}/%{target}-cpp +ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-gcov $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov +ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-gcj $RPM_BUILD_ROOT%{_bindir}/%{target}-gcj +ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-jcf-dump $RPM_BUILD_ROOT%{_bindir}/%{target}-jcf-dump +ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-gfortran $RPM_BUILD_ROOT%{_bindir}/%{target}-gfortran + +# DLLs +install -d $RPM_BUILD_ROOT%{_dlldir} +mv -f $RPM_BUILD_ROOT%{arch}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} +if [ ! -f $RPM_BUILD_ROOT%{_dlldir}/libgcc_s_dw2-1.dll ]; then + echo "libgcc DLL not installed?" + install builddir/i386-mingw32/libgcc/shlib/libgcc_s_dw2-1.dll $RPM_BUILD_ROOT%{_dlldir} +fi + +%if 0%{!?debug:1} +%{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll +%{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{gcclibdir}/lib*.a \ + $RPM_BUILD_ROOT%{arch}/lib/lib*.a +%endif -# the same... make hardlink -ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc +# already in native gcc +%{__rm} -r $RPM_BUILD_ROOT%{_infodir} +# common FSF man pages +%{__rm} $RPM_BUILD_ROOT%{_mandir}/man7/{fsf-funding,gfdl,gpl}.7 +# programs not packaged +%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/%{target}-{aot-compile,gc-analyze,gcj-dbtool,gij,grmic,jv-convert,rebuild-gcj-db}.1 %clean rm -rf $RPM_BUILD_ROOT @@ -307,70 +384,103 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/%{target}-gcc -%attr(755,root,root) %{_bindir}/%{target}-*protoize -%dir %{arch}/bin -%attr(755,root,root) %{arch}/bin/cpp +%attr(755,root,root) %{_bindir}/%{target}-cpp +%attr(755,root,root) %{_bindir}/%{target}-gcov +%attr(755,root,root) %{arch}/bin/%{target}-gcc +%attr(755,root,root) %{arch}/bin/%{target}-gcc-%{version} +%attr(755,root,root) %{arch}/bin/%{target}-gccbug +%attr(755,root,root) %{arch}/bin/%{target}-cpp +%attr(755,root,root) %{arch}/bin/%{target}-gcov %attr(755,root,root) %{arch}/bin/gcc -%attr(755,root,root) %{arch}/bin/gcov -%{arch}/include/_G_config.h %{arch}/lib/libiberty.a -%dir %{gccarch} -%dir %{gcclib} -%attr(755,root,root) %{gcclib}/cc1 -%attr(755,root,root) %{gcclib}/cpp0 -%{gcclib}/SYSCALLS.c.X -%{gcclib}/libgcc.a -%{gcclib}/specs* -%dir %{gcclib}/include -%{gcclib}/include/float.h -%{gcclib}/include/iso646.h -%{gcclib}/include/limits.h -%{gcclib}/include/proto.h -%{gcclib}/include/stdarg.h -%{gcclib}/include/stdbool.h -%{gcclib}/include/stddef.h -%{gcclib}/include/syslimits.h -%{gcclib}/include/varargs.h -%{gcclib}/include/va-*.h +%dir %{gccarchdir} +%dir %{gcclibdir} +%attr(755,root,root) %{gcclibdir}/cc1 +%attr(755,root,root) %{gcclibdir}/collect2 +%attr(755,root,root) %{gcclibdir}/lto-wrapper +%{gcclibdir}/libgcc.a +%{gcclibdir}/libgcc_eh.a +%{gcclibdir}/libgcc_s.a +%{gcclibdir}/libgcov.a +%dir %{gcclibdir}/include +%{gcclibdir}/include/*.h +%{_mandir}/man1/%{target}-cpp.1* %{_mandir}/man1/%{target}-gcc.1* +%{_mandir}/man1/%{target}-gcov.1* + +%files -n crossmingw32-libgcc-dll +%defattr(644,root,root,755) +%{_dlldir}/libgcc_s_dw2-1.dll %files c++ %defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/%{target}-[cg]++ -%{arch}/include/g++ -%{arch}/lib/libstdc++.a -%attr(755,root,root) %{gcclib}/cc1plus -%{gcclib}/libstdc++* -%{gcclib}/include/new.h -%{gcclib}/include/exception -%{gcclib}/include/new -%{gcclib}/include/typeinfo +%attr(755,root,root) %{_bindir}/%{target}-g++ +%attr(755,root,root) %{arch}/bin/%{target}-c++ +%attr(755,root,root) %{arch}/bin/%{target}-g++ +%attr(755,root,root) %{arch}/bin/c++ +%attr(755,root,root) %{arch}/bin/g++ +%attr(755,root,root) %{gcclibdir}/cc1plus +%{gcclibdir}/libstdc++.dll.a +%{gcclibdir}/libstdc++.la +%{gcclibdir}/libsupc++.la +%{gcclibdir}/libsupc++.a +%{gcclibdir}/crtbegin.o +%{gcclibdir}/crtend.o +%{gcclibdir}/crtfastmath.o +%{gcclibdir}/include/c++ %{_mandir}/man1/%{target}-g++.1* +%files -n crossmingw32-libstdc++-static +%defattr(644,root,root,755) +%{gcclibdir}/libstdc++.a + +%files -n crossmingw32-libstdc++-dll +%defattr(644,root,root,755) +%{_dlldir}/libstdc++-6.dll + %files objc %defattr(644,root,root,755) -%attr(755,root,root) %{gcclib}/cc1obj -%{gcclib}/libobjc.a -%{gcclib}/include/objc +%attr(755,root,root) %{gcclibdir}/cc1obj +%{gcclibdir}/libobjc.dll.a +%{gcclibdir}/libobjc.la +%{gcclibdir}/include/objc + +%files -n crossmingw32-libobjc-static +%defattr(644,root,root,755) +%{gcclibdir}/libobjc.a -%files g77 +%files -n crossmingw32-libobjc-dll +%defattr(644,root,root,755) +%{_dlldir}/libobjc-2.dll + +%files fortran +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/%{target}-gfortran +%attr(755,root,root) %{arch}/bin/%{target}-gfortran +%attr(755,root,root) %{arch}/bin/gfortran +%attr(755,root,root) %{gcclibdir}/f951 +%{gcclibdir}/finclude +%{gcclibdir}/libgfortran.dll.a +%{gcclibdir}/libgfortran.la +%{gcclibdir}/libgfortranbegin.a +%{gcclibdir}/libgfortranbegin.la +%{_mandir}/man1/%{target}-gfortran.1* + +%files -n crossmingw32-libgfortran-static %defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/%{target}-g77 -%attr(755,root,root) %{gcclib}/f771 -%{_mandir}/man1/%{target}-g77.1* +%{gcclibdir}/libgfortran.a -%files chill +%files -n crossmingw32-libgfortran-dll %defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/%{target}-chill -%attr(755,root,root) %{gcclib}/cc1chill -%{gcclib}/chillrt0.o -%{gcclib}/libchill.a +%{_dlldir}/libgfortran-3.dll %files java %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/%{target}-gcj -%attr(755,root,root) %{arch}/bin/gcjh -%attr(755,root,root) %{arch}/bin/jcf-dump -%attr(755,root,root) %{arch}/bin/jv-scan -%attr(755,root,root) %{gcclib}/jc1 -%attr(755,root,root) %{gcclib}/jvgenmain +%attr(755,root,root) %{_bindir}/%{target}-jcf-dump +%attr(755,root,root) %{arch}/bin/%{target}-gcj +%attr(755,root,root) %{arch}/bin/%{target}-jcf-dump +%attr(755,root,root) %{gcclibdir}/jc1 +%attr(755,root,root) %{gcclibdir}/jvgenmain +%{_mandir}/man1/%{target}-gcj.1* +%{_mandir}/man1/%{target}-jcf-dump.1*