Compare commits

...

No commits in common. "c8" and "a9" have entirely different histories.
c8 ... a9

5 changed files with 295 additions and 172 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/gcc-7.2.0.tar.xz
SOURCES/gcc-11.2.1-20210728.tar.xz

View File

@ -1 +1 @@
08a88199ed94fdf4940d118ba3c07028245cd5b7 SOURCES/gcc-7.2.0.tar.xz
8bb88a8a2cc72b6e4563e0e5e19f53ff09d72ee1 SOURCES/gcc-11.2.1-20210728.tar.xz

View File

@ -0,0 +1,40 @@
diff -rupN --no-dereference gcc-11.2.1-20210728/libgomp/libgomp.h gcc-11.2.1-20210728-new/libgomp/libgomp.h
--- gcc-11.2.1-20210728/libgomp/libgomp.h 2021-07-28 11:09:49.000000000 +0200
+++ gcc-11.2.1-20210728-new/libgomp/libgomp.h 2021-07-30 11:20:02.737945857 +0200
@@ -69,6 +69,13 @@
# endif
#endif
+#include <stdio.h>
+#ifdef __MINGW_PRINTF_FORMAT
+#define PRINTF_FORMAT __MINGW_PRINTF_FORMAT
+#else
+#define PRINTF_FORMAT printf
+#endif
+
#ifdef HAVE_ATTRIBUTE_VISIBILITY
# pragma GCC visibility push(hidden)
#endif
@@ -173,7 +180,7 @@ team_free (void *ptr)
extern void gomp_vdebug (int, const char *, va_list);
extern void gomp_debug (int, const char *, ...)
- __attribute__ ((format (printf, 2, 3)));
+ __attribute__ ((format (PRINTF_FORMAT, 2, 3)));
#define gomp_vdebug(KIND, FMT, VALIST) \
do { \
if (__builtin_expect (gomp_debug_var, 0)) \
@@ -186,11 +193,11 @@ extern void gomp_debug (int, const char
} while (0)
extern void gomp_verror (const char *, va_list);
extern void gomp_error (const char *, ...)
- __attribute__ ((format (printf, 1, 2)));
+ __attribute__ ((format (PRINTF_FORMAT, 1, 2)));
extern void gomp_vfatal (const char *, va_list)
__attribute__ ((noreturn));
extern void gomp_fatal (const char *, ...)
- __attribute__ ((noreturn, format (printf, 1, 2)));
+ __attribute__ ((noreturn, format (PRINTF_FORMAT, 1, 2)));
struct gomp_task;
struct gomp_taskgroup;

View File

@ -0,0 +1,42 @@
diff -rupN --no-dereference gcc-11.2.1-20210728/config/intdiv0.m4 gcc-11.2.1-20210728-new/config/intdiv0.m4
--- gcc-11.2.1-20210728/config/intdiv0.m4 2021-07-28 11:09:49.000000000 +0200
+++ gcc-11.2.1-20210728-new/config/intdiv0.m4 2021-07-30 11:19:58.858765997 +0200
@@ -31,10 +31,10 @@ sigfpe_handler (sig) int sig;
exit (sig != SIGFPE);
}
-int x = 1;
-int y = 0;
-int z;
-int nan;
+volatile int x = 1;
+volatile int y = 0;
+volatile int z;
+volatile int nan;
int main ()
{
diff -rupN --no-dereference gcc-11.2.1-20210728/libiberty/acinclude.m4 gcc-11.2.1-20210728-new/libiberty/acinclude.m4
--- gcc-11.2.1-20210728/libiberty/acinclude.m4 2021-07-28 11:09:49.000000000 +0200
+++ gcc-11.2.1-20210728-new/libiberty/acinclude.m4 2021-07-30 11:19:58.859766044 +0200
@@ -157,7 +157,7 @@ if test $ac_cv_os_cray = yes; then
fi
AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
-[AC_TRY_RUN([find_stack_direction ()
+[AC_TRY_RUN([__attribute__ ((noclone,noinline)) find_stack_direction ()
{
static char *addr = 0;
auto char dummy;
diff -rupN --no-dereference gcc-11.2.1-20210728/libiberty/configure.ac gcc-11.2.1-20210728-new/libiberty/configure.ac
--- gcc-11.2.1-20210728/libiberty/configure.ac 2021-07-28 11:09:49.000000000 +0200
+++ gcc-11.2.1-20210728-new/libiberty/configure.ac 2021-07-30 11:19:58.859766044 +0200
@@ -665,7 +665,7 @@ if test -z "${setobjs}"; then
for v in $vars; do
AC_MSG_CHECKING([for $v])
AC_CACHE_VAL(libiberty_cv_var_$v,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[int *p;]],[[extern int $v []; p = $v;]])],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[__attribute__ ((used)) int *p;]],[[extern int $v []; p = $v;]])],
[eval "libiberty_cv_var_$v=yes"],
[eval "libiberty_cv_var_$v=no"])])
if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then

