Update to gcc 4.7.0 final release

- Update to gcc 4.7.0 final release (20120322 snapshot)
- Dropped upstreamed patches
- Enable the testsuite

Note that the testsuite can currently only perform the compile/linking
tests on the Koji builders. To make the execution tests using wine work
some dejagnu hacking is needed as binfmt isn't set up in the Koji
builders. Help is welcome in that area
This commit is contained in:
Erik van Pienbroek 2012-03-29 00:41:51 +02:00
parent 0327a12359
commit 148029ede6
5 changed files with 24 additions and 130 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ gcc-4.5.1.tar.bz2
/gcc-4.7.0-20120106.tar.bz2
/gcc-4.7.0-20120126.tar.bz2
/gcc-4.7.0-20120224.tar.bz2
/gcc-4.7.0-20120322.tar.bz2

View File

@ -1,86 +0,0 @@
From gcc-patches-return-313740-listarch-gcc-patches=gcc dot gnu dot org at gcc dot gnu dot org Mon Feb 27 06:57:25 2012
Return-Path: <gcc-patches-return-313740-listarch-gcc-patches=gcc dot gnu dot org at gcc dot gnu dot org>
Delivered-To: listarch-gcc-patches at gcc dot gnu dot org
Received: (qmail 16489 invoked by alias); 27 Feb 2012 06:57:23 -0000
Received: (qmail 16478 invoked by uid 22791); 27 Feb 2012 06:57:22 -0000
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
Received: from mail-tul01m020-f175.google.com (HELO mail-tul01m020-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 27 Feb 2012 06:57:09 +0000
Received: by obhx4 with SMTP id x4so5306837obh.20 for <gcc-patches@gcc.gnu.org>; Sun, 26 Feb 2012 22:57:09 -0800 (PST)
Received-SPF: pass (google.com: domain of ktietz70@googlemail.com designates 10.182.72.69 as permitted sender) client-ip=10.182.72.69;
Authentication-Results: mr.google.com; spf=pass (google.com: domain of ktietz70@googlemail.com designates 10.182.72.69 as permitted sender) smtp.mail=ktietz70@googlemail.com; dkim=pass header.i=ktietz70@googlemail.com
Received: from mr.google.com ([10.182.72.69]) by 10.182.72.69 with SMTP id b5mr4374646obv.77.1330325829010 (num_hops = 1); Sun, 26 Feb 2012 22:57:09 -0800 (PST)
MIME-Version: 1.0
Received: by 10.182.72.69 with SMTP id b5mr3938096obv.77.1330325828931; Sun, 26 Feb 2012 22:57:08 -0800 (PST)
Received: by 10.182.33.103 with HTTP; Sun, 26 Feb 2012 22:57:08 -0800 (PST)
Date: Mon, 27 Feb 2012 07:57:08 +0100
Message-ID: <CAEwic4aZE8WXvs0TwAWr-1GZn6JNzi7_WJ50vBcm45HpdPVGdw@mail.gmail.com>
Subject: [patch libgcc]: Fix float128 soft-float for mingw targets
From: Kai Tietz <ktietz70 at googlemail dot com>
To: GCC Patches <gcc-patches at gcc dot gnu dot org>
Cc: Richard Henderson <rth at redhat dot com>
Content-Type: text/plain; charset=ISO-8859-1
X-IsSubscribed: yes
Mailing-List: contact gcc-patches-help at gcc dot gnu dot org; run by ezmlm
Precedence: bulk
List-Id: <gcc-patches.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-patches/>
List-Post: <mailto:gcc-patches at gcc dot gnu dot org>
List-Help: <mailto:gcc-patches-help at gcc dot gnu dot org>
Sender: gcc-patches-owner at gcc dot gnu dot org
Delivered-To: mailing list gcc-patches at gcc dot gnu dot org
Hi,
by recent tests in gcc.target/i386 I noticed that testcase
float128-2.c failed on executation. This failure is caused by
incompatible bitfield-structure definition in soft-fp/quad.h for
enabled ms-bitfields layout.
Patch marks those structures to be 'gcc_struct' for mingw targets.
ChangeLog
2012-02-27 Kai Tietz <ktietz@redhat.com>
* soft-fp/quad.h: Mark bitfield-structures as gcc_struct.
Regression tested for i686-w64-mingw32, x86_64-w64-mingw32, and
x86_64-unknown-linux-gnu for all languages (including Ada + Obj-C++).
Ok for apply?
Regards,
Kai
Index: soft-fp/quad.h
===================================================================
--- soft-fp/quad.h (revision 184486)
+++ soft-fp/quad.h (working copy)
@@ -67,7 +67,11 @@
union _FP_UNION_Q
{
TFtype flt;
- struct
+ struct
+#ifdef __MINGW32__
+ /* Make sure we are using gnu-style bitfield handling. */
+ __attribute__ ((gcc_struct))
+#endif
{
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned sign : 1;
@@ -174,7 +178,12 @@
struct {
_FP_W_TYPE a, b;
} longs;
- struct {
+ struct
+#ifdef __MINGW32__
+ /* Make sure we are using gnu-style bitfield handling. */
+ __attribute__ ((gcc_struct))
+#endif
+ {
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned sign : 1;
unsigned exp : _FP_EXPBITS_Q;

View File

@ -1,24 +0,0 @@
Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c (revision 184559)
+++ gcc/config/i386/i386.c (revision 184560)
@@ -13241,6 +13241,19 @@
if (TARGET_64BIT)
{
+ if (GET_CODE (x) == CONST
+ && GET_CODE (XEXP (x, 0)) == PLUS
+ && GET_MODE (XEXP (x, 0)) == Pmode
+ && CONST_INT_P (XEXP (XEXP (x, 0), 1))
+ && GET_CODE (XEXP (XEXP (x, 0), 0)) == UNSPEC
+ && XINT (XEXP (XEXP (x, 0), 0), 1) == UNSPEC_PCREL)
+ {
+ rtx x2 = XVECEXP (XEXP (XEXP (x, 0), 0), 0, 0);
+ x = gen_rtx_PLUS (Pmode, XEXP (XEXP (x, 0), 1), x2);
+ if (MEM_P (orig_x))
+ x = replace_equiv_address_nv (orig_x, x);
+ return x;
+ }
if (GET_CODE (x) != CONST
|| GET_CODE (XEXP (x, 0)) != UNSPEC
|| (XINT (XEXP (x, 0), 1) != UNSPEC_GOTPCREL

View File

@ -13,16 +13,13 @@
%global enable_libgomp 1
# Run the testsuite
%global enable_tests 0
%global enable_tests 1
%global mingw_build_win32 1
%global mingw_build_win64 1
%global snapshot_date 20120224
%global snapshot_date 20120322
Name: mingw-gcc
Version: 4.7.0
Release: 0.9.%{snapshot_date}%{?dist}
Release: 1.%{snapshot_date}%{?dist}
Summary: MinGW Windows cross-compiler (GCC) for C
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions
@ -35,14 +32,6 @@ URL: http://gcc.gnu.org
Source0: gcc-%{version}-%{snapshot_date}.tar.bz2
#Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.bz2
# Recommended by upstream mingw-w64
# Already upstreamed in gcc r184560
Patch0: gcc-r184560.patch
# Fix float128 soft-float for mingw targets
# http://gcc.gnu.org/ml/gcc-patches/2012-02/msg01309.html
Patch1: gcc-4.7-fix-float128-soft-float.patch
BuildRequires: texinfo
BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw64-filesystem >= 95
@ -73,9 +62,12 @@ BuildRequires: mingw64-pthreads
%endif
%endif
%if 0%{enable_tests}
BuildRequires: wine
# The x86_64 build repo doesn't contain the i686 wine packages
# so we can't BR: wine here, only wine-wow :(
BuildRequires: wine-wow
BuildRequires: autogen
BuildRequires: dejagnu
BuildRequires: sharutils
%endif
%endif
@ -211,10 +203,6 @@ needed for OpenMP v3.0 support for the win32 target.
%prep
%setup -q -n gcc-%{version}-%{snapshot_date}
%patch0 -p0
pushd libgcc
%patch1 -p0
popd
echo 'Fedora MinGW %{version}-%{release}' > gcc/DEV-PHASE
@ -292,6 +280,10 @@ export WINEPREFIX=/tmp/.wine_gcc_testsuite
rm -rf $WINEPREFIX
mkdir $WINEPREFIX
%ifarch x86_64
export WINELOADER=/usr/bin/wine64
%endif
# The command below will fail, but that's intentional
# We only have to call a wine binary which triggers
# the generation and population of a wine prefix
@ -317,6 +309,7 @@ cp %{mingw32_bindir}/pthreadGC2.dll $SYSTEM32_DIR
cp build_win32/i686-w64-mingw32/libgomp/.libs/libgomp-1.dll $SYSTEM32_DIR
%endif
%ifarch x86_64
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-3.dll $SYSTEM64_DIR
@ -332,6 +325,7 @@ cp %{mingw64_bindir}/pthreadGC2.dll $SYSTEM64_DIR
%endif
cp build_win64/x86_64-w64-mingw32/libgomp/.libs/libgomp-1.dll $SYSTEM64_DIR
%endif
%endif
# According to Kai Tietz (of the mingw-w64 project) it's recommended
# to set the environment variable GCOV_PREFIX_STRIP
@ -339,6 +333,7 @@ export GCOV_PREFIX_STRIP=1000
# Run the testsuite
# Code taken from the native Fedora GCC package to collect testsuite results
%ifarch i386 i586 i686
pushd build_win32
make -k check %{?_smp_mflags} || :
echo ====================TESTING WIN32=========================
@ -352,7 +347,9 @@ pushd build_win32
| uuencode testlogs-%{mingw32_target}.tar.bz2 || :
rm -rf testlogs-%{mingw32_target}-%{version}-%{release}
popd
%endif
%ifarch x86_64
pushd build_win64
make -k check %{?_smp_mflags} || :
echo ====================TESTING WIN64=========================
@ -366,6 +363,7 @@ pushd build_win64
| uuencode testlogs-%{mingw64_target}.tar.bz2 || :
rm -rf testlogs-%{mingw64_target}-%{version}-%{release}
popd
%endif
%endif
@ -636,6 +634,11 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-%{mingw64_target}-*
%changelog
* Wed Mar 28 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 4.7.0-1.20120322
- Update to gcc 4.7.0 final release (20120322 snapshot)
- Dropped upstreamed patches
- Enable the testsuite
* Tue Mar 6 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 4.7.0-0.9.20120224
- Re-enable libgomp support

View File

@ -1 +1 @@
efd453ff4dfe84ed08aa1f2287b299ef gcc-4.7.0-20120224.tar.bz2
94a2e611439eddb196421be8dee7828e gcc-4.7.0-20120322.tar.bz2