aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/gcc/08_all_cross-compile.patch (renamed from testing/gcc/08_all_cross-compile.patch)0
-rw-r--r--main/gcc/09_all_gcc-4.5-Wtrampolines.patch64
-rw-r--r--main/gcc/11_all_default-warn-format-security.patch (renamed from testing/gcc/11_all_default-warn-format-security.patch)0
-rw-r--r--main/gcc/12_all_default-warn-trampolines.patch (renamed from testing/gcc/12_all_default-warn-trampolines.patch)0
-rw-r--r--main/gcc/15_all_gcc-libgomp-no-werror.patch16
-rw-r--r--main/gcc/15_all_libgomp-Werror.patch (renamed from testing/gcc/15_all_libgomp-Werror.patch)0
-rw-r--r--main/gcc/34_all_ia64_note.GNU-stack.patch (renamed from testing/gcc/34_all_ia64_note.GNU-stack.patch)0
-rw-r--r--main/gcc/50_all_pr45312-kernel-miscompile.patch181
-rw-r--r--main/gcc/51_all_gcc-3.4-libiberty-pic.patch10
-rw-r--r--main/gcc/51_all_libiberty-pic.patch (renamed from testing/gcc/51_all_libiberty-pic.patch)0
-rw-r--r--main/gcc/74_all_gcc46_cloog-dl.patch (renamed from testing/gcc/74_all_gcc46_cloog-dl.patch)0
-rw-r--r--main/gcc/APKBUILD120
-rw-r--r--main/gcc/PR32219.patch101
-rw-r--r--main/gcc/gcc-4.5-dynamic-linker.patch457
-rw-r--r--main/gcc/gcc-4.6-dynamic-linker.patch (renamed from testing/gcc/gcc-4.6-dynamic-linker.patch)0
-rw-r--r--main/gcc/gcc-4.6-pr32219.patch (renamed from testing/gcc/gcc-4.6-pr32219.patch)0
-rw-r--r--main/gcc/gcc-go.patch (renamed from testing/gcc/gcc-go.patch)0
-rw-r--r--main/gcc/gcc-libgcc-x86.get_pc_thunk.bx.patch (renamed from testing/gcc/gcc-libgcc-x86.get_pc_thunk.bx.patch)0
-rw-r--r--main/gcc/gcc-spec-env.patch7
-rw-r--r--main/gcc/gcc4-stack-protector-uclibc-no_tls.patch84
-rw-r--r--testing/gcc/APKBUILD381
-rw-r--r--testing/gcc/boehem-gc-uclibc.patch11
-rw-r--r--testing/gcc/gcc-pure64.patch12
-rw-r--r--testing/gcc/gcc-spec-env.patch42
-rw-r--r--testing/gcc/pt_gnu_eh_frame.patch12
-rw-r--r--testing/gcc/uclibc-getipinfo.patch19
26 files changed, 96 insertions, 1421 deletions
diff --git a/testing/gcc/08_all_cross-compile.patch b/main/gcc/08_all_cross-compile.patch
index 4203e3a623..4203e3a623 100644
--- a/testing/gcc/08_all_cross-compile.patch
+++ b/main/gcc/08_all_cross-compile.patch
diff --git a/main/gcc/09_all_gcc-4.5-Wtrampolines.patch b/main/gcc/09_all_gcc-4.5-Wtrampolines.patch
deleted file mode 100644
index 9c95c1e940..0000000000
--- a/main/gcc/09_all_gcc-4.5-Wtrampolines.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-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/testing/gcc/11_all_default-warn-format-security.patch b/main/gcc/11_all_default-warn-format-security.patch
index 5dbab43f1d..5dbab43f1d 100644
--- a/testing/gcc/11_all_default-warn-format-security.patch
+++ b/main/gcc/11_all_default-warn-format-security.patch
diff --git a/testing/gcc/12_all_default-warn-trampolines.patch b/main/gcc/12_all_default-warn-trampolines.patch
index a5606c5ecd..a5606c5ecd 100644
--- a/testing/gcc/12_all_default-warn-trampolines.patch
+++ b/main/gcc/12_all_default-warn-trampolines.patch
diff --git a/main/gcc/15_all_gcc-libgomp-no-werror.patch b/main/gcc/15_all_gcc-libgomp-no-werror.patch
deleted file mode 100644
index 1c3ec3a1e5..0000000000
--- a/main/gcc/15_all_gcc-libgomp-no-werror.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-libgomp does not respect --disable-werror
-
-http://bugs.gentoo.org/229059
-http://gcc.gnu.org/PR38436
-
---- gcc-4.3.2/libgomp/configure
-+++ gcc-4.3.2/libgomp/configure
-@@ -3297,7 +3297,7 @@
-
- # Add -Wall -Werror if we are using GCC.
- if test "x$GCC" = "xyes"; then
-- XCFLAGS="$XCFLAGS -Wall -Werror"
-+ XCFLAGS="$XCFLAGS -Wall"
- fi
-
- # Find other programs we need.
diff --git a/testing/gcc/15_all_libgomp-Werror.patch b/main/gcc/15_all_libgomp-Werror.patch
index 3456e8ae82..3456e8ae82 100644
--- a/testing/gcc/15_all_libgomp-Werror.patch
+++ b/main/gcc/15_all_libgomp-Werror.patch
diff --git a/testing/gcc/34_all_ia64_note.GNU-stack.patch b/main/gcc/34_all_ia64_note.GNU-stack.patch
index b156eacb29..b156eacb29 100644
--- a/testing/gcc/34_all_ia64_note.GNU-stack.patch
+++ b/main/gcc/34_all_ia64_note.GNU-stack.patch
diff --git a/main/gcc/50_all_pr45312-kernel-miscompile.patch b/main/gcc/50_all_pr45312-kernel-miscompile.patch
deleted file mode 100644
index b9b1a7d7f0..0000000000
--- a/main/gcc/50_all_pr45312-kernel-miscompile.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-GCC 4.4.4 miscompiles the Linux kernel
-http://gcc.gnu.org/PR45312
-https://bugzilla.kernel.org/show_bug.cgi?id=16612
-https://bugs.gentoo.org/334269
-
---- a/gcc/reload1.c
-+++ b/gcc/reload1.c
-@@ -431,7 +431,6 @@ static void failed_reload (rtx, int);
- static int set_reload_reg (int, int);
- static void choose_reload_regs_init (struct insn_chain *, rtx *);
- static void choose_reload_regs (struct insn_chain *);
--static void merge_assigned_reloads (rtx);
- static void emit_input_reload_insns (struct insn_chain *, struct reload *,
- rtx, int);
- static void emit_output_reload_insns (struct insn_chain *, struct reload *,
-@@ -4215,12 +4214,6 @@ reload_as_needed (int live_known)
- Record the choices of reload reg in reload_reg_rtx. */
- choose_reload_regs (chain);
-
-- /* Merge any reloads that we didn't combine for fear of
-- increasing the number of spill registers needed but now
-- discover can be safely merged. */
-- if (SMALL_REGISTER_CLASSES)
-- merge_assigned_reloads (insn);
--
- /* Generate the insns to reload operands into or out of
- their reload regs. */
- emit_reload_insns (chain);
-@@ -6598,152 +6591,6 @@ deallocate_reload_reg (int r)
- reload_spill_index[r] = -1;
- }
-
--/* If SMALL_REGISTER_CLASSES is nonzero, we may not have merged two
-- reloads of the same item for fear that we might not have enough reload
-- registers. However, normally they will get the same reload register
-- and hence actually need not be loaded twice.
--
-- Here we check for the most common case of this phenomenon: when we have
-- a number of reloads for the same object, each of which were allocated
-- the same reload_reg_rtx, that reload_reg_rtx is not used for any other
-- reload, and is not modified in the insn itself. If we find such,
-- merge all the reloads and set the resulting reload to RELOAD_OTHER.
-- This will not increase the number of spill registers needed and will
-- prevent redundant code. */
--
--static void
--merge_assigned_reloads (rtx insn)
--{
-- int i, j;
--
-- /* Scan all the reloads looking for ones that only load values and
-- are not already RELOAD_OTHER and ones whose reload_reg_rtx are
-- assigned and not modified by INSN. */
--
-- for (i = 0; i < n_reloads; i++)
-- {
-- int conflicting_input = 0;
-- int max_input_address_opnum = -1;
-- int min_conflicting_input_opnum = MAX_RECOG_OPERANDS;
--
-- if (rld[i].in == 0 || rld[i].when_needed == RELOAD_OTHER
-- || rld[i].out != 0 || rld[i].reg_rtx == 0
-- || reg_set_p (rld[i].reg_rtx, insn))
-- continue;
--
-- /* Look at all other reloads. Ensure that the only use of this
-- reload_reg_rtx is in a reload that just loads the same value
-- as we do. Note that any secondary reloads must be of the identical
-- class since the values, modes, and result registers are the
-- same, so we need not do anything with any secondary reloads. */
--
-- for (j = 0; j < n_reloads; j++)
-- {
-- if (i == j || rld[j].reg_rtx == 0
-- || ! reg_overlap_mentioned_p (rld[j].reg_rtx,
-- rld[i].reg_rtx))
-- continue;
--
-- if (rld[j].when_needed == RELOAD_FOR_INPUT_ADDRESS
-- && rld[j].opnum > max_input_address_opnum)
-- max_input_address_opnum = rld[j].opnum;
--
-- /* If the reload regs aren't exactly the same (e.g, different modes)
-- or if the values are different, we can't merge this reload.
-- But if it is an input reload, we might still merge
-- RELOAD_FOR_INPUT_ADDRESS and RELOAD_FOR_OTHER_ADDRESS reloads. */
--
-- if (! rtx_equal_p (rld[i].reg_rtx, rld[j].reg_rtx)
-- || rld[j].out != 0 || rld[j].in == 0
-- || ! rtx_equal_p (rld[i].in, rld[j].in))
-- {
-- if (rld[j].when_needed != RELOAD_FOR_INPUT
-- || ((rld[i].when_needed != RELOAD_FOR_INPUT_ADDRESS
-- || rld[i].opnum > rld[j].opnum)
-- && rld[i].when_needed != RELOAD_FOR_OTHER_ADDRESS))
-- break;
-- conflicting_input = 1;
-- if (min_conflicting_input_opnum > rld[j].opnum)
-- min_conflicting_input_opnum = rld[j].opnum;
-- }
-- }
--
-- /* If all is OK, merge the reloads. Only set this to RELOAD_OTHER if
-- we, in fact, found any matching reloads. */
--
-- if (j == n_reloads
-- && max_input_address_opnum <= min_conflicting_input_opnum)
-- {
-- gcc_assert (rld[i].when_needed != RELOAD_FOR_OUTPUT);
--
-- for (j = 0; j < n_reloads; j++)
-- if (i != j && rld[j].reg_rtx != 0
-- && rtx_equal_p (rld[i].reg_rtx, rld[j].reg_rtx)
-- && (! conflicting_input
-- || rld[j].when_needed == RELOAD_FOR_INPUT_ADDRESS
-- || rld[j].when_needed == RELOAD_FOR_OTHER_ADDRESS))
-- {
-- rld[i].when_needed = RELOAD_OTHER;
-- rld[j].in = 0;
-- reload_spill_index[j] = -1;
-- transfer_replacements (i, j);
-- }
--
-- /* If this is now RELOAD_OTHER, look for any reloads that
-- load parts of this operand and set them to
-- RELOAD_FOR_OTHER_ADDRESS if they were for inputs,
-- RELOAD_OTHER for outputs. Note that this test is
-- equivalent to looking for reloads for this operand
-- number.
--
-- We must take special care with RELOAD_FOR_OUTPUT_ADDRESS;
-- it may share registers with a RELOAD_FOR_INPUT, so we can
-- not change it to RELOAD_FOR_OTHER_ADDRESS. We should
-- never need to, since we do not modify RELOAD_FOR_OUTPUT.
--
-- It is possible that the RELOAD_FOR_OPERAND_ADDRESS
-- instruction is assigned the same register as the earlier
-- RELOAD_FOR_OTHER_ADDRESS instruction. Merging these two
-- instructions will cause the RELOAD_FOR_OTHER_ADDRESS
-- instruction to be deleted later on. */
--
-- if (rld[i].when_needed == RELOAD_OTHER)
-- for (j = 0; j < n_reloads; j++)
-- if (rld[j].in != 0
-- && rld[j].when_needed != RELOAD_OTHER
-- && rld[j].when_needed != RELOAD_FOR_OTHER_ADDRESS
-- && rld[j].when_needed != RELOAD_FOR_OUTPUT_ADDRESS
-- && rld[j].when_needed != RELOAD_FOR_OPERAND_ADDRESS
-- && (! conflicting_input
-- || rld[j].when_needed == RELOAD_FOR_INPUT_ADDRESS
-- || rld[j].when_needed == RELOAD_FOR_INPADDR_ADDRESS)
-- && reg_overlap_mentioned_for_reload_p (rld[j].in,
-- rld[i].in))
-- {
-- int k;
--
-- rld[j].when_needed
-- = ((rld[j].when_needed == RELOAD_FOR_INPUT_ADDRESS
-- || rld[j].when_needed == RELOAD_FOR_INPADDR_ADDRESS)
-- ? RELOAD_FOR_OTHER_ADDRESS : RELOAD_OTHER);
--
-- /* Check to see if we accidentally converted two
-- reloads that use the same reload register with
-- different inputs to the same type. If so, the
-- resulting code won't work. */
-- if (rld[j].reg_rtx)
-- for (k = 0; k < j; k++)
-- gcc_assert (rld[k].in == 0 || rld[k].reg_rtx == 0
-- || rld[k].when_needed != rld[j].when_needed
-- || !rtx_equal_p (rld[k].reg_rtx,
-- rld[j].reg_rtx)
-- || rtx_equal_p (rld[k].in,
-- rld[j].in));
-- }
-- }
-- }
--}
--
- /* These arrays are filled by emit_reload_insns and its subroutines. */
- static rtx input_reload_insns[MAX_RECOG_OPERANDS];
- static rtx other_input_address_reload_insns = 0;
diff --git a/main/gcc/51_all_gcc-3.4-libiberty-pic.patch b/main/gcc/51_all_gcc-3.4-libiberty-pic.patch
deleted file mode 100644
index d9a95a21b1..0000000000
--- a/main/gcc/51_all_gcc-3.4-libiberty-pic.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- gcc-4.1.0-orig/libiberty/Makefile.in 2006-03-01 15:49:14.000000000 -0500
-+++ gcc-4.1.0/libiberty/Makefile.in 2006-03-01 18:10:46.000000000 -0500
-@@ -232,6 +232,7 @@
- $(AR) $(AR_FLAGS) $(TARGETLIB) \
- $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
- $(RANLIB) $(TARGETLIB); \
-+ cp $(TARGETLIB) ../ ; \
- cd ..; \
- else true; fi
-
diff --git a/testing/gcc/51_all_libiberty-pic.patch b/main/gcc/51_all_libiberty-pic.patch
index b6160a7307..b6160a7307 100644
--- a/testing/gcc/51_all_libiberty-pic.patch
+++ b/main/gcc/51_all_libiberty-pic.patch
diff --git a/testing/gcc/74_all_gcc46_cloog-dl.patch b/main/gcc/74_all_gcc46_cloog-dl.patch
index 21ceb25b7c..21ceb25b7c 100644
--- a/testing/gcc/74_all_gcc46_cloog-dl.patch
+++ b/main/gcc/74_all_gcc46_cloog-dl.patch
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD
index 1c2c0d72f1..3d5ce070e9 100644
--- a/main/gcc/APKBUILD
+++ b/main/gcc/APKBUILD
@@ -1,48 +1,68 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gcc
-pkgver=4.5.3
+pkgver=4.6.1
_piepatchver=0.4.5
_specs_ver=0.2.0
_specs_gcc_ver=4.4.3
_uclibc_abiver=0.9.32
-pkgrel=0
+pkgrel=3
pkgdesc="The GNU Compiler Collection"
url="http://gcc.gnu.org"
arch="all"
license="GPL LGPL"
depends="binutils libgcc libgomp libobjc"
-makedepends="bison flex gmp-dev mpfr-dev texinfo libmpc-dev gawk zlib-dev zip"
-subpackages="$pkgname-doc libstdc++:libcxx g++:gpp libgcc libgomp"
+makedepends="bison flex gmp-dev mpfr-dev texinfo libmpc-dev gawk zlib-dev zip
+ cloog-dev"
+subpackages="$pkgname-doc libstdc++:libcxx g++:gpp libgcc libgomp $pkgname-go
+ libgo"
replaces="libstdc++"
+if [ -n "$BOOTSTRAP" ]; then
+ LANG_OBJC=off
+ LANG_JAVA=off
+fi
+
if [ "$LANG_OBJC" != "off" ]; then
subpackages="$subpackages libobjc"
fi
if [ "$LANG_JAVA" != "off" ]; then
subpackages="$subpackages $pkgname-java libgcj"
+ makedepends="$makedepends paxctl"
fi
+if [ "$LANG_GO" != "off" ]; then
+ _languages="$_languages,go"
+ fi
+
+
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://distfiles.gentoo.org/distfiles/gcc-4.5.1-piepatches-v${_piepatchver}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-go-$pkgver.tar.bz2
+ http://distfiles.gentoo.org/distfiles/gcc-4.6.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
+ 08_all_cross-compile.patch
+ 11_all_default-warn-format-security.patch
+ 12_all_default-warn-trampolines.patch
+ 15_all_libgomp-Werror.patch
+ 34_all_ia64_note.GNU-stack.patch
+ 51_all_libiberty-pic.patch
+ 74_all_gcc46_cloog-dl.patch
gcc-spec-env.patch
pt_gnu_eh_frame.patch
uclibc-getipinfo.patch
- gcc-4.5-dynamic-linker.patch
- PR32219.patch
+ gcc-4.6-dynamic-linker.patch
+ gcc-4.6-pr32219.patch
boehem-gc-uclibc.patch
gcc-pure64.patch
+ gcc-go.patch
+ gcc-libgcc-x86.get_pc_thunk.bx.patch
"
# we build out-of-tree
@@ -61,19 +81,28 @@ prepare() {
# thanks to Zorry for hard work on those patches
for i in "$srcdir"/piepatch/*.patch; do
msg "Applying $i"
- patch -p0 -i $i || return 1
+ patch -p0 -i $i || patch -p1 -i $i || return 1
done
# Gentoo and uclibc patches
+ _err=
for i in $source; do
case "$i" in
*.patch)
msg "Applying $i"
- patch -p1 -i "$srcdir"/$i || return 1
+ patch -p1 -i "$srcdir"/$i || _err="$_err $i"
;;
esac
done
+ if [ -n "$_err" ]; then
+ error "The following patches failed:"
+ for i in $_err; do
+ echo " $i"
+ done
+ return 1
+ fi
+
#PR33200
sed -i 's/use_fixproto=yes/:/' gcc/config.gcc || return 1
@@ -123,6 +152,10 @@ build() {
_languages="$_languages,java"
fi
+ if [ "$LANG_GO" != "off" ]; then
+ _languages="$_languages,go"
+ fi
+
# --enable-target-optspace is broken on powerpc
if [ "$CARCH" != "powerpc" ]; then
_target_optspace="--enable-target-optspace"
@@ -146,7 +179,7 @@ build() {
--build=${CBUILD} \
--host=${CHOST} \
--target=${CTARGET} \
- --with-pkgversion='Alpine' \
+ --with-pkgversion="Alpine ${pkgver}-r${pkgrel}" \
--disable-altivec \
--disable-checking \
--disable-fixed-point \
@@ -158,6 +191,7 @@ build() {
--enable-__cxa_atexit \
--enable-cld \
--enable-esp \
+ --enable-cloog-backend \
--enable-languages=$_languages \
--enable-shared \
$_target_optspace \
@@ -174,6 +208,8 @@ build() {
package() {
cd "$_builddir"
make -j1 DESTDIR="${pkgdir}" install || return 1
+ find "$pkgdir" -name '*.la' -delete || return 1
+
ln -s gcc "$pkgdir"/usr/bin/cc
# binutils provides libiberty.a
@@ -255,6 +291,7 @@ libgomp() {
java() {
pkgdesc="Java support for GCC"
+ paxctl -c -p -e -m "$pkgdir"/usr/libexec/gcc/*/*/ecj1 || return 1
mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib
cd "$pkgdir"/usr/bin
mv gcj gcj-dbtool gjavah gcjh jcf-dump "$subpkgdir"/usr/bin/
@@ -265,9 +302,7 @@ java() {
done
mv \
"$pkgdir"/usr/lib/libgcj*.so \
- "$pkgdir"/usr/lib/libgcj*.la \
"$pkgdir"/usr/lib/libgij.so \
- "$pkgdir"/usr/lib/libgij.la \
"$pkgdir"/usr/lib/libgcj.spec \
"$subpkgdir"/usr/lib/
}
@@ -297,21 +332,50 @@ libgcj() {
mkdir -p "$subpkgdir"/usr/share/
mv "$pkgdir"/usr/share/java "$subpkgdir"/usr/share/
}
-
-md5sums="98be5094b5b5a7b9087494291bc7f522 gcc-core-4.5.3.tar.bz2
-2c78bf1d5f08a0b116f280de88d3ffe7 gcc-g++-4.5.3.tar.bz2
-9bb53e37e589515ba55979a19be9c036 gcc-objc-4.5.3.tar.bz2
-08e045fdbdc22ac9af3aec3b8d16dbab gcc-java-4.5.3.tar.bz2
-1f86fe5dc7d506b7fc04fcd8b7d2693c gcc-4.5.1-piepatches-v0.4.5.tar.bz2
+
+libgo() {
+ pkgdesc="Go runtime library for GCC"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
+}
+
+go() {
+ pkgdesc="Go support for GCC"
+ depends="libgo"
+ local libexec=usr/libexec/gcc/${CHOST:-$_chost}/$pkgver
+ mkdir -p "$subpkgdir"/$libexec \
+ "$subpkgdir"/usr/lib \
+ "$subpkgdir"/usr/bin || return 1
+ mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/ || return 1
+ mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/ || return 1
+ mv "$pkgdir"/$libexec/go1 "$subpkgdir"/$libexec/ || return 1
+ mv "$pkgdir"/usr/lib/libgo.a \
+ "$pkgdir"/usr/lib/libgo.so \
+ "$pkgdir"/usr/lib/libgobegin.a \
+ "$subpkgdir"/usr/lib/ || return 1
+}
+
+md5sums="0c0e7e35d2215e19de9c97efba507553 gcc-core-4.6.1.tar.bz2
+0d75ca7ca35b1e7f252223f9d23a6ad1 gcc-g++-4.6.1.tar.bz2
+cbf0d4b701827922cf37ba6a4ace0079 gcc-objc-4.6.1.tar.bz2
+32431ba42c1d18e64f2abfdfc834ef94 gcc-java-4.6.1.tar.bz2
+a69f9f156172c2e1da5590faa70f4fc7 gcc-go-4.6.1.tar.bz2
+5dc7efd84b526801b94fed21462aea62 gcc-4.6.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
-c4045bfa85d8be780affd465be9d8ca8 gcc-spec-env.patch
+b1b5987e7c53f2c8a0fa929444bd9129 08_all_cross-compile.patch
+34e4a0260e9dbd434ac84b9dda381240 11_all_default-warn-format-security.patch
+a78022925c0ecb1f13384238b81adbe7 12_all_default-warn-trampolines.patch
+6862cb5268fef68a4a1906e0c4ea0d46 15_all_libgomp-Werror.patch
+1a8ce6b7a0b9a115e37fdda311704451 34_all_ia64_note.GNU-stack.patch
+d8692c56f04b92667096f59d843e95c5 51_all_libiberty-pic.patch
+656565d2e2c30ea12a398ef6959a9391 74_all_gcc46_cloog-dl.patch
+a695d7648509b4f8e18b389a19e6037c gcc-spec-env.patch
2db1e3482c5dd59dab70f701afa2ca80 pt_gnu_eh_frame.patch
6cc2385c5bbd6d0da6eaedd53c8bf547 uclibc-getipinfo.patch
-7f35da0f88f4d9c3d3839498bbda0eb3 gcc-4.5-dynamic-linker.patch
-6c866c7fb8d56deb8f6d652bee64e228 PR32219.patch
+3be85df859fa1d5c875bbfcc2dee8288 gcc-4.6-dynamic-linker.patch
+32e8e4c0e23ed8f5de95a591cb30f1da gcc-4.6-pr32219.patch
2c6cb49bb9bfd8b6e690222e66ccc901 boehem-gc-uclibc.patch
-d1d3ad2b0c185b5548125a1b81bee154 gcc-pure64.patch"
+d1d3ad2b0c185b5548125a1b81bee154 gcc-pure64.patch
+c94014ece84407a36d239417a2bad25d gcc-go.patch
+978e3fac97ad99902a86bafc6f283727 gcc-libgcc-x86.get_pc_thunk.bx.patch"
diff --git a/main/gcc/PR32219.patch b/main/gcc/PR32219.patch
deleted file mode 100644
index b926e941fc..0000000000
--- a/main/gcc/PR32219.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-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
-+++ b/gcc/testsuite/gcc.dg/visibility-21.c
-@@ -0,0 +1,14 @@
-+/* PR target/32219 */
-+/* { dg-do run } */
-+/* { dg-require-visibility "" } */
-+/* { dg-options "-fPIC" { target fpic } } */
-+
-+extern void f() __attribute__((weak,visibility("hidden")));
-+extern int puts( char const* );
-+int main()
-+{
-+ if (f)
-+ f();
-+ return 0;
-+}
-+
-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;
-+ /* Weak data can be overridden by a strong symbol
-+ in another module and so are not local. */
-+ else if (DECL_WEAK (exp))
-+ local_p = false;
- /* A variable is local if the user has said explicitly that it will
- be. */
- 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))
-- local_p = false;
- /* If PIC, then assume that any global name can be overridden by
- 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
deleted file mode 100644
index a11c7f934e..0000000000
--- a/main/gcc/gcc-4.5-dynamic-linker.patch
+++ /dev/null
@@ -1,457 +0,0 @@
-commit d929f627aba264e63cf779cd4ca51af97b076445
-Author: Natanael Copa <ncopa@alpinelinux.org>
-Date: Tue Sep 28 09:45:17 2010 +0000
-
- Submitted By: Kevin Day <thekevinday AT gmail DOT com>
- Date: 2008-12-19
- Initial Package Version: 4.3.2
- Upstream Status: Not submitted
- Description: Why not just be able to define the prefix of the dynamic linker instead of hardcoding it..
- This includes the --nostdinc patch as well, so think of this as a specs-3 patch
- This also allows for specifying the dynamic-linker as well
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index ae2416b..b0b9b2c 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -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 = $(T_CFLAGS) \
-- $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@
-+ $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@ @NOSTDINC@
-
- # The C++ version.
- ALL_CXXFLAGS = $(T_CFLAGS) $(CXXFLAGS) $(INTERNAL_CFLAGS) \
-@@ -2105,6 +2105,8 @@ DRIVER_DEFINES = \
- -DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \
- -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
- -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \
-+ -DDYNAMIC_LINKER_PREFIX=\"@DYNAMICLINKERPREFIX@\" \
-+ -DDYNAMIC_LINKER=\"@DYNAMICLINKER@\" \
- -DDEFAULT_TARGET_VERSION=\"$(version)\" \
- -DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\" \
- -DSTANDARD_BINDIR_PREFIX=\"$(bindir)/\" \
-diff --git a/gcc/config/alpha/gnu.h b/gcc/config/alpha/gnu.h
-index f98c3e7..bd16dcf 100644
---- a/gcc/config/alpha/gnu.h
-+++ b/gcc/config/alpha/gnu.h
-@@ -34,7 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- } while (0)
-
- #undef ELF_DYNAMIC_LINKER
--#define ELF_DYNAMIC_LINKER "/lib/ld.so"
-+#define ELF_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- #undef STARTFILE_SPEC
- #define STARTFILE_SPEC \
-diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
-index c48fc93..3068717 100644
---- a/gcc/config/alpha/linux-elf.h
-+++ b/gcc/config/alpha/linux-elf.h
-@@ -27,8 +27,8 @@ along with GCC; see the file COPYING3. If not see
- #define EXTRA_SPECS \
- { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
--#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 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
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -61,7 +61,7 @@
- /* Use ld-linux.so.3 so that it will be possible to run "classic"
- GNU/Linux binaries on an EABI system. */
- #undef GLIBC_DYNAMIC_LINKER
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
-+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
- use the GNU/Linux version, not the generic BPABI version. */
-diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
-index 9fdca41..65b0a5a 100644
---- a/gcc/config/arm/linux-elf.h
-+++ b/gcc/config/arm/linux-elf.h
-@@ -62,7 +62,7 @@
-
- #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- #define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \
- %{b} \
-diff --git a/gcc/config/bfin/linux.h b/gcc/config/bfin/linux.h
-index 5c716cd..b5e464e 100644
---- a/gcc/config/bfin/linux.h
-+++ b/gcc/config/bfin/linux.h
-@@ -45,7 +45,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- %{shared:-G -Bdynamic} \
- %{!shared: %{!static: \
- %{rdynamic:-export-dynamic} \
-- %{!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"
-diff --git a/gcc/config/cris/linux.h b/gcc/config/cris/linux.h
-index 38f0a7e..6893407 100644
---- a/gcc/config/cris/linux.h
-+++ b/gcc/config/cris/linux.h
-@@ -103,7 +103,7 @@ along with GCC; see the file COPYING3. If not see
- #undef CRIS_DEFAULT_CPU_VERSION
- #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- /* We need an -rpath-link to ld.so.1, and presumably to each directory
- specified with -B. */
-diff --git a/gcc/config/freebsd-spec.h b/gcc/config/freebsd-spec.h
-index 84d8127..fb3e79a 100644
---- a/gcc/config/freebsd-spec.h
-+++ b/gcc/config/freebsd-spec.h
-@@ -144,9 +144,9 @@ is built with the --enable-threads configure-time option.} \
- #endif
-
- #if FBSD_MAJOR < 6
--#define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1"
-+#define FBSD_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
- #else
--#define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1"
-+#define FBSD_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
- #endif
-
- #if defined(HAVE_LD_EH_FRAME_HDR)
-diff --git a/gcc/config/frv/linux.h b/gcc/config/frv/linux.h
-index 71cd094..221d01d 100644
---- a/gcc/config/frv/linux.h
-+++ b/gcc/config/frv/linux.h
-@@ -35,7 +35,7 @@
- #define ENDFILE_SPEC \
- "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- #undef LINK_SPEC
- #define LINK_SPEC "\
-diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
-index 2a31880..9c08adb 100644
---- a/gcc/config/i386/linux.h
-+++ b/gcc/config/i386/linux.h
-@@ -100,7 +100,7 @@ along with GCC; see the file COPYING3. If not see
-
- /* These macros may be overridden in k*bsd-gnu.h and i386/k*bsd-gnu.h. */
- #define LINK_EMULATION "elf_i386"
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- #undef ASM_SPEC
- #define ASM_SPEC \
-diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
-index 867de59..274acca 100644
---- a/gcc/config/i386/linux64.h
-+++ b/gcc/config/i386/linux64.h
-@@ -58,8 +58,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- When the -shared link option is used a final link is not being
- done. */
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 "/" DYNAMIC_LINKER
-+#define GLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- #if TARGET_64BIT_DEFAULT
- #define SPEC_32 "m32"
-diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h
-index 587a4f4..450fcb5 100644
---- a/gcc/config/ia64/linux.h
-+++ b/gcc/config/ia64/linux.h
-@@ -61,7 +61,7 @@ do { \
- /* Define this for shared library support because it isn't in the main
- linux.h file. */
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
-+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- #undef LINK_SPEC
- #define LINK_SPEC "\
-diff --git a/gcc/config/knetbsd-gnu.h b/gcc/config/knetbsd-gnu.h
-index 4cc8eb7..bb7a063 100644
---- a/gcc/config/knetbsd-gnu.h
-+++ b/gcc/config/knetbsd-gnu.h
-@@ -34,5 +34,5 @@ along with GCC; see the file COPYING3. If not see
-
- #ifdef GLIBC_DYNAMIC_LINKER
- #undef GLIBC_DYNAMIC_LINKER
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
- #endif
-diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index e567e9a..c052fd0 100644
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -117,9 +117,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
- GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
- supporting both 32-bit and 64-bit compilation. */
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#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 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)
-
- #define TARGET_POSIX_IO
-+
-+#ifdef NOSTDINC
-+#undef STANDARD_INCLUDE_DIR
-+#define STANDARD_INCLUDE_DIR 0
-+#endif
-diff --git a/gcc/config/m32r/linux.h b/gcc/config/m32r/linux.h
-index 0515e5b..019e850 100644
---- a/gcc/config/m32r/linux.h
-+++ b/gcc/config/m32r/linux.h
-@@ -58,7 +58,7 @@
-
- /* If ELF is the default format, we should not use /lib/elf. */
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- #undef LINK_SPEC
- #if TARGET_LITTLE_ENDIAN
-diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h
-index 1d73ee0..e57cf50 100644
---- a/gcc/config/m68k/linux.h
-+++ b/gcc/config/m68k/linux.h
-@@ -84,7 +84,7 @@ along with GCC; see the file COPYING3. If not see
-
- /* If ELF is the default format, we should not use /lib/elf. */
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- #undef LINK_SPEC
- #define LINK_SPEC "-m m68kelf %{shared} \
-diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
-index 0512ef7..7efe2fd 100644
---- a/gcc/config/mips/linux.h
-+++ b/gcc/config/mips/linux.h
-@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3. If not see
- #undef MIPS_DEFAULT_GVALUE
- #define MIPS_DEFAULT_GVALUE 0
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- /* Borrowed from sparc/linux.h */
- #undef LINK_SPEC
-diff --git a/gcc/config/mips/linux64.h b/gcc/config/mips/linux64.h
-index 2f24dfa..850cb22 100644
---- a/gcc/config/mips/linux64.h
-+++ b/gcc/config/mips/linux64.h
-@@ -35,10 +35,10 @@ along with GCC; see the file COPYING3. If not see
- %{!shared: \
- %{profile:-lc_p} %{!profile:-lc}}"
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
--#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 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 LINUX_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
-+++ b/gcc/config/mn10300/linux.h
-@@ -32,7 +32,7 @@
- #undef ASM_SPEC
- #define ASM_SPEC "%{Wa,*:%*}"
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- #undef LINK_SPEC
- #define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index da7bca3..c36e7d6 100644
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -348,10 +348,10 @@ extern int dot_symbols;
- #undef LINK_OS_DEFAULT_SPEC
- #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-+#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 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
-+++ b/gcc/config/s390/linux.h
-@@ -72,8 +72,8 @@ along with GCC; see the file COPYING3. If not see
- #define MULTILIB_DEFAULTS { "m31" }
- #endif
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
--#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
-+#define GLIBC_DYNAMIC_LINKER32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-+#define GLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- #undef LINK_SPEC
- #define LINK_SPEC \
-diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
-index d513af8..2ad27a7 100644
---- a/gcc/config/sh/linux.h
-+++ b/gcc/config/sh/linux.h
-@@ -47,7 +47,7 @@ along with GCC; see the file COPYING3. If not see
-
- #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- #undef SUBTARGET_LINK_EMUL_SUFFIX
- #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
-diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
-index b12c881..83bdd8e 100644
---- a/gcc/config/sparc/linux.h
-+++ b/gcc/config/sparc/linux.h
-@@ -83,7 +83,7 @@ along with GCC; see the file COPYING3. If not see
-
- /* If ELF is the default format, we should not use /lib/elf. */
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- #undef LINK_SPEC
- #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
-diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
-index c2e78d7..8481a34 100644
---- a/gcc/config/sparc/linux64.h
-+++ b/gcc/config/sparc/linux64.h
-@@ -109,8 +109,8 @@ along with GCC; see the file COPYING3. If not see
-
- /* If ELF is the default format, we should not use /lib/elf. */
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-+#define GLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- #ifdef SPARC_BI_ARCH
-
-diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h
-index 69ab626..ebc8e0b 100644
---- a/gcc/config/xtensa/linux.h
-+++ b/gcc/config/xtensa/linux.h
-@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3. If not see
- %{mlongcalls:--longcalls} \
- %{mno-longcalls:--no-longcalls}"
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
-
- #undef LINK_SPEC
- #define LINK_SPEC \
-diff --git a/gcc/configure b/gcc/configure
-index b623a4a..230719b 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -757,6 +757,9 @@ AWK
- SET_MAKE
- REPORT_BUGS_TEXI
- REPORT_BUGS_TO
-+DYNAMICLINKER
-+DYNAMICLINKERPREFIX
-+NOSTDINC
- PKGVERSION
- onestep
- CONFIGURE_SPECS
-@@ -1657,6 +1660,14 @@ Optional Packages:
- --with-gc={page,zone} choose the garbage collection mechanism to use
- with the compiler
- --with-system-zlib use installed libz
-+ --with-dynamic-linker=PATH
-+ specifies path to dynamic linker.
-+ example: "/lib/ld-linux.so.2", where this defines "ld-linux.so.2"
-+ --with-dynamic-linker-prefix=PATH
-+ specifies path to dynamic linker.
-+ example: "/lib/ld-linux.so.2", where this defines "/lib"
-+ --with-nostdinc build gcc to ignore standard include directories.
-+ You will have to use --with-local-prefix with this option.
- --with-slibdir=DIR shared libraries in DIR [LIBDIR]
-
- Some influential environment variables:
-@@ -6065,6 +6076,47 @@ fi
-
-
-
-+# Check whether --with-dynamic-linker was given.
-+
-+DYNAMICLINKER="ld-linux.so.2" ;
-+if test "${with_dynamic_linker+set}" = set; then
-+ withval="$with_dynamic_linker"
-+ case "${withval}" in
-+yes) { { echo "$as_me:$LINENO: error: bad value "${withval}". Use something like --with-dynamic-linker=$DYNAMICLINKER" >&5
-+echo "$as_me: error: bad value "${withval}". Use something like --with-dynamic-linker=$DYNAMICLINKER" >&2;}
-+ { (exit 1); exit 1; }; } ;;
-+no) ;;
-+*) DYNAMICLINKER=$withval ;;
-+esac
-+fi;
-+
-+# Check whether --with-dynamic-linker-prefix= was given.
-+
-+DYNAMICLINKERPREFIX="/lib" ;
-+if test "${with_dynamic_linker_prefix+set}" = set; then
-+ withval="$with_dynamic_linker_prefix"
-+ case "${withval}" in
-+yes) { { echo "$as_me:$LINENO: error: bad value "${withval}". Use --with-dynamic-linker-prefix=/path/to/lib/" >&5
-+echo "$as_me: error: bad value "${withval}". Use --with-dynamic-linker-prefix=/path/to/lib/" >&2;}
-+ { (exit 1); exit 1; }; } ;;
-+no) ;;
-+*) DYNAMICLINKERPREFIX=$withval ;;
-+esac
-+
-+fi;
-+
-+# Check whether --with-nostdinc was given.
-+
-+if test "${with_nostdinc+set}" = set; then
-+ withval="$with_nostdinc"
-+ case "${withval}" in
-+yes) NOSTDINC="-DNOSTDINC" ;;
-+no) ;;
-+*) NOSTDINC="-DNOSTDINC" ;;
-+esac
-+fi;
-+
-+
-
- # ---------------------
- # Warnings and checking
diff --git a/testing/gcc/gcc-4.6-dynamic-linker.patch b/main/gcc/gcc-4.6-dynamic-linker.patch
index a6b235cd19..a6b235cd19 100644
--- a/testing/gcc/gcc-4.6-dynamic-linker.patch
+++ b/main/gcc/gcc-4.6-dynamic-linker.patch
diff --git a/testing/gcc/gcc-4.6-pr32219.patch b/main/gcc/gcc-4.6-pr32219.patch
index 8233e5b231..8233e5b231 100644
--- a/testing/gcc/gcc-4.6-pr32219.patch
+++ b/main/gcc/gcc-4.6-pr32219.patch
diff --git a/testing/gcc/gcc-go.patch b/main/gcc/gcc-go.patch
index a882a5a38e..a882a5a38e 100644
--- a/testing/gcc/gcc-go.patch
+++ b/main/gcc/gcc-go.patch
diff --git a/testing/gcc/gcc-libgcc-x86.get_pc_thunk.bx.patch b/main/gcc/gcc-libgcc-x86.get_pc_thunk.bx.patch
index 551e6150ab..551e6150ab 100644
--- a/testing/gcc/gcc-libgcc-x86.get_pc_thunk.bx.patch
+++ b/main/gcc/gcc-libgcc-x86.get_pc_thunk.bx.patch
diff --git a/main/gcc/gcc-spec-env.patch b/main/gcc/gcc-spec-env.patch
index 9d5e666a54..57e7567e54 100644
--- a/main/gcc/gcc-spec-env.patch
+++ b/main/gcc/gcc-spec-env.patch
@@ -1,8 +1,9 @@
Add support for external spec file via the GCC_SPECS env var. This
allows us to easily control pie/ssp defaults with gcc-config profiles.
- Original patch by Rob Holland. Extended to support multiple
- entries separated by ':' by Kevin F. Quinn
+ Original patch by Rob Holland
+ Extended to support multiple entries separated by ':' by Kevin F. Quinn
+ Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill
--- gcc-4/gcc/gcc.c
+++ gcc-4/gcc/gcc.c
@@ -15,7 +16,7 @@
+ * each spec listed, the string is overwritten at token boundaries
+ * (':') with '\0', an effect of strtok_r().
+ */
-+ GET_ENVIRONMENT (specs_file, "GCC_SPECS");
++ specs_file = getenv ("GCC_SPECS");
+ if (specs_file && (strlen(specs_file) > 0))
+ {
+ char *spec, *saveptr;
diff --git a/main/gcc/gcc4-stack-protector-uclibc-no_tls.patch b/main/gcc/gcc4-stack-protector-uclibc-no_tls.patch
deleted file mode 100644
index c9b54adbe1..0000000000
--- a/main/gcc/gcc4-stack-protector-uclibc-no_tls.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-diff -u gcc/config/i386/linux.h gcc/config/i386/linux.h
---- a/gcc/config/i386/linux.h 2 Jul 2005 08:52:20 -0000 1.60
-+++ b/gcc/config/i386/linux.h 2 Jul 2005 08:52:20 -0000 1.60
-@@ -186,7 +186,7 @@
- /* This macro may be overridden in i386/k*bsd-gnu.h. */
- #define REG_NAME(reg) reg
-
--#ifdef TARGET_LIBC_PROVIDES_SSP
-+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__
- /* i386 glibc provides __stack_chk_guard in %gs:0x14. */
- #define TARGET_THREAD_SSP_OFFSET 0x14
- #endif
-diff -u gcc/config/i386/linux64.h gcc/config/i386/linux64.h
---- a/gcc/config/i386/linux64.h 2 Jul 2005 08:52:20 -0000 1.33
-+++ b/gcc/config/i386/linux64.h 2 Jul 2005 08:52:20 -0000 1.33
-@@ -74,7 +74,7 @@
- /* This macro may be overridden in i386/k*bsd-gnu.h. */
- #define REG_NAME(reg) reg
-
--#ifdef TARGET_LIBC_PROVIDES_SSP
-+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__
- /* i386 glibc provides __stack_chk_guard in %gs:0x14,
- x86_64 glibc provides it in %fs:0x28. */
- #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14)
-diff -u gcc/config/rs6000/linux.h gcc/config/rs6000/linux.h
---- a/gcc/config/rs6000/linux.h 2 Jul 2005 08:52:11 -0000 1.53
-+++ b/gcc/config/rs6000/linux.h 2 Jul 2005 08:52:11 -0000 1.53
-@@ -114,7 +114,7 @@
-
- #define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h"
-
--#ifdef TARGET_LIBC_PROVIDES_SSP
-+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__
- /* ppc32 glibc provides __stack_chk_guard in -0x7008(2). */
- #define TARGET_THREAD_SSP_OFFSET -0x7008
- #endif
-diff -u gcc/config/rs6000/linux64.h gcc/config/rs6000/linux64.h
---- a/gcc/config/rs6000/linux64.h 2 Jul 2005 08:52:15 -0000 1.81
-+++ b/gcc/config/rs6000/linux64.h 2 Jul 2005 08:52:15 -0000 1.81
-@@ -548,7 +548,7 @@
-
- #define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h"
-
--#ifdef TARGET_LIBC_PROVIDES_SSP
-+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__
- /* ppc32 glibc provides __stack_chk_guard in -0x7008(2),
- ppc64 glibc provides it at -0x7010(13). */
- #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? -0x7010 : -0x7008)
-diff -u gcc/config/s390/linux.h gcc/config/s390/linux.h
---- a/gcc/config/s390/linux.h 2005-08-22 15:53:01.000000000 +0200 1.40
-+++ b/gcc/config/s390/linux.h 2005-08-22 15:53:01.000000000 +0200 1.40
-@@ -94,7 +94,7 @@
-
- #define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h"
-
--#ifdef TARGET_LIBC_PROVIDES_SSP
-+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__
- /* s390 glibc provides __stack_chk_guard in 0x14(tp),
- s390x glibc provides it at 0x28(tp). */
- #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14)
-diff -u gcc/config/sparc/linux.h gcc/config/sparc/linux.h
---- a/gcc/config/sparc/linux.h 6 Jul 2005 07:48:57 -0000 1.72
-+++ b/gcc/config/sparc/linux.h 6 Jul 2005 07:48:57 -0000 1.72
-@@ -230,7 +230,7 @@
- #undef NEED_INDICATE_EXEC_STACK
- #define NEED_INDICATE_EXEC_STACK 1
-
--#ifdef TARGET_LIBC_PROVIDES_SSP
-+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__
- /* sparc glibc provides __stack_chk_guard in [%g7 + 0x14]. */
- #define TARGET_THREAD_SSP_OFFSET 0x14
- #endif
-diff -u gcc/config/sparc/linux64.h gcc/config/sparc/linux64.h
---- a/gcc/config/sparc/linux64.h 6 Jul 2005 07:48:57 -0000 1.95
-+++ b/gcc/config/sparc/linux64.h 6 Jul 2005 07:48:57 -0000 1.95
-@@ -364,7 +364,7 @@
- #undef NEED_INDICATE_EXEC_STACK
- #define NEED_INDICATE_EXEC_STACK 1
-
--#ifdef TARGET_LIBC_PROVIDES_SSP
-+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__
- /* sparc glibc provides __stack_chk_guard in [%g7 + 0x14],
- sparc64 glibc provides it at [%g7 + 0x28]. */
- #define TARGET_THREAD_SSP_OFFSET (TARGET_ARCH64 ? 0x28 : 0x14)
diff --git a/testing/gcc/APKBUILD b/testing/gcc/APKBUILD
deleted file mode 100644
index 3d5ce070e9..0000000000
--- a/testing/gcc/APKBUILD
+++ /dev/null
@@ -1,381 +0,0 @@
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
-pkgname=gcc
-pkgver=4.6.1
-_piepatchver=0.4.5
-_specs_ver=0.2.0
-_specs_gcc_ver=4.4.3
-
-_uclibc_abiver=0.9.32
-
-pkgrel=3
-pkgdesc="The GNU Compiler Collection"
-url="http://gcc.gnu.org"
-arch="all"
-license="GPL LGPL"
-depends="binutils libgcc libgomp libobjc"
-makedepends="bison flex gmp-dev mpfr-dev texinfo libmpc-dev gawk zlib-dev zip
- cloog-dev"
-subpackages="$pkgname-doc libstdc++:libcxx g++:gpp libgcc libgomp $pkgname-go
- libgo"
-replaces="libstdc++"
-
-if [ -n "$BOOTSTRAP" ]; then
- LANG_OBJC=off
- LANG_JAVA=off
-fi
-
-if [ "$LANG_OBJC" != "off" ]; then
- subpackages="$subpackages libobjc"
-fi
-if [ "$LANG_JAVA" != "off" ]; then
- subpackages="$subpackages $pkgname-java libgcj"
- makedepends="$makedepends paxctl"
-fi
-if [ "$LANG_GO" != "off" ]; then
- _languages="$_languages,go"
- fi
-
-
-
-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
- ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-go-$pkgver.tar.bz2
- http://distfiles.gentoo.org/distfiles/gcc-4.6.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
-
- 08_all_cross-compile.patch
- 11_all_default-warn-format-security.patch
- 12_all_default-warn-trampolines.patch
- 15_all_libgomp-Werror.patch
- 34_all_ia64_note.GNU-stack.patch
- 51_all_libiberty-pic.patch
- 74_all_gcc46_cloog-dl.patch
-
- gcc-spec-env.patch
- pt_gnu_eh_frame.patch
- uclibc-getipinfo.patch
- gcc-4.6-dynamic-linker.patch
- gcc-4.6-pr32219.patch
- boehem-gc-uclibc.patch
- gcc-pure64.patch
- gcc-go.patch
- gcc-libgcc-x86.get_pc_thunk.bx.patch
- "
-
-# we build out-of-tree
-_gccdir="$srcdir"/gcc-$pkgver
-_builddir="$srcdir/build"
-
-prepare() {
- cd "$_gccdir"
- # verify we have set CHOST
- if [ -z "$CHOST" ]; then
- error "CHOST not set"
- return 1
- fi
-
- # PIE patches from gentoo
- # thanks to Zorry for hard work on those patches
- for i in "$srcdir"/piepatch/*.patch; do
- msg "Applying $i"
- patch -p0 -i $i || patch -p1 -i $i || return 1
- done
-
- # Gentoo and uclibc patches
- _err=
- for i in $source; do
- case "$i" in
- *.patch)
- msg "Applying $i"
- patch -p1 -i "$srcdir"/$i || _err="$_err $i"
- ;;
- esac
- done
-
- if [ -n "$_err" ]; then
- error "The following patches failed:"
- for i in $_err; do
- echo " $i"
- done
- return 1
- fi
-
- #PR33200
- sed -i 's/use_fixproto=yes/:/' gcc/config.gcc || return 1
-
- # enable hardened cflags by default
- # building gcc wih PIE seem to hit some strange bug. we probably run
- # out of some resource. so we disable PIE for gcc while enabling it
- # by default for everything else.
- local _hard_cflags="-DEFAULT_PIE_SSP -DEFAULT_RELRO -DEFAULT_BIND_NOW"
- sed -e "/^ALL_CFLAGS/iHARD_CFLAGS = ${_hard_cflags}" \
- -e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) -fno-PIE |' \
- -i gcc/Makefile.in || return 1
- sed -e "/stage1_cflags=/s/-fno-stack-protector/-fno-stack-protector -fno-PIE/" \
- -i configure
-
- # see http://gcc.gnu.org/ml/java/2008-04/msg00027.html
- mv "$srcdir"/ecj-latest.jar ecj.jar
-
- echo ${pkgver} > gcc/BASE-VER
-}
-
-build() {
- local _languages= _dynamic_linker=
- cd "$_gccdir"
- export CFLAGS="-fno-stack-protector"
- [ -z "$CBUILD" ] && CBUILD="$CHOST"
- [ -z "$CTARGET" ] && CTARGET="$CHOST"
-
- case "$CHOST" in
- x86_64-*-uclibc)
- _dynamic_linker="--with-dynamic-linker=ld64-uClibc.so.$_uclibc_abiver"
- ;;
- *-uclibc)
- _dynamic_linker="--with-dynamic-linker=ld-uClibc.so.$_uclibc_abiver"
- ;;
- *) _dynamic_linker=
- ;;
- esac
-
- _languages=c,c++
- # we can disable OBJC with LANG_OBJC=off
- if [ "$LANG_OBJC" != "off" ]; then
- _languages=$_languages,objc
- fi
-
- # and disable java with LANG_JAVA=off
- if [ "$LANG_JAVA" != "off" ]; then
- _languages="$_languages,java"
- fi
-
- if [ "$LANG_GO" != "off" ]; then
- _languages="$_languages,go"
- fi
-
- # --enable-target-optspace is broken on powerpc
- if [ "$CARCH" != "powerpc" ]; then
- _target_optspace="--enable-target-optspace"
- fi
-
- msg "Building the following:"
- echo ""
- echo " CBUILD=$CBUILD"
- echo " CHOST=$CHOST"
- echo " CTARGET=$CTARGET"
- echo " languages=$_languages"
- echo " dynamic_linker=$_dynamic_linker"
- echo " target_optspace=$_target_optspace"
- echo ""
-
- mkdir -p "$_builddir"
- cd "$_builddir"
- "$_gccdir"/configure --prefix=/usr \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info \
- --build=${CBUILD} \
- --host=${CHOST} \
- --target=${CTARGET} \
- --with-pkgversion="Alpine ${pkgver}-r${pkgrel}" \
- --disable-altivec \
- --disable-checking \
- --disable-fixed-point \
- --disable-libssp \
- --disable-libstdcxx-pch \
- --disable-multilib \
- --disable-nls \
- --disable-werror \
- --enable-__cxa_atexit \
- --enable-cld \
- --enable-esp \
- --enable-cloog-backend \
- --enable-languages=$_languages \
- --enable-shared \
- $_target_optspace \
- --enable-tls \
- --enable-threads \
- $_dynamic_linker \
- --with-dynamic-linker-prefix=/lib \
- --with-system-zlib \
- --without-system-libunwind
-
- make || return 1
-}
-
-package() {
- cd "$_builddir"
- make -j1 DESTDIR="${pkgdir}" install || return 1
- find "$pkgdir" -name '*.la' -delete || return 1
-
- ln -s gcc "$pkgdir"/usr/bin/cc
-
- # binutils provides libiberty.a
- rm -f "$pkgdir"/usr/lib/libiberty.a
-
- # install the specs
- cd "$srcdir"/specs
- install -d "$pkgdir"/usr/share/gcc
- for i in *.specs; do
- install -m644 $i "$pkgdir"/usr/share/gcc/$i || return 1
- done
-
- # we dont support gcj -static
- # and saving 35MB is not bad.
- find "$pkgdir" -name libgcj.a -o -name libgtkpeer.a \
- -o -name libgjsmalsa.a -o -name libgcj-tools.a \
- -o -name libjvm.a -o -name libgij.a -o -name libgcj_bc.a \
- -o -name libjavamath.a \
- | xargs rm -f \
- || return 1
-
- [ "$LANG_JAVA" = "on" ] && \
- sed -i -e 's/lib: /&%{static:%eJava programs cannot be linked statically}/' \
- "$pkdir"/usr/lib/libgcj.spec
-
- # remove ffi
- rm "$pkgdir"/usr/lib/libffi*
- find "$pkgdir" -name 'ffi*.h' | xargs rm -f
-
- mkdir -p "$pkgdir"/usr/share/gdb/python/auto-load/usr/lib
- mv "$pkgdir"/usr/lib/*-gdb.py \
- "$pkgdir"/usr/share/gdb/python/auto-load/usr/lib/
-}
-
-libcxx() {
- pkgdesc="GNU C++ standard runtime library"
- depends=
- mkdir -p "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/libstdc++.so.* "$subpkgdir"/usr/lib/
-}
-
-gpp() {
- pkgdesc="GNU C++ standard library and compiler"
- depends="libstdc++"
- local libexec=usr/libexec/gcc/${CHOST:-$_chost}/$pkgver
- mkdir -p "$subpkgdir/$libexec" \
- "$subpkgdir"/usr/bin \
- "$subpkgdir"/usr/include \
- "$subpkgdir"/usr/lib \
-
- mv "$pkgdir/$libexec/cc1plus" "$subpkgdir/$libexec/"
- mv "$pkgdir"/usr/lib/*++* "$subpkgdir"/usr/lib/
- mv "$pkgdir"/usr/include/c++ "$subpkgdir"/usr/include/
- mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
-}
-
-libobjc() {
- pkgdesc="GNU ObjectiveC library"
- replaces="objc"
- mkdir -p "$subpkgdir"/usr/lib
-
- mv "$pkgdir"/usr/lib/*objc* "$subpkgdir"/usr/lib/
-}
-
-libgcc() {
- pkgdesc="GNU C compiler runtime libraries"
- depends=
- mkdir -p "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
-}
-
-libgomp() {
- pkgdesc="GCC shared-memory parallel programming API library"
- depends=
- replaces="gcc"
- mkdir -p "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/libgomp.so.* "$subpkgdir"/usr/lib/
-}
-
-java() {
- pkgdesc="Java support for GCC"
- paxctl -c -p -e -m "$pkgdir"/usr/libexec/gcc/*/*/ecj1 || return 1
- mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib
- cd "$pkgdir"/usr/bin
- mv gcj gcj-dbtool gjavah gcjh jcf-dump "$subpkgdir"/usr/bin/
- cd "$pkgdir"
- for i in $(find usr/ -name ecj1 -o -name jc1 -o -name jvgenmain); do
- mkdir -p "$subpkgdir"/${i%/*}
- mv "$pkgdir"/$i "$subpkgdir"/$i || return 1
- done
- mv \
- "$pkgdir"/usr/lib/libgcj*.so \
- "$pkgdir"/usr/lib/libgij.so \
- "$pkgdir"/usr/lib/libgcj.spec \
- "$subpkgdir"/usr/lib/
-}
-
-libgcj() {
- pkgdesc="Java runtime library for gcc"
- mkdir -p "$subpkgdir"/usr/bin
- cd "$pkgdir"/usr/bin
- mv aot-compile gappletviewer gc-analyze gij gjar gjarsigner gkeytool\
- gnative2ascii gorbd grmic grmid grmiregistry gserialver \
- gtnameserv i486-alpine-linux-uclibc-gcj jv-convert \
- rebuild-gcj-db \
- "$subpkgdir"/usr/bin/
- cd "$pkgdir"
- for i in $(find usr/lib -name jc1 -o -name jvgenmain); do
- mkdir -p "$subpkgdir"/${i%/*}
- mv "$pkgdir"/$i "$subpkgdir"/$i || return 1
- done
- mkdir -p "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/gcj-* \
- "$pkgdir"/usr/lib/libgcj*.so.* \
- "$pkgdir"/usr/lib/libgij.so.* \
- "$pkgdir"/usr/lib/logging.properties \
- "$pkgdir"/usr/lib/security \
- "$subpkgdir"/usr/lib/
-
- mkdir -p "$subpkgdir"/usr/share/
- mv "$pkgdir"/usr/share/java "$subpkgdir"/usr/share/
-}
-
-libgo() {
- pkgdesc="Go runtime library for GCC"
- mkdir -p "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
-}
-
-go() {
- pkgdesc="Go support for GCC"
- depends="libgo"
- local libexec=usr/libexec/gcc/${CHOST:-$_chost}/$pkgver
- mkdir -p "$subpkgdir"/$libexec \
- "$subpkgdir"/usr/lib \
- "$subpkgdir"/usr/bin || return 1
- mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/ || return 1
- mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/ || return 1
- mv "$pkgdir"/$libexec/go1 "$subpkgdir"/$libexec/ || return 1
- mv "$pkgdir"/usr/lib/libgo.a \
- "$pkgdir"/usr/lib/libgo.so \
- "$pkgdir"/usr/lib/libgobegin.a \
- "$subpkgdir"/usr/lib/ || return 1
-}
-
-md5sums="0c0e7e35d2215e19de9c97efba507553 gcc-core-4.6.1.tar.bz2
-0d75ca7ca35b1e7f252223f9d23a6ad1 gcc-g++-4.6.1.tar.bz2
-cbf0d4b701827922cf37ba6a4ace0079 gcc-objc-4.6.1.tar.bz2
-32431ba42c1d18e64f2abfdfc834ef94 gcc-java-4.6.1.tar.bz2
-a69f9f156172c2e1da5590faa70f4fc7 gcc-go-4.6.1.tar.bz2
-5dc7efd84b526801b94fed21462aea62 gcc-4.6.1-piepatches-v0.4.5.tar.bz2
-441c76504e1d97170117c294e65c7a72 gcc-4.4.3-specs-0.2.0.tar.bz2
-d7cd6a27c8801e66cbaa964a039ecfdb ecj-latest.jar
-b1b5987e7c53f2c8a0fa929444bd9129 08_all_cross-compile.patch
-34e4a0260e9dbd434ac84b9dda381240 11_all_default-warn-format-security.patch
-a78022925c0ecb1f13384238b81adbe7 12_all_default-warn-trampolines.patch
-6862cb5268fef68a4a1906e0c4ea0d46 15_all_libgomp-Werror.patch
-1a8ce6b7a0b9a115e37fdda311704451 34_all_ia64_note.GNU-stack.patch
-d8692c56f04b92667096f59d843e95c5 51_all_libiberty-pic.patch
-656565d2e2c30ea12a398ef6959a9391 74_all_gcc46_cloog-dl.patch
-a695d7648509b4f8e18b389a19e6037c gcc-spec-env.patch
-2db1e3482c5dd59dab70f701afa2ca80 pt_gnu_eh_frame.patch
-6cc2385c5bbd6d0da6eaedd53c8bf547 uclibc-getipinfo.patch
-3be85df859fa1d5c875bbfcc2dee8288 gcc-4.6-dynamic-linker.patch
-32e8e4c0e23ed8f5de95a591cb30f1da gcc-4.6-pr32219.patch
-2c6cb49bb9bfd8b6e690222e66ccc901 boehem-gc-uclibc.patch
-d1d3ad2b0c185b5548125a1b81bee154 gcc-pure64.patch
-c94014ece84407a36d239417a2bad25d gcc-go.patch
-978e3fac97ad99902a86bafc6f283727 gcc-libgcc-x86.get_pc_thunk.bx.patch"
diff --git a/testing/gcc/boehem-gc-uclibc.patch b/testing/gcc/boehem-gc-uclibc.patch
deleted file mode 100644
index 0fa6884105..0000000000
--- a/testing/gcc/boehem-gc-uclibc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./boehm-gc/include/gc.h.orig
-+++ ./boehm-gc/include/gc.h
-@@ -503,7 +503,7 @@
- #if defined(__linux__) || defined(__GLIBC__)
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
-- && !defined(__ia64__)
-+ && !defined(__ia64__) && !defined(__UCLIBC__)
- # ifndef GC_HAVE_BUILTIN_BACKTRACE
- # define GC_HAVE_BUILTIN_BACKTRACE
- # endif
diff --git a/testing/gcc/gcc-pure64.patch b/testing/gcc/gcc-pure64.patch
deleted file mode 100644
index f9ab69326e..0000000000
--- a/testing/gcc/gcc-pure64.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur gcc-4.2.0.orig/gcc/config/i386/t-linux64 gcc-4.2.0/gcc/config/i386/t-linux64
---- gcc-4.2.0.orig/gcc/config/i386/t-linux64 2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/i386/t-linux64 2007-05-18 17:04:36.000000000 -0400
-@@ -6,7 +6,7 @@
-
- MULTILIB_OPTIONS = m64/m32
- MULTILIB_DIRNAMES = 64 32
--MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
-+MULTILIB_OSDIRNAMES = ../lib ../lib32
-
- LIBGCC = stmp-multilib
- INSTALL_LIBGCC = install-multilib
diff --git a/testing/gcc/gcc-spec-env.patch b/testing/gcc/gcc-spec-env.patch
deleted file mode 100644
index 57e7567e54..0000000000
--- a/testing/gcc/gcc-spec-env.patch
+++ /dev/null
@@ -1,42 +0,0 @@
- Add support for external spec file via the GCC_SPECS env var. This
- allows us to easily control pie/ssp defaults with gcc-config profiles.
-
- Original patch by Rob Holland
- Extended to support multiple entries separated by ':' by Kevin F. Quinn
- Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill
-
---- gcc-4/gcc/gcc.c
-+++ gcc-4/gcc/gcc.c
-@@ -6482,6 +6482,32 @@
-
- /* Process any user specified specs in the order given on the command
- line. */
-+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined (WIN32))
-+ /* Add specs listed in GCC_SPECS. Note; in the process of separating
-+ * each spec listed, the string is overwritten at token boundaries
-+ * (':') with '\0', an effect of strtok_r().
-+ */
-+ specs_file = getenv ("GCC_SPECS");
-+ if (specs_file && (strlen(specs_file) > 0))
-+ {
-+ char *spec, *saveptr;
-+ for (spec=strtok_r(specs_file,":",&saveptr);
-+ spec!=NULL;
-+ spec=strtok_r(NULL,":",&saveptr))
-+ {
-+ struct user_specs *user = (struct user_specs *)
-+ xmalloc (sizeof (struct user_specs));
-+
-+ user->next = (struct user_specs *) 0;
-+ user->filename = spec;
-+ if (user_specs_tail)
-+ user_specs_tail->next = user;
-+ else
-+ user_specs_head = user;
-+ user_specs_tail = user;
-+ }
-+ }
-+#endif
- for (uptr = user_specs_head; uptr; uptr = uptr->next)
- {
- char *filename = find_a_file (&startfile_prefixes, uptr->filename,
diff --git a/testing/gcc/pt_gnu_eh_frame.patch b/testing/gcc/pt_gnu_eh_frame.patch
deleted file mode 100644
index 3e029104aa..0000000000
--- a/testing/gcc/pt_gnu_eh_frame.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-4.3.2/gcc/crtstuff.c.orig Mon Nov 17 16:02:38 2008
-+++ gcc-4.3.2/gcc/crtstuff.c Mon Nov 17 16:02:52 2008
-@@ -94,8 +94,7 @@
- #include <link.h>
- /* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h.
- But it doesn't use PT_GNU_EH_FRAME ELF segment currently. */
--# if !defined(__UCLIBC__) \
-- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
-+# if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
- # define USE_PT_GNU_EH_FRAME
- # endif
diff --git a/testing/gcc/uclibc-getipinfo.patch b/testing/gcc/uclibc-getipinfo.patch
deleted file mode 100644
index 3abbbdd7ae..0000000000
--- a/testing/gcc/uclibc-getipinfo.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/libstdc++-v3/configure 2009-08-04 15:41:02.000000000 +0000
-+++ b/libstdc++-v3/configure 2009-08-04 15:46:20.000000000 +0000
-@@ -113523,14 +113523,14 @@
- # Based on system-libunwind and target, do we have ipinfo?
- if test x$with_system_libunwind = xyes; then
- case ${target} in
-- ia64-*-*) have_unwind_getipinfo=no ;;
-+ ia64-*-*|*-uclibc*) have_unwind_getipinfo=no ;;
- *) have_unwind_getipinfo=yes ;;
- esac
- else
- # Darwin before version 9 does not have _Unwind_GetIPInfo.
-
- case ${target} in
-- *-*-darwin[3-8]|*-*-darwin[3-8].*) have_unwind_getipinfo=no ;;
-+ *-*-darwin[3-8]|*-*-darwin[3-8].*|*-uclibc*) have_unwind_getipinfo=no ;;
- *) have_unwind_getipinfo=yes ;;
- esac
-