View File

@ -1,48 +1,55 @@
%global __os_install_post /usr/lib/rpm/brp-compress %{nil}
# Steps:
# 1. Build mingw-gcc with bootstrap=1, enable_libgomp=0
# 2. Build mingw-crt
# 3. Build mingw-gcc with bootstrap=0, enable_libgomp=0
# 4. Build mingw-winpthreads
# 5. Build mingw-gcc with bootstrap=0, enable_libgomp=1
# Set this to one when mingw-crt isn't built yet
%global bootstrap 0
# Set this one to zero when mingw-winpthreads isn't built yet
%global enable_libgomp 0
# C++11 threads requires winpthreads so this can only be enabled once winpthreads is built
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
%global enable_winpthreads 1
%if 0%{?rhel} > 8
%global build_isl 0
%else
%global enable_winpthreads 0
%global build_isl 1
%endif
# Libgomp requires pthreads-w32 or winpthreads so this can only be
# enabled once pthreads-w32 or winpthreads is built. If enable_libgomp
# is set to 1 and enable_winpthreads is set to 0 then pthreads-w32 will
# be used as pthreads implementation
%global enable_libgomp 1
%global isl_version 0.16.1
# Run the testsuite
%global enable_tests 0
# If enabled, build from a snapshot
#global snapshot_date 20170212
#global snapshot_rev 245378
# When building from a snapshot the name of the source folder is different
%if 0%{?snapshot_date}
%global source_folder gcc-7-%{snapshot_date}
%else
%global source_folder gcc-%{version}
%endif
%global DATE 20210728
%global GITREV 134ab8155c937122663513b76afa8e64ad61fe99
%global gcc_version 11.2.1
%global gcc_major 11
Name: mingw-gcc
Version: 7.2.0
Release: 2%{?snapshot_date:.svn.%{snapshot_date}.r%{snapshot_rev}}%{?dist}
Version: %{gcc_version}
Release: 3%{?dist}
Summary: MinGW Windows cross-compiler (GCC) for C
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions
URL: http://gcc.gnu.org
%if 0%{?snapshot_date}
Source0: ftp://ftp.nluug.nl/mirror/languages/gcc/snapshots/7-%{snapshot_date}/gcc-7-%{snapshot_date}.tar.bz2
%else
Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.xz
%endif
# The source for this package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
# git clone --depth 1 git://gcc.gnu.org/git/gcc.git gcc-dir.tmp
# git --git-dir=gcc-dir.tmp/.git fetch --depth 1 origin %%{gitrev}
# git --git-dir=gcc-dir.tmp/.git archive --prefix=%%{name}-%%{version}-%%{DATE}/ %%{gitrev} | xz -9e > %%{name}-%%{version}-%%{DATE}.tar.xz
# rm -rf gcc-dir.tmp
%global srcdir gcc-%{version}-%{DATE}
Source0: %{srcdir}.tar.xz
Patch0: mingw-gcc-config.patch
# See https://sourceforge.net/p/mingw-w64/mailman/mingw-w64-public/thread/8fd2fb03-9b8a-07e1-e162-0bb48bcc3984%40gmail.com/#msg37200751
Patch1: 0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: texinfo
BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw64-filesystem >= 95
@ -56,24 +63,16 @@ BuildRequires: libmpc-devel
BuildRequires: libgomp
BuildRequires: flex
BuildRequires: zlib-devel
%if 0%{?fedora} > 0
%if 0%{?fedora} >= 21
BuildRequires: cloog-devel
%else
BuildRequires: cloog-ppl cloog-ppl-devel
%endif
%if %{build_isl}
BuildRequires: isl = %{isl_version}
BuildRequires: isl-devel = %{isl_version}
%endif
%if 0%{bootstrap} == 0
BuildRequires: mingw32-crt
BuildRequires: mingw64-crt
%if 0%{enable_winpthreads}
%if 0%{enable_libgomp}
BuildRequires: mingw32-winpthreads
BuildRequires: mingw64-winpthreads
%else
%if 0%{enable_libgomp}
BuildRequires: mingw32-pthreads
BuildRequires: mingw64-pthreads
%endif
%endif
%if 0%{enable_tests}
BuildRequires: wine
@ -83,7 +82,6 @@ BuildRequires: sharutils
%endif
%endif
Provides: bundled(libiberty)
ExclusiveArch: %{ix86} x86_64
%description
MinGW Windows cross-compiler (GCC) for C.
@ -100,48 +98,35 @@ Requires: mingw32-cpp
Requires: mingw32-crt
%endif
# The RPM version used by RHEL6 can't automatically add the
# correct provides tags during the build so we add these manually
%if 0%{bootstrap} == 0 && 0%{?rhel} == 6
Provides: mingw32(libgcc_s_sjlj-1.dll)
Provides: mingw32(libssp-0.dll)
Provides: mingw32(libquadmath-0.dll)
%endif
%description -n mingw32-gcc
MinGW Windows cross-compiler (GCC) for C for the win32 target.
%package -n mingw32-cpp
Summary: MinGW Windows cross-C Preprocessor for the win32 target
# NB: Explicit mingw32-filesystem dependency is REQUIRED here.
Requires: mingw32-filesystem >= 95
%description -n mingw32-cpp
MinGW Windows cross-C Preprocessor for the win32 target.
%package -n mingw32-gcc-c++
Summary: MinGW Windows cross-compiler for C++ for the win32 target
Requires: mingw32-gcc = %{version}-%{release}
%if 0%{bootstrap} == 0 && 0%{?rhel} == 6
Provides: mingw32(libstdc++-6.dll)
%endif
%description -n mingw32-gcc-c++
MinGW Windows cross-compiler for C++ for the win32 target.
%package -n mingw32-gcc-objc
Summary: MinGW Windows cross-compiler support for Objective C for the win32 target
Requires: mingw32-gcc = %{version}-%{release}
%if 0%{bootstrap} == 0 && 0%{?rhel} == 6
Provides: mingw32(libobjc-4.dll)
%endif
%description -n mingw32-gcc-objc
MinGW Windows cross-compiler support for Objective C for the win32 target.
%package -n mingw32-gcc-objc++
Summary: MinGW Windows cross-compiler support for Objective C++ for the win32 target
Requires: mingw32-gcc-c++ = %{version}-%{release}
@ -150,30 +135,20 @@ Requires: mingw32-gcc-objc = %{version}-%{release}
%description -n mingw32-gcc-objc++
MinGW Windows cross-compiler support for Objective C++ for the win32 target.
%package -n mingw32-gcc-gfortran
Summary: MinGW Windows cross-compiler for FORTRAN for the win32 target
Requires: mingw32-gcc = %{version}-%{release}
%if 0%{bootstrap} == 0 && 0%{?rhel} == 6
Provides: mingw32(libgfortran-4.dll)
Requires: mingw32(libquadmath-0.dll)
%endif
%description -n mingw32-gcc-gfortran
MinGW Windows cross-compiler for FORTRAN for the win32 target.
%if 0%{enable_libgomp}
%package -n mingw32-libgomp
Summary: GCC OpenMP v3.0 shared support library for the win32 target
Requires: mingw32-gcc = %{version}-%{release}
%if 0%{?rhel} == 6
# libgomp dll is linked with pthreads, but since we don't run the
# automatic dependency scripts, it doesn't get picked up automatically.
Requires: mingw32-pthreads
Provides: mingw32(libgomp-1.dll)
%endif
%description -n mingw32-libgomp
This package contains GCC shared support library which is
needed for OpenMP v3.0 support for the win32 target.
@ -191,46 +166,35 @@ Requires: mingw64-cpp
Requires: mingw64-crt
%endif
%if 0%{bootstrap} == 0 && 0%{?rhel} == 6
Provides: mingw64(libgcc_s_seh-1.dll)
Provides: mingw64(libssp-0.dll)
Provides: mingw64(libquadmath-0.dll)
%endif
%description -n mingw64-gcc
MinGW Windows cross-compiler (GCC) for C for the win64 target.
%package -n mingw64-cpp
Summary: MinGW Windows cross-C Preprocessor for the win64 target.
# NB: Explicit mingw64-filesystem dependency is REQUIRED here.
Requires: mingw64-filesystem >= 95
%description -n mingw64-cpp
MinGW Windows cross-C Preprocessor for the win64 target
%package -n mingw64-gcc-c++
Summary: MinGW Windows cross-compiler for C++ for the win64 target
Requires: mingw64-gcc = %{version}-%{release}
%if 0%{bootstrap} == 0 && 0%{?rhel} == 6
Provides: mingw64(libstdc++-6.dll)
%endif
%description -n mingw64-gcc-c++
MinGW Windows cross-compiler for C++ for the win64 target.
%package -n mingw64-gcc-objc
Summary: MinGW Windows cross-compiler support for Objective C for the win64 target
Requires: mingw64-gcc = %{version}-%{release}
%if 0%{bootstrap} == 0 && 0%{?rhel} == 6
Provides: mingw64(libobjc-4.dll)
%endif
%description -n mingw64-gcc-objc
MinGW Windows cross-compiler support for Objective C for the win64 target.
%package -n mingw64-gcc-objc++
Summary: MinGW Windows cross-compiler support for Objective C++ for the win64 target
Requires: mingw64-gcc-c++ = %{version}-%{release}
@ -239,30 +203,20 @@ Requires: mingw64-gcc-objc = %{version}-%{release}
%description -n mingw64-gcc-objc++
MinGW Windows cross-compiler support for Objective C++ for the win64 target.
%package -n mingw64-gcc-gfortran
Summary: MinGW Windows cross-compiler for FORTRAN for the win64 target
Requires: mingw64-gcc = %{version}-%{release}
%if 0%{bootstrap} == 0 && 0%{?rhel} == 6
Provides: mingw64(libgfortran-4.dll)
Requires: mingw64(libquadmath-0.dll)
%endif
%description -n mingw64-gcc-gfortran
MinGW Windows cross-compiler for FORTRAN for the win64 target.
%if 0%{enable_libgomp}
%package -n mingw64-libgomp
Summary: GCC OpenMP v3.0 shared support library for the win64 target
Requires: mingw64-gcc = %{version}-%{release}
%if 0%{bootstrap} == 0 && 0%{?rhel} == 6
# libgomp dll is linked with pthreads, but since we don't run the
# automatic dependency scripts, it doesn't get picked up automatically.
Requires: mingw64-pthreads
Provides: mingw64(libgomp-1.dll)
%endif
%description -n mingw64-libgomp
This package contains GCC shared support library which is
needed for OpenMP v3.0 support for the win32 target.
@ -270,10 +224,9 @@ needed for OpenMP v3.0 support for the win32 target.
%prep
%setup -q -n %{source_folder}
%autosetup -p1 -n %{srcdir}
echo 'Fedora MinGW %{version}-%{release}' > gcc/DEV-PHASE
%build
# Default configure arguments
configure_args="\
@ -292,14 +245,14 @@ configure_args="\
--disable-nls --without-included-gettext \
--disable-win32-registry \
--enable-languages="c,c++,objc,obj-c++,fortran" \
%if 0%{?fedora} == 22
--with-default-libstdcxx-abi=c++98 \
%endif
--with-bugurl=http://bugzilla.redhat.com/bugzilla"
--with-bugurl=http://bugzilla.redhat.com/bugzilla \
--enable-threads=posix"
# PPL/CLOOG optimalisations are only available on Fedora
%if 0%{?fedora}
configure_args="$configure_args --with-cloog"
%if %{build_isl}
configure_args="$configure_args --with-isl"
%else
configure_args="$configure_args --without-isl"
%endif
# When bootstrapping, disable LTO support as it causes errors while building any binary
@ -309,10 +262,6 @@ configure_args="$configure_args --with-cloog"
configure_args="$configure_args --disable-lto"
%endif
%if 0%{enable_winpthreads}
configure_args="$configure_args --enable-threads=posix"
%endif
%if 0%{enable_libgomp}
configure_args="$configure_args --enable-libgomp"
%endif
@ -325,7 +274,7 @@ export CC="%{__cc} ${RPM_OPT_FLAGS}"
# Win32
mkdir build_win32
pushd build_win32
../configure $configure_args --target=%{mingw32_target} --with-sysroot=%{mingw32_sysroot} --with-gxx-include-dir=%{mingw32_includedir}/c++
../configure $configure_args --target=%{mingw32_target} --with-sysroot=%{mingw32_sysroot} --with-gxx-include-dir=%{mingw32_includedir}/c++ --disable-sjlj-exceptions --with-dwarf2
popd
# Win64
@ -336,9 +285,9 @@ popd
# If we're bootstrapping, only build the GCC core
%if 0%{bootstrap}
%mingw_make %{?_smp_mflags} all-gcc
%mingw_make_build all-gcc
%else
%mingw_make %{?_smp_mflags} all
%mingw_make_build all
%endif
@ -361,33 +310,25 @@ if [ ! -d $SYSTEM32_DIR ] ; then
SYSTEM32_DIR=$WINEPREFIX/drive_c/windows/system32
fi
cp build_win32/i686-w64-mingw32/libquadmath/.libs/libquadmath-0.dll $SYSTEM32_DIR
cp build_win32/i686-w64-mingw32/libgfortran/.libs/libgfortran-4.dll $SYSTEM32_DIR
cp build_win32/i686-w64-mingw32/libgfortran/.libs/libgfortran-5.dll $SYSTEM32_DIR
cp build_win32/i686-w64-mingw32/libobjc/.libs/libobjc-4.dll $SYSTEM32_DIR
cp build_win32/i686-w64-mingw32/libssp/.libs/libssp-0.dll $SYSTEM32_DIR
cp build_win32/i686-w64-mingw32/libstdc++-v3/src/.libs/libstdc++-6.dll $SYSTEM32_DIR
cp build_win32/i686-w64-mingw32/libgcc/shlib/libgcc_s_sjlj-1.dll $SYSTEM32_DIR
cp build_win32/i686-w64-mingw32/libgcc/shlib/libgcc_s_dw2-1.dll $SYSTEM32_DIR
%if 0%{enable_libgomp}
%if 0%{enable_winpthreads}
cp %{mingw32_bindir}/libwinpthread-1.dll $SYSTEM32_DIR
%else
cp %{mingw32_bindir}/pthreadGC2.dll $SYSTEM32_DIR
%endif
cp build_win32/i686-w64-mingw32/libgomp/.libs/libgomp-1.dll $SYSTEM32_DIR
%endif
SYSTEM64_DIR=$WINEPREFIX/drive_c/windows/system32
cp build_win64/x86_64-w64-mingw32/libquadmath/.libs/libquadmath-0.dll $SYSTEM64_DIR
cp build_win64/x86_64-w64-mingw32/libgfortran/.libs/libgfortran-4.dll $SYSTEM64_DIR
cp build_win64/x86_64-w64-mingw32/libgfortran/.libs/libgfortran-5.dll $SYSTEM64_DIR
cp build_win64/x86_64-w64-mingw32/libobjc/.libs/libobjc-4.dll $SYSTEM64_DIR
cp build_win64/x86_64-w64-mingw32/libssp/.libs/libssp-0.dll $SYSTEM64_DIR
cp build_win64/x86_64-w64-mingw32/libstdc++-v3/src/.libs/libstdc++-6.dll $SYSTEM64_DIR
cp build_win64/x86_64-w64-mingw32/libgcc/shlib/libgcc_s_seh-1.dll $SYSTEM64_DIR
%if 0%{enable_libgomp}
%if 0%{enable_winpthreads}
cp %{mingw64_bindir}/libwinpthread-1.dll $SYSTEM64_DIR
%else
cp %{mingw64_bindir}/pthreadGC2.dll $SYSTEM64_DIR
%endif
cp build_win64/x86_64-w64-mingw32/libgomp/.libs/libgomp-1.dll $SYSTEM64_DIR
%endif
@ -430,60 +371,67 @@ popd
%install
%if 0%{bootstrap}
%mingw_make DESTDIR=$RPM_BUILD_ROOT install-gcc
%mingw_make DESTDIR=%{buildroot} install-gcc
%else
%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
%mingw_make_install
%endif
# These files conflict with existing installed files.
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty*
rm -f $RPM_BUILD_ROOT%{_mandir}/man7/*
rm -rf $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python
rm -rf %{buildroot}%{_infodir}
rm -f %{buildroot}%{_libdir}/libiberty*
rm -f %{buildroot}%{_mandir}/man7/*
rm -rf %{buildroot}%{_datadir}/gcc-%{version}/python
%if 0%{bootstrap} == 0
# Move the DLL's manually to the correct location
mkdir -p $RPM_BUILD_ROOT%{mingw32_bindir}
mv $RPM_BUILD_ROOT%{_prefix}/%{mingw32_target}/lib/libatomic-1.dll \
$RPM_BUILD_ROOT%{_prefix}/%{mingw32_target}/lib/libgcc_s_sjlj-1.dll \
$RPM_BUILD_ROOT%{_prefix}/%{mingw32_target}/lib/libssp-0.dll \
$RPM_BUILD_ROOT%{_prefix}/%{mingw32_target}/lib/libstdc++-6.dll \
$RPM_BUILD_ROOT%{_prefix}/%{mingw32_target}/lib/libobjc-4.dll \
$RPM_BUILD_ROOT%{_prefix}/%{mingw32_target}/lib/libgfortran-4.dll \
$RPM_BUILD_ROOT%{_prefix}/%{mingw32_target}/lib/libquadmath-0.dll \
mkdir -p %{buildroot}%{mingw32_bindir}
mv %{buildroot}%{_prefix}/%{mingw32_target}/lib/libatomic-1.dll \
%{buildroot}%{_prefix}/%{mingw32_target}/lib/libgcc_s_dw2-1.dll \
%{buildroot}%{_prefix}/%{mingw32_target}/lib/libssp-0.dll \
%{buildroot}%{_prefix}/%{mingw32_target}/lib/libstdc++-6.dll \
%{buildroot}%{_prefix}/%{mingw32_target}/lib/libobjc-4.dll \
%{buildroot}%{_prefix}/%{mingw32_target}/lib/libgfortran-5.dll \
%{buildroot}%{_prefix}/%{mingw32_target}/lib/libquadmath-0.dll \
%if 0%{enable_libgomp}
$RPM_BUILD_ROOT%{_prefix}/%{mingw32_target}/lib/libgomp-1.dll \
%{buildroot}%{_prefix}/%{mingw32_target}/lib/libgomp-1.dll \
%endif
$RPM_BUILD_ROOT%{mingw32_bindir}
%{buildroot}%{mingw32_bindir}
mkdir -p $RPM_BUILD_ROOT%{mingw64_bindir}
mv $RPM_BUILD_ROOT%{_prefix}/%{mingw64_target}/lib/libatomic-1.dll \
$RPM_BUILD_ROOT%{_prefix}/%{mingw64_target}/lib/libgcc_s_seh-1.dll \
$RPM_BUILD_ROOT%{_prefix}/%{mingw64_target}/lib/libssp-0.dll \
$RPM_BUILD_ROOT%{_prefix}/%{mingw64_target}/lib/libstdc++-6.dll \
$RPM_BUILD_ROOT%{_prefix}/%{mingw64_target}/lib/libobjc-4.dll \
$RPM_BUILD_ROOT%{_prefix}/%{mingw64_target}/lib/libgfortran-4.dll \
$RPM_BUILD_ROOT%{_prefix}/%{mingw64_target}/lib/libquadmath-0.dll \
mkdir -p %{buildroot}%{mingw64_bindir}
mv %{buildroot}%{_prefix}/%{mingw64_target}/lib/libatomic-1.dll \
%{buildroot}%{_prefix}/%{mingw64_target}/lib/libgcc_s_seh-1.dll \
%{buildroot}%{_prefix}/%{mingw64_target}/lib/libssp-0.dll \
%{buildroot}%{_prefix}/%{mingw64_target}/lib/libstdc++-6.dll \
%{buildroot}%{_prefix}/%{mingw64_target}/lib/libobjc-4.dll \
%{buildroot}%{_prefix}/%{mingw64_target}/lib/libgfortran-5.dll \
%{buildroot}%{_prefix}/%{mingw64_target}/lib/libquadmath-0.dll \
%if 0%{enable_libgomp}
$RPM_BUILD_ROOT%{_prefix}/%{mingw64_target}/lib/libgomp-1.dll \
%{buildroot}%{_prefix}/%{mingw64_target}/lib/libgomp-1.dll \
%endif
$RPM_BUILD_ROOT%{mingw64_bindir}
%{buildroot}%{mingw64_bindir}
# Various import libraries are placed in the wrong folder
mkdir -p $RPM_BUILD_ROOT%{mingw32_libdir}
mkdir -p $RPM_BUILD_ROOT%{mingw64_libdir}
mv $RPM_BUILD_ROOT%{_prefix}/%{mingw32_target}/lib/* $RPM_BUILD_ROOT%{mingw32_libdir}
mv $RPM_BUILD_ROOT%{_prefix}/%{mingw64_target}/lib/* $RPM_BUILD_ROOT%{mingw64_libdir}
mkdir -p %{buildroot}%{mingw32_libdir}
mkdir -p %{buildroot}%{mingw64_libdir}
mv %{buildroot}%{_prefix}/%{mingw32_target}/lib/* %{buildroot}%{mingw32_libdir}
mv %{buildroot}%{_prefix}/%{mingw64_target}/lib/* %{buildroot}%{mingw64_libdir}
# Don't want the *.la files.
find $RPM_BUILD_ROOT -name '*.la' -delete
find %{buildroot} -name '*.la' -delete
%endif
# For some reason there are wrapper libraries created named $target-$target-gcc-$tool
# Drop those files for now as this looks like a bug in GCC
rm -f $RPM_BUILD_ROOT%{_bindir}/%{mingw32_target}-%{mingw32_target}-*
rm -f $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-%{mingw64_target}-*
rm -f %{buildroot}%{_bindir}/%{mingw32_target}-%{mingw32_target}-*
rm -f %{buildroot}%{_bindir}/%{mingw64_target}-%{mingw64_target}-*
%if 0%{bootstrap} == 0
# HACK symlink libssp dll over import lib, otherwise linking with -lssp failes for mysterious reasons
# Needed to build gdb and everything which adds -D_FORTIFY_SOURCES=... and -fstack-protector
ln -sf %{mingw32_bindir}/libssp-0.dll %{buildroot}%{mingw32_libdir}/libssp.dll.a
ln -sf %{mingw64_bindir}/libssp-0.dll %{buildroot}%{mingw64_libdir}/libssp.dll.a
%endif
%files -n mingw32-gcc
@ -513,8 +461,9 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-%{mingw64_target}-*
# Non-bootstrap files
%if 0%{bootstrap} == 0
%{_bindir}/%{mingw32_target}-lto-dump
%{mingw32_bindir}/libatomic-1.dll
%{mingw32_bindir}/libgcc_s_sjlj-1.dll
%{mingw32_bindir}/libgcc_s_dw2-1.dll
%{mingw32_bindir}/libssp-0.dll
%{mingw32_libdir}/libatomic.a
%{mingw32_libdir}/libatomic.dll.a
@ -522,6 +471,7 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-%{mingw64_target}-*
%{mingw32_libdir}/libssp.a
%{mingw32_libdir}/libssp.dll.a
%{mingw32_libdir}/libssp_nonshared.a
%{mingw32_libdir}/libstdc++fs.a
%{_prefix}/lib/gcc/%{mingw32_target}/%{version}/crtbegin.o
%{_prefix}/lib/gcc/%{mingw32_target}/%{version}/crtend.o
%{_prefix}/lib/gcc/%{mingw32_target}/%{version}/crtfastmath.o
@ -530,10 +480,10 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-%{mingw64_target}-*
%{_prefix}/lib/gcc/%{mingw32_target}/%{version}/libgcov.a
%dir %{_prefix}/lib/gcc/%{mingw32_target}/%{version}/include/ssp
%{_prefix}/lib/gcc/%{mingw32_target}/%{version}/include/ssp/*.h
%{_libexecdir}/gcc/%{mingw32_target}/%{version}/g++-mapper-server
%{_libexecdir}/gcc/%{mingw32_target}/%{version}/lto1
%{_libexecdir}/gcc/%{mingw32_target}/%{version}/liblto_plugin.so
%{_libexecdir}/gcc/%{mingw32_target}/%{version}/liblto_plugin.so.0
%{_libexecdir}/gcc/%{mingw32_target}/%{version}/liblto_plugin.so.0.0.0
%{_libexecdir}/gcc/%{mingw32_target}/%{version}/liblto_plugin.so*
%{_mandir}/man1/%{mingw32_target}-lto-dump.1*
%endif
%files -n mingw64-gcc
@ -563,6 +513,7 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-%{mingw64_target}-*
# Non-bootstrap files
%if 0%{bootstrap} == 0
%{_bindir}/%{mingw64_target}-lto-dump
%{mingw64_bindir}/libatomic-1.dll
%{mingw64_bindir}/libgcc_s_seh-1.dll
%{mingw64_bindir}/libssp-0.dll
@ -572,6 +523,7 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-%{mingw64_target}-*
%{mingw64_libdir}/libssp.a
%{mingw64_libdir}/libssp.dll.a
%{mingw64_libdir}/libssp_nonshared.a
%{mingw64_libdir}/libstdc++fs.a
%{_prefix}/lib/gcc/%{mingw64_target}/%{version}/crtbegin.o
%{_prefix}/lib/gcc/%{mingw64_target}/%{version}/crtend.o
%{_prefix}/lib/gcc/%{mingw64_target}/%{version}/crtfastmath.o
@ -580,10 +532,10 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-%{mingw64_target}-*
%{_prefix}/lib/gcc/%{mingw64_target}/%{version}/libgcov.a
%dir %{_prefix}/lib/gcc/%{mingw64_target}/%{version}/include/ssp
%{_prefix}/lib/gcc/%{mingw64_target}/%{version}/include/ssp/*.h
%{_libexecdir}/gcc/%{mingw64_target}/%{version}/g++-mapper-server
%{_libexecdir}/gcc/%{mingw64_target}/%{version}/lto1
%{_libexecdir}/gcc/%{mingw64_target}/%{version}/liblto_plugin.so
%{_libexecdir}/gcc/%{mingw64_target}/%{version}/liblto_plugin.so.0
%{_libexecdir}/gcc/%{mingw64_target}/%{version}/liblto_plugin.so.0.0.0
%{_libexecdir}/gcc/%{mingw64_target}/%{version}/liblto_plugin.so*
%{_mandir}/man1/%{mingw64_target}-lto-dump.1*
%endif
%files -n mingw32-cpp
@ -665,7 +617,7 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-%{mingw64_target}-*
%{_mandir}/man1/%{mingw32_target}-gfortran.1*
%{_libexecdir}/gcc/%{mingw32_target}/%{version}/f951
%if 0%{bootstrap} == 0
%{mingw32_bindir}/libgfortran-4.dll
%{mingw32_bindir}/libgfortran-5.dll
%{mingw32_bindir}/libquadmath-0.dll
%{mingw32_libdir}/libgfortran.a
%{mingw32_libdir}/libgfortran.dll.a
@ -673,17 +625,15 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-%{mingw64_target}-*
%{mingw32_libdir}/libquadmath.a
%{mingw32_libdir}/libquadmath.dll.a
%{_prefix}/lib/gcc/%{mingw32_target}/%{version}/libcaf_single.a
%if 0%{enable_libgomp}
%{_prefix}/lib/gcc/%{mingw32_target}/%{version}/finclude
%endif
%endif
%files -n mingw64-gcc-gfortran
%{_bindir}/%{mingw64_target}-gfortran
%{_mandir}/man1/%{mingw64_target}-gfortran.1*
%{_libexecdir}/gcc/%{mingw64_target}/%{version}/f951
%if 0%{bootstrap} == 0
%{mingw64_bindir}/libgfortran-4.dll
%{mingw64_bindir}/libgfortran-5.dll
%{mingw64_bindir}/libquadmath-0.dll
%{mingw64_libdir}/libgfortran.a
%{mingw64_libdir}/libgfortran.dll.a
@ -691,10 +641,8 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-%{mingw64_target}-*
%{mingw64_libdir}/libquadmath.a
%{mingw64_libdir}/libquadmath.dll.a
%{_prefix}/lib/gcc/%{mingw64_target}/%{version}/libcaf_single.a
%if 0%{enable_libgomp}
%{_prefix}/lib/gcc/%{mingw64_target}/%{version}/finclude
%endif
%endif
%if 0%{enable_libgomp}
%files -n mingw32-libgomp
@ -712,9 +660,102 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-%{mingw64_target}-*
%changelog
* Wed Aug 08 2018 Troy Dawson <tdawson@redhat.com> - 7.2.0-2
- ExclusiveArch: i686, x86_64
- Resolves: rhbz#1610008
* Thu Aug 12 2021 Richard W.M. Jones <rjones@redhat.com> - 11.2.1-3
- Rebase to gcc 11.2.1, same as Fedora Rawhide
resolves: rhbz#1953914
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 10.2.1-8
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 10.2.1-7
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Thu Jan 28 2021 Richard W.M. Jones <rjones@redhat.com> - 10.2.1-6
- Bump and rebuild for s390.
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 10.2.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jan 19 12:33:56 CET 2021 Sandro Mani <manisandro@gmail.com> - 10.2.1-2
- Rebuild (mingw-w64)
* Thu Dec 10 2020 Paolo Bonzini <pbonzini@redhat.com> - 10.2.1-3
- Adjust ISL/CLOOG conditionals to look the same as native GCC
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 10.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jul 23 2020 Sandro Mani <manisandro@gmail.com> - 10.2.1-1
- Update to 10.2.1
* Mon Jul 20 2020 Jeff Law <law@redhat.com> - 10.1.1-4
- Fix broken configure tests compromised by LTO
- Add autoconf to BuildRequires
* Sun Jul 19 2020 Sandro Mani <manisandro@gmail.com> - 10.1.1-3
- Hack: symlink libssp-0.dll over libssp.dll.a
* Sat Jun 20 2020 Sandro Mani <manisandro@gmail.com> - 10.1.1-2
- Full build
* Sat Jun 20 2020 Sandro Mani <manisandro@gmail.com> - 10.1.1-1
- Update to 10.1.1 (bootstrap)
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 9.2.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Oct 16 2019 Sandro Mani <manisandro@gmail.com> - 9.2.1-5
- Bump
* Wed Oct 9 2019 Jerry James <loganjerry@gmail.com> - 9.2.1-4
- Rebuild for mpfr 4
* Tue Oct 08 2019 Sandro Mani <manisandro@gmail.com> - 9.2.1-3
- Switch to dwarf-2 exceptions for mingw32 (full build)
* Tue Oct 08 2019 Sandro Mani <manisandro@gmail.com> - 9.2.1-2
- Switch to dwarf-2 exceptions for mingw32 (bootstrap)
* Tue Aug 27 2019 Sandro Mani <manisandro@gmail.com> - 9.2.1-1
- Update to 9.2.1
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 9.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Jun 04 2019 Sandro Mani <manisandro@gmail.com> - 9.1.1-1
- Update to 9.1.1
* Tue Apr 16 2019 Sandro Mani <manisandro@gmail.com> - 8.3.0-2
- Backport patch for gcc #88568
* Fri Feb 22 2019 Kalev Lember <klember@redhat.com> - 8.3.0-1
- Update to 8.3.0
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Sep 05 2018 Sandro Mani <manisandro@gmail.com> - 8.2.0-3
- Backport patch for gcc#87137
* Wed Aug 08 2018 Sandro Mani <manisandro@gmail.com> - 8.2.0-2
- Cleanup snapshot handling
- Add patch for gcc #86593
* Fri Jul 27 2018 Kalev Lember <klember@redhat.com> - 8.2.0-1
- Update to 8.2.0
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jul 09 2018 Kalev Lember <klember@redhat.com> - 8.1.0-1
- Update to 8.1.0
* Sat Apr 07 2018 Rafael Kitover <rkitover@gmail.com> - 7.2.0-3
- Add patch to disable weakrefs in libstdc++
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 7.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Tue Aug 22 2017 Kalev Lember <klember@redhat.com> - 7.2.0-1
- Update to 7.2.0