aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2011-03-28 03:01:22 -0500
committerWilliam Pitcock <nenolod@dereferenced.org>2011-03-28 03:01:22 -0500
commitf260a7f562cfefb8097041a1458c97b4859f2900 (patch)
treed8569d91ff478ac01b59dd37c90eaecdcd4082c6 /main/gcc
parent483bab0868b4286248a3f8ff6ea817fdeb993356 (diff)
downloadaports-f260a7f562cfefb8097041a1458c97b4859f2900.tar.bz2
aports-f260a7f562cfefb8097041a1458c97b4859f2900.tar.xz
Revert "main/gcc: upgrade to 4.6.0"
Too many issues before freeze to be system compiler. This reverts commit 747f87be523e41dc48e026c813b013e30334f79f.
Diffstat (limited to 'main/gcc')
-rw-r--r--main/gcc/09_all_gcc-4.5-Wtrampolines.patch64
-rw-r--r--main/gcc/APKBUILD28
-rw-r--r--main/gcc/PR32219.patch79
-rw-r--r--main/gcc/gcc-4.5-dynamic-linker.patch32
-rw-r--r--main/gcc/gcc-powerpc-target-optspace.patch13
-rw-r--r--main/gcc/gcc-spec-env.patch2
6 files changed, 178 insertions, 40 deletions
diff --git a/main/gcc/09_all_gcc-4.5-Wtrampolines.patch b/main/gcc/09_all_gcc-4.5-Wtrampolines.patch
new file mode 100644
index 0000000000..9c95c1e940
--- /dev/null
+++ b/main/gcc/09_all_gcc-4.5-Wtrampolines.patch
@@ -0,0 +1,64 @@
+2010-07-15 Magnus Granberg <zorry@gentoo.org>
+ Kevin F. Quinn <kevquinn@gentoo.org>
+
+ * builtins.c (expand_builtin_init_trampoline): If
+ -Wtrampolines make a warning.
+ * common.opt: Add -Wtrampolines.
+ * doc/invoke.texi: Add -Wtrampolines.
+
+2010-07-31 Magnus Granberg <zorry@gentoo.org>
+
+ #328451 set -Wtrampolines as default
+
+http://gcc.gnu.org/viewcvs?view=revision&revision=162205
+
+--- a/gcc/builtins.c
++++ b/gcc/builtins.c
+@@ -5155,6 +5155,10 @@ expand_builtin_init_trampoline (tree exp)
+ targetm.calls.trampoline_init (m_tramp, t_func, r_chain);
+
+ trampolines_created = 1;
++
++ warning_at (DECL_SOURCE_LOCATION (t_func), OPT_Wtrampolines,
++ "trampoline generated for nested function %qD", t_func);
++
+ return const0_rtx;
+ }
+
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -192,6 +192,10 @@ Wsystem-headers
+ Common Var(warn_system_headers) Warning
+ Do not suppress warnings from system headers
+
++Wtrampolines
++Common Var(warn_trampolines) Init(1) Warning
++Warn whenever a trampoline is generated
++
+ Wtype-limits
+ Common Var(warn_type_limits) Init(-1) Warning
+ Warn if a comparison is always true or always false due to the limited range of the data type
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -3611,6 +3611,21 @@ code. However, note that using @option{-Wall} in conjunction with this
+ option will @emph{not} warn about unknown pragmas in system
+ headers---for that, @option{-Wunknown-pragmas} must also be used.
+
++@item -Wtrampolines
++@opindex Wtrampolines
++@opindex Wno-trampolines
++ Warn about trampolines generated for pointers to nested functions.
++
++ NOTE: In Gentoo, @option{-Wtrampolines} is set by default.
++ To disable, specify @option{-Wno-trampolines}
++
++ A trampoline is a small piece of data or code that is created at run
++ time on the stack when the address of a nested function is taken, and
++ is used to call the nested function indirectly. For some targets, it
++ is made up of data only and thus requires no special treatment. But,
++ for most targets, it is made up of code and thus requires the stack
++ to be made executable in order for the program to work properly.
++
+ @item -Wfloat-equal
+ @opindex Wfloat-equal
+ @opindex Wno-float-equal
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD
index ae755b9735..46072d6af7 100644
--- a/main/gcc/APKBUILD
+++ b/main/gcc/APKBUILD
@@ -1,13 +1,13 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gcc
-pkgver=4.6.0
+pkgver=4.5.2
_piepatchver=0.4.5
_specs_ver=0.2.0
_specs_gcc_ver=4.4.3
_uclibc_abiver=0.9.32
-pkgrel=0
+pkgrel=6
pkgdesc="The GNU Compiler Collection"
url="http://gcc.gnu.org"
arch="all"
@@ -27,10 +27,11 @@ source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-core-$pkgver.tar.bz2
ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-g++-$pkgver.tar.bz2
ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-objc-$pkgver.tar.bz2
ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-java-$pkgver.tar.bz2
- http://dev.alpinelinux.org/~nenolod/gcc-4.6.0-piepatches-v${_piepatchver}-unofficial.tar.bz2
+ http://distfiles.gentoo.org/distfiles/gcc-4.5.1-piepatches-v${_piepatchver}.tar.bz2
http://distfiles.gentoo.org/distfiles/gcc-$_specs_gcc_ver-specs-$_specs_ver.tar.bz2
ftp://sourceware.org/pub/java/ecj-latest.jar
+ 09_all_gcc-4.5-Wtrampolines.patch
15_all_gcc-libgomp-no-werror.patch
51_all_gcc-3.4-libiberty-pic.patch
@@ -41,6 +42,7 @@ source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-core-$pkgver.tar.bz2
PR32219.patch
boehem-gc-uclibc.patch
gcc-pure64.patch
+ gcc-powerpc-target-optspace.patch
"
# we build out-of-tree
@@ -294,19 +296,21 @@ libgcj() {
mv "$pkgdir"/usr/share/java "$subpkgdir"/usr/share/
}
-md5sums="b1957f3209080b2f55bc3756d3a62b7c gcc-core-4.6.0.tar.bz2
-a30090fa655d0db4c970740d353c81f1 gcc-g++-4.6.0.tar.bz2
-120d4675366ee82ea52f9ed65b57da04 gcc-objc-4.6.0.tar.bz2
-bef3ebe5a76f4e2cc11cfa325d406803 gcc-java-4.6.0.tar.bz2
-f0d20d63b28e2e1a427362a88bd08a3c gcc-4.6.0-piepatches-v0.4.5-unofficial.tar.bz2
+md5sums="aa9e36bec080452372bfba793428ee82 gcc-core-4.5.2.tar.bz2
+9821f1c61e43755866861485ff364e90 gcc-g++-4.5.2.tar.bz2
+3561c6585e9062105cc3591a8c39d7dc gcc-objc-4.5.2.tar.bz2
+fe2b647bace18dc7867a4192def46e2c gcc-java-4.5.2.tar.bz2
+1f86fe5dc7d506b7fc04fcd8b7d2693c gcc-4.5.1-piepatches-v0.4.5.tar.bz2
441c76504e1d97170117c294e65c7a72 gcc-4.4.3-specs-0.2.0.tar.bz2
d7cd6a27c8801e66cbaa964a039ecfdb ecj-latest.jar
+ab090760506eb70aa4436a349c6bd788 09_all_gcc-4.5-Wtrampolines.patch
1c00bd9d12891a3e2311b32b98deb6fa 15_all_gcc-libgomp-no-werror.patch
45951dd3bbc979c9e043c7203745cf31 51_all_gcc-3.4-libiberty-pic.patch
-7eac80b9ac4801c6445a8d7bd3442d95 gcc-spec-env.patch
+c4045bfa85d8be780affd465be9d8ca8 gcc-spec-env.patch
2db1e3482c5dd59dab70f701afa2ca80 pt_gnu_eh_frame.patch
6cc2385c5bbd6d0da6eaedd53c8bf547 uclibc-getipinfo.patch
-3be85df859fa1d5c875bbfcc2dee8288 gcc-4.5-dynamic-linker.patch
-a14656158ad2eb74e5d80e495dbe6abf PR32219.patch
+7f35da0f88f4d9c3d3839498bbda0eb3 gcc-4.5-dynamic-linker.patch
+6c866c7fb8d56deb8f6d652bee64e228 PR32219.patch
2c6cb49bb9bfd8b6e690222e66ccc901 boehem-gc-uclibc.patch
-d1d3ad2b0c185b5548125a1b81bee154 gcc-pure64.patch"
+d1d3ad2b0c185b5548125a1b81bee154 gcc-pure64.patch
+ee7285772e6818c3cc96f781d5d2e92e gcc-powerpc-target-optspace.patch"
diff --git a/main/gcc/PR32219.patch b/main/gcc/PR32219.patch
index d30a53b991..b926e941fc 100644
--- a/main/gcc/PR32219.patch
+++ b/main/gcc/PR32219.patch
@@ -1,5 +1,60 @@
+From gcc-patches-return-258497-listarch-gcc-patches=gcc dot gnu dot org at gcc dot gnu dot org Tue Mar 16 13:32:55 2010
+Return-Path: <gcc-patches-return-258497-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 25550 invoked by alias); 16 Mar 2010 13:32:54 -0000
+Received: (qmail 25534 invoked by uid 22791); 16 Mar 2010 13:32:53 -0000
+X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,SUBJ_ALL_CAPS
+X-Spam-Check-By: sourceware.org
+Received: from mail-bw0-f210.google.com (HELO mail-bw0-f210.google.com) (209.85.218.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Mar 2010 13:32:48 +0000
+Received: by bwz2 with SMTP id 2so4002140bwz.30 for <multiple recipients>; Tue, 16 Mar 2010 06:32:45 -0700 (PDT)
+Received: by 10.204.14.84 with SMTP id f20mr2900449bka.209.1268746365293; Tue, 16 Mar 2010 06:32:45 -0700 (PDT)
+Received: from s42.loc (85-127-85-230.dynamic.xdsl-line.inode.at [85.127.85.230]) by mx.google.com with ESMTPS id 14sm3626793bwz.14.2010.03.16.06.32.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 16 Mar 2010 06:32:44 -0700 (PDT)
+Received: from cow by s42.loc with local (Exim 4.71) (envelope-from <rep.dot.nop@gmail.com>) id 1NrX2W-0008Nj-5o; Tue, 16 Mar 2010 14:42:32 +0100
+From: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
+To: gcc-patches at gcc dot gnu dot org
+Cc: rguenth at gcc dot gnu dot org, Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
+Subject: [PATCH] PR32219
+Date: Tue, 16 Mar 2010 14:42:27 +0100
+Message-Id: <1268746947-32108-1-git-send-email-rep.dot.nop@gmail.com>
+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,
+
+As suggested by richi.
+regtested on i686-linux-gnu with all default languages and no regressions.
+Ok for trunk?
+
+gcc/ChangeLog
+2010-03-15 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
+
+ PR target/32219
+ * varasm.c (default_binds_local_p_1): Weak data is not local.
+
+gcc/testsuite/ChangeLog
+2010-03-15 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
+
+ PR target/32219
+ * gcc.dg/visibility-21.c: New test.
+
+Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
+---
+ gcc/testsuite/gcc.dg/visibility-21.c | 14 ++++++++++++++
+ gcc/varasm.c | 8 ++++----
+ 2 files changed, 18 insertions(+), 4 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.dg/visibility-21.c
+
+diff --git a/gcc/testsuite/gcc.dg/visibility-21.c b/gcc/testsuite/gcc.dg/visibility-21.c
+new file mode 100644
+index 0000000..be7deda
--- /dev/null
-+++ gcc-4.6.0/gcc/testsuite/gcc.dg/visibility-21.c
++++ b/gcc/testsuite/gcc.dg/visibility-21.c
@@ -0,0 +1,14 @@
+/* PR target/32219 */
+/* { dg-do run } */
@@ -15,9 +70,11 @@
+ return 0;
+}
+
---- gcc-4.6.0.orig/gcc/varasm.c
-+++ gcc-4.6.0/gcc/varasm.c
-@@ -6754,6 +6754,10 @@
+diff --git a/gcc/varasm.c b/gcc/varasm.c
+index 6b8222f..6b9269a 100644
+--- a/gcc/varasm.c
++++ b/gcc/varasm.c
+@@ -6613,6 +6613,10 @@ default_binds_local_p_1 (const_tree exp, int shlib)
/* Static variables are always local. */
else if (! TREE_PUBLIC (exp))
local_p = true;
@@ -27,16 +84,18 @@
+ local_p = false;
/* A variable is local if the user has said explicitly that it will
be. */
- else if ((DECL_VISIBILITY_SPECIFIED (exp)
-@@ -6767,11 +6771,6 @@
+ else if (DECL_VISIBILITY_SPECIFIED (exp)
+@@ -6625,10 +6629,6 @@ default_binds_local_p_1 (const_tree exp, int shlib)
local. */
else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
local_p = true;
- /* Default visibility weak data can be overridden by a strong symbol
- in another module and so are not local. */
-- else if (DECL_WEAK (exp)
-- && !resolved_locally)
+- else if (DECL_WEAK (exp))
- local_p = false;
/* If PIC, then assume that any global name can be overridden by
- symbols resolved from other modules. */
- else if (shlib)
+ symbols resolved from other modules, unless we are compiling with
+ -fwhole-program, which assumes that names are local. */
+--
+1.7.0
+
diff --git a/main/gcc/gcc-4.5-dynamic-linker.patch b/main/gcc/gcc-4.5-dynamic-linker.patch
index a6b235cd19..a11c7f934e 100644
--- a/main/gcc/gcc-4.5-dynamic-linker.patch
+++ b/main/gcc/gcc-4.5-dynamic-linker.patch
@@ -17,7 +17,7 @@ index ae2416b..b0b9b2c 100644
@@ -971,7 +971,7 @@ INTERNAL_CFLAGS = -DIN_GCC @CROSS@
# This is the variable actually used when we compile. If you change this,
# you probably want to update BUILD_CFLAGS in configure.ac
- ALL_CFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \
+ ALL_CFLAGS = $(T_CFLAGS) \
- $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@
+ $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@ @NOSTDINC@
@@ -57,8 +57,8 @@ index c48fc93..3068717 100644
-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
+#define UCLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
+ #if UCLIBC_DEFAULT
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
#else
diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
index fce1ed1..c3bcd50 100644
@@ -94,8 +94,8 @@ index 5c716cd..b5e464e 100644
%{shared:-G -Bdynamic} \
%{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
-- -dynamic-linker /lib/ld-uClibc.so.0} \
-+ -dynamic-linker DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER} \
+- %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
++ %{!dynamic-linker:-dynamic-linker DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER}} \
%{static}} -init __init -fini __fini"
#define MD_UNWIND_SUPPORT "config/bfin/linux-unwind.h"
@@ -207,13 +207,13 @@ index e567e9a..c052fd0 100644
+#define UCLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
+#define UCLIBC_DYNAMIC_LINKER32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
+#define UCLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
- #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
+ #define LINUX_DYNAMIC_LINKER \
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
+ #define LINUX_DYNAMIC_LINKER32 \
@@ -135,3 +135,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #define TARGET_HAS_SINCOS (OPTION_GLIBC)
- /* Whether we have sincos that follows the GNU extension. */
- #define TARGET_HAS_SINCOS (OPTION_GLIBC || OPTION_BIONIC)
+ #define TARGET_POSIX_IO
+
+#ifdef NOSTDINC
+#undef STANDARD_INCLUDE_DIR
@@ -270,15 +270,13 @@ index 2f24dfa..850cb22 100644
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
-#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
-#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
--#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
+#define GLIBC_DYNAMIC_LINKER32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
+#define GLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
+#define GLIBC_DYNAMIC_LINKERN32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
+#define UCLIBC_DYNAMIC_LINKERN32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-+#define BIONIC_DYNAMIC_LINKERN32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
#define LINUX_DYNAMIC_LINKERN32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
- BIONIC_DYNAMIC_LINKERN32)
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
+
diff --git a/gcc/config/mn10300/linux.h b/gcc/config/mn10300/linux.h
index ac9f8c5..8ab78b1 100644
--- a/gcc/config/mn10300/linux.h
@@ -308,9 +306,9 @@ index da7bca3..c36e7d6 100644
+#define GLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
+#define UCLIBC_DYNAMIC_LINKER32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
+#define UCLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
+ #if UCLIBC_DEFAULT
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
+ #else
diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h
index ddbcfa9..59bfd28 100644
--- a/gcc/config/s390/linux.h
diff --git a/main/gcc/gcc-powerpc-target-optspace.patch b/main/gcc/gcc-powerpc-target-optspace.patch
new file mode 100644
index 0000000000..d812863ea5
--- /dev/null
+++ b/main/gcc/gcc-powerpc-target-optspace.patch
@@ -0,0 +1,13 @@
+--- a/libgcc/config/rs6000/t-ppccomm 2010/04/06 11:07:48 157989
++++ b/libgcc/config/rs6000/t-ppccomm 2011/02/23 18:06:29 170443
+@@ -15,7 +15,9 @@
+ e500crtsavg64gpr.S \
+ e500crtsavg64gprctr.S
+
+-EXTRA_PARTS += ecrti$(objext) ecrtn$(objext) ncrti$(objext) ncrtn$(objext)
++EXTRA_PARTS += crtbegin$(objext) crtend$(objext) \
++ crtbeginS$(objext) crtendS$(objext) crtbeginT$(objext) \
++ ecrti$(objext) ecrtn$(objext) ncrti$(objext) ncrtn$(objext)
+
+ # We build {e,n}crti.o and {e,n}crtn.o, which serve to add begin and
+ # end labels to all of the special sections used when we link using gcc.
diff --git a/main/gcc/gcc-spec-env.patch b/main/gcc/gcc-spec-env.patch
index f891d57f51..9d5e666a54 100644
--- a/main/gcc/gcc-spec-env.patch
+++ b/main/gcc/gcc-spec-env.patch
@@ -15,7 +15,7 @@
+ * each spec listed, the string is overwritten at token boundaries
+ * (':') with '\0', an effect of strtok_r().
+ */
-+ specs_file = getenv("GCC_SPECS");
++ GET_ENVIRONMENT (specs_file, "GCC_SPECS");
+ if (specs_file && (strlen(specs_file) > 0))
+ {
+ char *spec, *saveptr;