X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=crossmingw32-gcc.spec;h=172b049ea9e0c634a93476e99ad678bc156a2e8a;hb=HEAD;hp=b0341248e101bf1fe8ea11a7c3906a16acf67f5c;hpb=7ab8b946e73837c8a64ac358f7f8c0c8adc05d5c;p=packages%2Fcrossmingw32-gcc.git diff --git a/crossmingw32-gcc.spec b/crossmingw32-gcc.spec index b034124..172b049 100644 --- a/crossmingw32-gcc.spec +++ b/crossmingw32-gcc.spec @@ -1,344 +1,805 @@ -%bcond_with bootstrap -%define DASHED_SNAP %{nil} -%define SNAP %(echo %{DASHED_SNAP} | sed -e "s#-##g") -%define GCC_VERSION 3.3.2 -%define apiver 2.4 -%define apisrc w32api-%{apiver} -%define runver 3.2 -%define runsrc mingw-runtime-%{runver} -Summary: Cross Mingw32 GNU binary utility development utilities - gcc -Summary(es): Utilitarios para desarrollo de binarios de la GNU - Mingw32 gcc -Summary(fr): Utilitaires de développement binaire de GNU - Mingw32 gcc -Summary(pl): Skro¶ne narzêdzia programistyczne GNU dla Mingw32 - gcc -Summary(pt_BR): Utilitários para desenvolvimento de binários da GNU - Mingw32 gcc -Summary(tr): GNU geliþtirme araçlarý - Mingw32 gcc +# +# Conditional build: +%bcond_with bootstrap # bootstrap build (using binary w32api/mingwrt, only C/C++, no gomp) +%bcond_without pthreads # POSIX threads support (needed for GOMP and C++ 11 thread/mutex support) +%bcond_without gomp # OpenMP libraries +# +%if %{with bootstrap} +%undefine with_pthreads +%endif +%if %{without pthreads} +%undefine with_gomp +%endif +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: %{GCC_VERSION} +Version: 10.5.0 Release: 1 Epoch: 1 -License: GPL +License: GPL v3+ Group: Development/Languages -Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{GCC_VERSION}/gcc-%{GCC_VERSION}.tar.bz2 -# Source0-md5: 65999f654102f5438ac8562d13a6eced -Source1: http://dl.sourceforge.net/mingw/%{apisrc}.tar.gz -# Source1-md5: 9f9b9a7a7ef14e112924fea46b3360ce -Source2: http://dl.sourceforge.net/mingw/%{runsrc}.tar.gz -# Source2-md5: ecfd49e08f20a88b7ba11a755f2b53c2 -Patch0: %{name}-noioctl.patch -BuildRequires: autoconf -BuildRequires: automake +Source0: https://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.xz +# Source0-md5: c7d1958570fbd1cd859b015774b9987a +%define w32api_ver 5.4.2 +#Source1Download: https://osdn.net/projects/mingw/releases/ +Source1: https://osdn.net/projects/mingw/downloads/74926/w32api-%{w32api_ver}-mingw32-dev.tar.xz +# Source1-md5: 88b0dc6185079e60d83bdbaec92028b8 +%define mingw32_ver 5.4.2 +#Source2Download: https://osdn.net/projects/mingw/releases/ +Source2: https://osdn.net/projects/mingw/downloads/74925/mingwrt-%{mingw32_ver}-mingw32-dev.tar.xz +# Source2-md5: d8dceb05b85602eec82eac4e11d5c027 +Source3: gcc-optimize-la.pl +#Patch100: gcc-branch.diff +Patch0: %{name}-buildsystem1.patch +Patch1: %{name}-buildsystem2.patch +Patch2: %{name}-lfs.patch +Patch3: gcc-mingw32.patch +Patch4: gcc-build-libvtv.patch +Patch5: gcc-pthreads-w32.patch +URL: http://gcc.gnu.org/ +BuildRequires: autoconf >= 2.64 +BuildRequires: automake >= 1:1.11.1 BuildRequires: bison -BuildRequires: crossmingw32-binutils >= 2.14.90.0.4.1-2 -BuildRequires: flex +BuildRequires: crossmingw32-binutils >= 2.30 +%{?with_pthreads:BuildRequires: crossmingw32-pthreads-w32} %if %{without bootstrap} -BuildRequires: crossmingw32-runtime >= 3.0 -BuildRequires: crossmingw32-w32api >= 2.3 +BuildRequires: crossmingw32-runtime >= 3.5 +BuildRequires: crossmingw32-w32api >= 1:5.4.2-3 %endif -Requires: crossmingw32-binutils >= 2.14.90.0.4.1-2 +BuildRequires: flex >= 2.5.4 +BuildRequires: gettext-tools >= 0.14.5 +BuildRequires: gmp-devel >= 4.3.2 +BuildRequires: isl-devel >= 0.15 +BuildRequires: libmpc-devel >= 0.8.1 +BuildRequires: libstdc++-devel +BuildRequires: mpfr-devel >= 3.1.0 +BuildRequires: perl-tools-pod +BuildRequires: tar >= 1:1.22 +BuildRequires: texinfo >= 4.7 +BuildRequires: xz +BuildRequires: zlib-devel +BuildConflicts: pdksh < 5.2.14-50 +Requires: crossmingw32-binutils >= 2.30 +Requires: gcc-dirs +Requires: gmp >= 4.3.2 +Requires: isl >= 0.15 +Requires: libmpc >= 0.8.1 +Requires: mpfr >= 3.1.0 +# java support dropped from gcc 7+ +Obsoletes: crossmingw32-java < 1:7 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define no_install_post_strip 1 - %define target i386-mingw32 -%define target_platform i386-pc-mingw32 -%define arch %{_prefix}/%{target} -%define gccarch %{_libdir}/gcc-lib/%{target} -%define gcclib %{_libdir}/gcc-lib/%{target}/%{version} +%define sysprefix /usr +%define archprefix %{sysprefix}/%{target} +%define archbindir %{archprefix}/bin +%define archincludedir %{archprefix}/include +%define archlibdir %{archprefix}/lib +%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 + +# functions with printf format attribute but with special parser and also +# receiving non constant format strings +%define Werror_cflags %{nil} +%define _ssp_cflags %{nil} +# -fPIC is not valid for target platform +%define filterout_c -fPIC %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 de -Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem -i386-Rechner Code für Win32 zu generieren. +%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 -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 +%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 skro¶nie 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 -n crossmingw32-libatomic +Summary: The GNU Atomic library - cross MinGW32 version +Summary(pl.UTF-8): Biblioteka GNU Atomic - wersja skrośna MinGW32 +License: GPL v3+ with GCC Runtime Library Exception v3.1 +Group: Development/Libraries +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description -n crossmingw32-libatomic +This package contains cross MinGW32 version of the GNU Atomic library +which is a GCC support library for atomic operations not supported by +hardware. + +%description -n crossmingw32-libatomic -l pl.UTF-8 +Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GNU Atomic, +będącej biblioteką GCC, wspierającej operacje atomowe na sprzęcie ich +nie obsługującym. + +%package -n crossmingw32-libatomic-static +Summary: The GNU Atomic static library - cross MinGW32 version +Summary(pl.UTF-8): Statyczna biblioteka GNU Atomic - wersja skrośna MinGW32 +License: GPL v3+ with GCC Runtime Library Exception v3.1 +Group: Development/Libraries +Requires: crossmingw32-libatomic = %{epoch}:%{version}-%{release} + +%description -n crossmingw32-libatomic-static +The GNU Atomic static library - cross MinGW32 version. + +%description -n crossmingw32-libatomic-static -l pl.UTF-8 +Statyczna biblioteka GNU Atomic - wersja skrośna MinGW32. + +%package -n crossmingw32-libatomic-dll +Summary: DLL GNU Atomic library for Windows +Summary(pl.UTF-8): Biblioteka DLL GNU Atomic dla Windows +License: GPL v3+ with GCC Runtime Library Exception v3.1 +Group: Applications/Emulators +Requires: wine + +%description -n crossmingw32-libatomic-dll +DLL GNU Atomic library for Windows. + +%description -n crossmingw32-libatomic-dll -l pl.UTF-8 +Biblioteka DLL GNU Atomic dla Windows. + +%package -n crossmingw32-libgomp +Summary: GNU OpenMP library - cross MinGW32 version +Summary(pl.UTF-8): Biblioteka GNU OpenMP - wersja skrośna MinGW32 +License: GPL v3+ with GCC Runtime Library Exception v3.1 +Group: Development/Libraries +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description -n crossmingw32-libgomp +This package contains cross MinGW32 version of GNU OpenMP library. + +%description -n crossmingw32-libgomp -l pl.UTF-8 +Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GNU OpenMP. + +%package -n crossmingw32-libgomp-static +Summary: Static GNU OpenMP library - cross MinGW32 version +Summary(pl.UTF-8): Statyczna biblioteka GNU OpenMP - wersja skrośna MinGW32 +License: GPL v3+ with GCC Runtime Library Exception v3.1 +Group: Development/Libraries +Requires: crossmingw32-libgomp = %{epoch}:%{version}-%{release} + +%description -n crossmingw32-libgomp-static +Static GNU OpenMP library - cross MinGW32 version. + +%description -n crossmingw32-libgomp-static -l pl.UTF-8 +Statyczna biblioteka GNU OpenMP - wersja skrośna MinGW32. + +%package -n crossmingw32-libgomp-dll +Summary: DLL GNU OpenMP library for Windows +Summary(pl.UTF-8): Biblioteka DLL GNU OpenMP dla Windows +License: GPL v3+ with GCC Runtime Library Exception v3.1 +Group: Applications/Emulators +Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release} +Requires: crossmingw32-pthreads-w32-dll + +%description -n crossmingw32-libgomp-dll +DLL GNU OpenMP library for Windows. + +%description -n crossmingw32-libgomp-dll -l pl.UTF-8 +Biblioteka DLL GNU OpenMP dla Windows. + +%package -n crossmingw32-libvtv +Summary: The Virtual Table Verification library - cross MinGW32 version +Summary(pl.UTF-8): Biblioteka Virtual Table Verification do weryfikacji tablicy wirtualnej - wersja skrośna MinGW32 +License: GPL v3+ with GCC Runtime Library Exception v3.1 +Group: Development/Libraries +URL: https://gcc.gnu.org/wiki/vtv +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description -n crossmingw32-libvtv +This package contains cross MinGW32 version of the Virtual Table +Verification library which is used for -fvtable-verify=... +instrumented programs. + +%description -n crossmingw32-libvtv -l pl.UTF-8 +Ten pakiet zawiera wersję skrośną MinGW32 biblioteki Virtual Table +Verification, służącej do weryfikacji tablicy wirtualnej w programach +kompilowanych z opcją -fvtable-verify=.... + +%package -n crossmingw32-libvtv-static +Summary: The Virtual Table Verification static library - cross MinGW32 version +Summary(pl.UTF-8): Statyczna biblioteka Virtual Table Verification - wersja skrośna MinGW32 +License: GPL v3+ with GCC Runtime Library Exception v3.1 +Group: Development/Libraries +URL: https://gcc.gnu.org/wiki/vtv +Requires: crossmingw32-libvtv = %{epoch}:%{version}-%{release} + +%description -n crossmingw32-libvtv-static +The Virtual Table Verification static library - cross MinGW32 version. + +%description -n crossmingw32-libvtv-static -l pl.UTF-8 +Statyczna biblioteka Virtual Table Verification - wersja skrośna +MinGW32. + +%package -n crossmingw32-libvtv-dll +Summary: DLL Virtual Table Verification libraries for Windows +Summary(pl.UTF-8): Biblioteki DLL Virtual Table Verification dla Windows +License: GPL v3+ with GCC Runtime Library Exception v3.1 +Group: Applications/Emulators +URL: https://gcc.gnu.org/wiki/vtv +Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release} + +%description -n crossmingw32-libvtv-dll +DLL Virtual Table Verification libraries for Windows. + +%description -n crossmingw32-libvtv-dll -l pl.UTF-8 +Biblioteki DLL Virtual Table Verification 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} = %{epoch}:%{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 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 +%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} = %{epoch}:%{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 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 +%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 +%package objc++ +Summary: MinGW32 binary utility development utilities - objc++ +Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - objc++ Group: Development/Languages -Requires: %{name} = %{epoch}:%{version} +Requires: %{name}-objc = %{epoch}:%{version}-%{release} -%description g77 +%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 g77. +This package contains Objective C++ support. -%description g77 -l pl -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 +%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 g77 generuj±cy kod pod Win32. +Ten pakiet zawiera obsługę języka Objective C++. + +%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} -# does this even work? -%package java -Summary: Mingw32 binary utility development utilities - java -Summary(pl): Zestaw narzêdzi mingw32 - java +%description -n crossmingw32-libobjc-static +Static Objective C library - cross MinGW32 version. + +%description -n crossmingw32-libobjc-static -l pl.UTF-8 +Statyczna biblioteka Objective C - wersja skrośna MinGW32. + +%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 + +%description -n crossmingw32-libobjc-dll +libobjc DLL library for Windows. + +%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} = %{epoch}:%{version} +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: crossmingw32-libquadmath = %{epoch}:%{version}-%{release} +Obsoletes: crossmingw32-gcc-g77 < 1:4 -%description java +%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 java. - -%description java -l pl +This package contains cross targeted Fortran compiler. -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 +%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 Javy generuj±cy kod pod Win32. +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 Fortranu - 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 -n crossmingw32-libgfortran-static -l pl.UTF-8 +Statyczna biblioteka Fortranu - wersja skrośna MinGW32. + +%package -n crossmingw32-libgfortran-dll +Summary: libgfortran DLL library for Windows +Summary(pl.UTF-8): Biblioteka DLL libgfortran dla Windows +Group: Applications/Emulators +Requires: crossmingw32-libquadmath-dll + +%description -n crossmingw32-libgfortran-dll +libgfortran DLL library for Windows. + +%description -n crossmingw32-libgfortran-dll -l pl.UTF-8 +Biblioteka DLL libgfortran dla Windows. + +%package -n crossmingw32-libquadmath +Summary: GCC __float128 support library - cross MinGW32 version +Summary(pl.UTF-8): Biblioteka do obsługi typu __float128 - wersja skrośna MinGW32 +License: GPL v2+ with linking exception +Group: Development/Libraries +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description -n crossmingw32-libquadmath +This package contains cross MinGW32 version of GCC support library +which is needed for __float128 math support and for Fortran REAL*16 +support. + +%description -n crossmingw32-libquadmath -l pl.UTF-8 +Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GCC do obsługi +operacji matematycznych na zmiennych typu __float128 oraz typu REAL*16 +w Fortranie. + +%package -n crossmingw32-libquadmath-static +Summary: Static GCC __float128 support library - cross MinGW32 version +Summary(pl.UTF-8): Biblioteka statyczna GCC do obsługi typu __float128 - wersja skrośna MinGW32 +License: GPL v2+ with linking exception +Group: Development/Libraries +Requires: crossmingw32-libquadmath = %{epoch}:%{version}-%{release} + +%description -n crossmingw32-libquadmath-static +Static GCC __float128 support library - cross MinGW32 version. + +%description -n crossmingw32-libquadmath-static -l pl.UTF-8 +Biblioteka statyczna GCC do obsługi typu __float128 - wersja skrośna +MinGW32. + +%package -n crossmingw32-libquadmath-dll +Summary: DLL GCC __float128 support library for Windows +Summary(pl.UTF-8): Biblioteka DLL GCC do obsługi typu __float128 dla Windows +License: GPL v2+ with linking exception +Group: Applications/Emulators +Requires: wine + +%description -n crossmingw32-libquadmath-dll +DLL GCC __float128 support library for Windows. + +%description -n crossmingw32-libquadmath-dll -l pl.UTF-8 +Biblioteka DLL GCC do obsługi typu __float128 dla Windows. %prep -%setup -q -c -cd gcc-%{version} +%setup -q -n gcc-%{version} +#patch100 -p0 +%patch0 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 + %if %{with bootstrap} -mkdir winsup -tar xzf %{SOURCE1} -C winsup -tar xzf %{SOURCE2} -C winsup +# note: "winsup" dirs are special, handled by gcc's configure +install -d winsup/{mingw,w32api} +tar xf %{SOURCE1} -C winsup/w32api +tar xf %{SOURCE2} -C winsup/mingw +# required by _mingw.h +touch winsup/mingw/include/features.h %endif -%patch -p1 + +# override snapshot version. +echo %{version} > gcc/BASE-VER +echo "release" > gcc/DEV-PHASE %build -cd gcc-%{version} +cd libvtv +%{__aclocal} -I .. -I ../config +%{__autoconf} +%{__automake} +cd .. + +rm -rf builddir && install -d builddir && cd builddir %if %{with bootstrap} -for tool in as ar dlltool ld nm ranlib strip ; do - ln -sf %{arch}/bin/$tool winsup/bin/$tool -done -build_tooldir=`pwd`/winsup -%else -build_tooldir=%{arch} +install -d %{target}/winsup +ln -sf ../../../winsup/mingw/lib %{target}/winsup/mingw +ln -sf ../../../winsup/w32api %{target}/winsup/w32api +WINSUPDIR=$(cd ..; pwd)/winsup %endif -cp /usr/share/automake/config.sub . -cp /usr/share/automake/config.sub boehm-gc - -rm -rf obj-%{target_platform} && install -d obj-%{target_platform} && cd obj-%{target_platform} - -# note: alpha's -mieee is not valid for target's g++ +# note: libbacktrace requires at least i486 now +CC="%{__cc}" \ CFLAGS="%{rpmcflags}" \ -%ifarch alpha -CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mieee\>//'`" \ -%else -CXXFLAGS="%{rpmcflags}" \ -%endif -LDFLAGS="%{rpmldflags}" \ +CXXFLAGS="%{rpmcxxflags}" \ TEXCONFIG=false \ +CFLAGS_FOR_TARGET="-O2 -march=i486" \ +CXXFLAGS_FOR_TARGET="-O2 -march=i486" \ ../configure \ - --prefix=%{_prefix} \ + --prefix=%{sysprefix} \ + --bindir=%{archbindir} \ + --libdir=%{_libdir} \ + --includedir=%{archincludedir} \ + --libexecdir=%{_libdir} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ - --bindir=%{arch}/bin \ - --libdir=%{_libdir} \ - --includedir=%{arch}/include \ - --enable-languages="c,c++,f77,java,objc" \ + --with-bugurl="http://bugs.pld-linux.org" \ + --with-build-time-tools=%{archbindir} \ + %{!?with_bootstrap:--with-headers=%{archincludedir}} \ + --with-libs=%{!?with_bootstrap:%{archlibdir}}%{?with_bootstrap:${WINSUPDIR}/mingw/lib} \ + --with-demangler-in-ld \ + --with-dwarf2 \ --with-gnu-as \ --with-gnu-ld \ - --with-gxx-include-dir=%{arch}/include/g++ \ - --enable-threads \ - --build=%{_target_platform} \ - --host=%{_target_platform} \ + --with-long-double-128 \ + --with-pkgversion="PLD-Linux" \ + --enable-c99 \ + --enable-fully-dynamic-string \ + --disable-isl-version-check \ + --enable-languages="c,c++%{!?with_bootstrap:,fortran,objc,obj-c++}" \ + %{?with_bootstrap:--disable-libatomic} \ + --disable-libcc1 \ + --enable-libgomp%{!?with_gomp:=no} \ + %{?with_bootstrap:--disable-libquadmath} \ + --disable-libssp \ + --enable-libstdcxx-allocator=new \ + %{?with_bootstrap:--disable-libvtv} \ + --enable-linker-build-id \ + --enable-long-long \ + --enable-lto \ + --disable-multilib \ + --disable-nls \ + --enable-shared \ + --disable-sjlj-exceptions \ + --disable-symvers \ + --enable-threads%{?with_pthreads:=posix} \ + --disable-werror \ + --disable-win32-registry \ --target=%{target} -#touch ../gcc/c-gperf.h - -%{__make} \ - LDFLAGS_FOR_TARGET="%{rpmldflags}" \ - TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \ - build_tooldir="$build_tooldir" \ - FLAGS_FOR_TARGET="-B${build_tooldir}/bin -B${build_tooldir}/lib -isystem ${build_tooldir}/include -nostdinc" \ - CFLAGS_FOR_TARGET="-nostdinc" \ - NM_FOR_TARGET="%{target}-nm" - -# 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 -C %{target}/libobjc \ -# 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 -cd gcc-%{version} - install -d $RPM_BUILD_ROOT%{_bindir} -install -d $RPM_BUILD_ROOT%{_datadir} -cd obj-%{target_platform} -%{__make} install \ +%{__make} -C builddir install \ DESTDIR=$RPM_BUILD_ROOT -cd gcc -install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib} -cd ../.. - -mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir} - -# already in arch/lib, shouldn't be here -rm -f $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 + +# these must be symlinks: gcclibdir is calculated relatively to real binary path +ln -sf %{archbindir}/%{target}-gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc +ln -sf %{archbindir}/%{target}-g++ $RPM_BUILD_ROOT%{_bindir}/%{target}-g++ +ln -sf %{archbindir}/%{target}-cpp $RPM_BUILD_ROOT%{_bindir}/%{target}-cpp +ln -sf %{archbindir}/%{target}-gcov $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov +ln -sf %{archbindir}/%{target}-gcov-dump $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov-dump +ln -sf %{archbindir}/%{target}-gcov-tool $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov-tool +ln -sf %{archbindir}/%{target}-gfortran $RPM_BUILD_ROOT%{_bindir}/%{target}-gfortran +ln -sf %{archbindir}/%{target}-lto-dump $RPM_BUILD_ROOT%{_bindir}/%{target}-lto-dump + +# DLLs +install -d $RPM_BUILD_ROOT%{_dlldir} +%{__mv} $RPM_BUILD_ROOT%{archlibdir}/*.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} -# strip linux binaries -strip -R .comment -R .note \ - `echo $RPM_BUILD_ROOT{%{_bindir}/*,%{arch}/bin/*} | grep -v gccbug` \ - $RPM_BUILD_ROOT%{gcclib}/{cc1*,f771,jc1,jvgenmain} - -# strip mingw32 libraries -%{target}-strip -g \ - $RPM_BUILD_ROOT%{gcclib}/libgcc.a \ - $RPM_BUILD_ROOT%{arch}/%{_lib}/lib*.a +%{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll +%{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{archlibdir}/lib*.a +%{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{gcclibdir}/lib*.a %endif -# restore hardlinks -ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++} -ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++} +# avoid -L poisoning in *.la +%if %{without bootstrap} +for f in libatomic.la libgfortran.la libobjc.la libquadmath.la %{?with_gomp:libgomp.la} ; do + file="$RPM_BUILD_ROOT%{archlibdir}/$f" + %{__perl} %{SOURCE3} "$file" %{gcclibdir} >"${file}.fixed" + %{__mv} "${file}.fixed" "$file" +done +for f in libcaf_single.la ; do + file="$RPM_BUILD_ROOT%{gcclibdir}/$f" + %{__perl} %{SOURCE3} "$file" %{gcclibdir} >"${file}.fixed" + %{__mv} "${file}.fixed" "$file" +done +%endif -# the same... make hardlink -ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc +# for pretty-printers see native gcc +%{__rm} $RPM_BUILD_ROOT%{archlibdir}/libstdc++.dll.a-gdb.py +%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libstdcxx +# no plugin development for mingw32 (at least for now) +%{__rm} $RPM_BUILD_ROOT%{gcclibdir}/liblto_plugin.la +%{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/plugin +# 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 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/%{target}-gcc* +%attr(755,root,root) %{_bindir}/%{target}-gcc %attr(755,root,root) %{_bindir}/%{target}-cpp %attr(755,root,root) %{_bindir}/%{target}-gcov -%attr(755,root,root) %{arch}/bin/gcc -%{arch}/%{_lib}/libiberty.a +%attr(755,root,root) %{_bindir}/%{target}-gcov-dump +%attr(755,root,root) %{_bindir}/%{target}-gcov-tool +%attr(755,root,root) %{_bindir}/%{target}-lto-dump +%attr(755,root,root) %{archbindir}/%{target}-cpp +%attr(755,root,root) %{archbindir}/%{target}-gcc +%attr(755,root,root) %{archbindir}/%{target}-gcc-%{version} +%attr(755,root,root) %{archbindir}/%{target}-gcc-ar +%attr(755,root,root) %{archbindir}/%{target}-gcc-nm +%attr(755,root,root) %{archbindir}/%{target}-gcc-ranlib +%attr(755,root,root) %{archbindir}/%{target}-gcov +%attr(755,root,root) %{archbindir}/%{target}-gcov-dump +%attr(755,root,root) %{archbindir}/%{target}-gcov-tool +%attr(755,root,root) %{archbindir}/%{target}-lto-dump +%{archlibdir}/libgcc_s.a +%dir %{gccarchdir} +%dir %{gcclibdir} +%attr(755,root,root) %{gcclibdir}/cc1 +%attr(755,root,root) %{gcclibdir}/collect2 +%attr(755,root,root) %{gcclibdir}/lto-wrapper +%attr(755,root,root) %{gcclibdir}/lto1 +%attr(755,root,root) %{gcclibdir}/liblto_plugin.so* +%{gcclibdir}/libgcc.a +%{gcclibdir}/libgcc_eh.a +%{gcclibdir}/libgcov.a +%{gcclibdir}/crtbegin.o +%{gcclibdir}/crtend.o +%{gcclibdir}/crtfastmath.o +%dir %{gcclibdir}/include +%{gcclibdir}/include/*.h +%{_mandir}/man1/%{target}-cpp.1* +%{_mandir}/man1/%{target}-gcc.1* +%{_mandir}/man1/%{target}-gcov.1* +%{_mandir}/man1/%{target}-gcov-dump.1* +%{_mandir}/man1/%{target}-gcov-tool.1* +%{_mandir}/man1/%{target}-lto-dump.1* -%dir %{gccarch} -%dir %{gcclib} -%attr(755,root,root) %{gcclib}/cc1 -%{gcclib}/libgcc.a -%{gcclib}/specs* -%{gcclib}/include +%files -n crossmingw32-libgcc-dll +%defattr(644,root,root,755) +%{_dlldir}/libgcc_s_dw2-1.dll -%{_mandir}/man1/%{target}-gcc.1* +%if %{without bootstrap} +%files -n crossmingw32-libatomic +%defattr(644,root,root,755) +%{archlibdir}/libatomic.dll.a +%{archlibdir}/libatomic.la + +%files -n crossmingw32-libatomic-static +%defattr(644,root,root,755) +%{archlibdir}/libatomic.a + +%files -n crossmingw32-libatomic-dll +%defattr(644,root,root,755) +%{_dlldir}/libatomic-1.dll +%endif + +%if %{with gomp} +%files -n crossmingw32-libgomp +%defattr(644,root,root,755) +%{archlibdir}/libgomp.dll.a +%{archlibdir}/libgomp.la +%{archlibdir}/libgomp.spec + +%files -n crossmingw32-libgomp-static +%defattr(644,root,root,755) +%{archlibdir}/libgomp.a + +%files -n crossmingw32-libgomp-dll +%defattr(644,root,root,755) +%{_dlldir}/libgomp-1.dll +%endif + +%if %{without bootstrap} +%files -n crossmingw32-libvtv +%defattr(644,root,root,755) +%{archlibdir}/libvtv.dll.a +%{archlibdir}/libvtv.la +%{archlibdir}/libvtv_stubs.dll.a +%{archlibdir}/libvtv_stubs.la + +%files -n crossmingw32-libvtv-static +%defattr(644,root,root,755) +%{archlibdir}/libvtv.a +%{archlibdir}/libvtv_stubs.a + +%files -n crossmingw32-libvtv-dll +%defattr(644,root,root,755) +%{_dlldir}/libvtv-0.dll +%{_dlldir}/libvtv_stubs-0.dll +%endif %files c++ %defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/%{target}-[cg]++ -%attr(755,root,root) %{arch}/bin/[cg]++ -%attr(755,root,root) %{gcclib}/cc1plus -%{arch}/%{_lib}/libstdc++.a -%{arch}/%{_lib}/libstdc++.la -%{arch}/%{_lib}/libsupc++.a -%{arch}/%{_lib}/libsupc++.la -%{arch}/include/g++ +%attr(755,root,root) %{_bindir}/%{target}-g++ +%attr(755,root,root) %{archbindir}/%{target}-c++ +%attr(755,root,root) %{archbindir}/%{target}-g++ +%attr(755,root,root) %{gcclibdir}/cc1plus +%{archlibdir}/libstdc++.dll.a +%{archlibdir}/libstdc++.la +%{archlibdir}/libstdc++fs.a +%{archlibdir}/libstdc++fs.la +%{archlibdir}/libsupc++.la +%{archlibdir}/libsupc++.a +%{archincludedir}/c++ %{_mandir}/man1/%{target}-g++.1* +%files -n crossmingw32-libstdc++-static +%defattr(644,root,root,755) +%{archlibdir}/libstdc++.a + +%files -n crossmingw32-libstdc++-dll +%defattr(644,root,root,755) +%{_dlldir}/libstdc++-6.dll + +%if %{without bootstrap} %files objc %defattr(644,root,root,755) -%attr(755,root,root) %{gcclib}/cc1obj -%{arch}/%{_lib}/libobjc.a -%{arch}/%{_lib}/libobjc.la +%doc libobjc/README +%attr(755,root,root) %{gcclibdir}/cc1obj +%{archlibdir}/libobjc.dll.a +%{archlibdir}/libobjc.la +%{gcclibdir}/include/objc + +%files objc++ +%defattr(644,root,root,755) +%doc gcc/objcp/ChangeLog +%attr(755,root,root) %{gcclibdir}/cc1objplus + +%files -n crossmingw32-libobjc-static +%defattr(644,root,root,755) +%{archlibdir}/libobjc.a + +%files -n crossmingw32-libobjc-dll +%defattr(644,root,root,755) +%{_dlldir}/libobjc-4.dll + +%files fortran +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/%{target}-gfortran +%attr(755,root,root) %{archbindir}/%{target}-gfortran +%attr(755,root,root) %{gcclibdir}/f951 +%{archlibdir}/libgfortran.dll.a +%{archlibdir}/libgfortran.la +%{archlibdir}/libgfortran.spec +%{gcclibdir}/finclude +%{gcclibdir}/libcaf_single.a +%{gcclibdir}/libcaf_single.la +%{_mandir}/man1/%{target}-gfortran.1* + +%files -n crossmingw32-libgfortran-static +%defattr(644,root,root,755) +%{archlibdir}/libgfortran.a -%files g77 +%files -n crossmingw32-libgfortran-dll %defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/%{target}-g77 -%attr(755,root,root) %{gcclib}/f771 -%{arch}/%{_lib}/libfrtbegin.a -%{arch}/%{_lib}/libg2c.a -%{arch}/%{_lib}/libg2c.la -%{_mandir}/man1/%{target}-g77.1* - -%files java +%{_dlldir}/libgfortran-5.dll + +%files -n crossmingw32-libquadmath +%defattr(644,root,root,755) +%{archlibdir}/libquadmath.dll.a +%{archlibdir}/libquadmath.la + +%files -n crossmingw32-libquadmath-static %defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/%{target}-gcj -%attr(755,root,root) %{_bindir}/%{target}-gcjh -%attr(755,root,root) %{_bindir}/%{target}-jcf-dump -%attr(755,root,root) %{_bindir}/%{target}-jv-scan -%attr(755,root,root) %{arch}/bin/grepjar -%attr(755,root,root) %{arch}/bin/jar -%attr(755,root,root) %{gcclib}/jc1 -%attr(755,root,root) %{gcclib}/jvgenmain -%{_mandir}/man1/%{target}-gcj.1* +%{archlibdir}/libquadmath.a + +%files -n crossmingw32-libquadmath-dll +%defattr(644,root,root,755) +%{_dlldir}/libquadmath-0.dll +%endif