From 4814587d012d5183cec6c4076a355d5b17b0aed3 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sat, 25 Jan 2014 04:53:10 +0100 Subject: [PATCH] gcc: update to gcc-4.8.2 Signed-off-by: Stephan Raue --- packages/lang/gcc/package.mk | 8 +- .../gcc/patches/gcc-4.7.3-cloog-0.17.patch | 24 -- .../patches/gcc-4.7.3-dynamic_linker.patch | 131 ------- .../gcc-4.7.3-libstdc++-v3_config.patch | 97 ------ .../gcc/patches/gcc-4.8.2-bug-58854.patch | 10 + ...4.8.2-disable_multilib_i386_linux64.patch} | 8 +- .../patches/gcc-4.8.2-dynamic_linker.patch | 60 ++++ ...Support-fuse-ld-bfd-and-fuse-ld-gold.patch | 323 ------------------ 8 files changed, 79 insertions(+), 582 deletions(-) delete mode 100644 packages/lang/gcc/patches/gcc-4.7.3-cloog-0.17.patch delete mode 100644 packages/lang/gcc/patches/gcc-4.7.3-dynamic_linker.patch delete mode 100644 packages/lang/gcc/patches/gcc-4.7.3-libstdc++-v3_config.patch create mode 100644 packages/lang/gcc/patches/gcc-4.8.2-bug-58854.patch rename packages/lang/gcc/patches/{gcc-4.7.3-disable_multilib_i386_linux64.patch => gcc-4.8.2-disable_multilib_i386_linux64.patch} (77%) create mode 100644 packages/lang/gcc/patches/gcc-4.8.2-dynamic_linker.patch delete mode 100644 packages/lang/gcc/patches/gcc-Support-fuse-ld-bfd-and-fuse-ld-gold.patch diff --git a/packages/lang/gcc/package.mk b/packages/lang/gcc/package.mk index 5c703b6e6f..0d881c23e1 100644 --- a/packages/lang/gcc/package.mk +++ b/packages/lang/gcc/package.mk @@ -17,7 +17,7 @@ ################################################################################ PKG_NAME="gcc" -PKG_VERSION="4.7.3" +PKG_VERSION="4.8.2" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" @@ -69,7 +69,8 @@ BOOTSTRAP_CONFIGURE_OPTS="--host=$HOST_NAME \ --with-newlib \ --disable-decimal-float \ $GCC_OPTS \ - --disable-nls" + --disable-nls \ + --disable-cloog-version-check" PKG_CONFIGURE_OPTS_HOST="--target=$TARGET_NAME \ --with-sysroot=$SYSROOT_PREFIX \ @@ -103,7 +104,8 @@ PKG_CONFIGURE_OPTS_HOST="--target=$TARGET_NAME \ --disable-libstdcxx-pch \ --enable-clocale=gnu \ $GCC_OPTS \ - --disable-nls" + --disable-nls \ + --disable-cloog-version-check" pre_configure_bootstrap() { setup_toolchain host diff --git a/packages/lang/gcc/patches/gcc-4.7.3-cloog-0.17.patch b/packages/lang/gcc/patches/gcc-4.7.3-cloog-0.17.patch deleted file mode 100644 index 49d43f1a0e..0000000000 --- a/packages/lang/gcc/patches/gcc-4.7.3-cloog-0.17.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -Naur gcc-4.6-20120120-orig/configure gcc-4.6-20120120/configure ---- gcc-4.6-20120120-orig/configure 2011-12-18 20:03:44.000000000 +1000 -+++ gcc-4.6-20120120/configure 2012-02-03 17:55:14.885990135 +1000 -@@ -6049,8 +6049,8 @@ - LDFLAGS="${_cloog_saved_LDFLAGS} ${clooglibs} ${ppllibs}" - - if test "${cloog_org}" = yes ; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.16.1 of CLooG" >&5 --$as_echo_n "checking for version 0.16.1 of CLooG... " >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.18 of CLooG" >&5 -+$as_echo_n "checking for version 0.18 of CLooG... " >&6; } - if test "${gcc_cv_cloog_ct_0_14_0+set}" = set; then : - $as_echo_n "(cached) " >&6 - else -@@ -6061,8 +6061,7 @@ - main () - { - #if CLOOG_VERSION_MAJOR != 0 \ -- || CLOOG_VERSION_MINOR != 16 \ -- || CLOOG_VERSION_REVISION < 1 -+ || CLOOG_VERSION_MINOR != 18 - choke me - #endif - ; diff --git a/packages/lang/gcc/patches/gcc-4.7.3-dynamic_linker.patch b/packages/lang/gcc/patches/gcc-4.7.3-dynamic_linker.patch deleted file mode 100644 index 2166ed9b2b..0000000000 --- a/packages/lang/gcc/patches/gcc-4.7.3-dynamic_linker.patch +++ /dev/null @@ -1,131 +0,0 @@ -diff -Naur gcc-4.7.0-old/gcc/config/i386/linux64.h gcc-4.7.0-new/gcc/config/i386/linux64.h ---- gcc-4.7.0-old/gcc/config/i386/linux64.h 2011-07-07 08:38:34.000000000 -0700 -+++ gcc-4.7.0-new/gcc/config/i386/linux64.h 2012-04-23 21:03:08.000000000 -0700 -@@ -29,5 +29,5 @@ - #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" - - #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" --#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" --#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" -+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2" -+#define GLIBC_DYNAMIC_LINKERX32 "/lib/ld-linux-x32.so.2" -diff -Naur gcc-4.7.0-old/gcc/config/mips/iris6.h gcc-4.7.0-new/gcc/config/mips/iris6.h ---- gcc-4.7.0-old/gcc/config/mips/iris6.h 2012-03-05 02:43:22.000000000 -0800 -+++ gcc-4.7.0-new/gcc/config/mips/iris6.h 2012-04-23 21:02:07.000000000 -0700 -@@ -256,27 +256,27 @@ - #define STARTFILE_SPEC \ - "%{!shared: \ - %{mabi=n32: \ -- %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \ -- %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \ -- %{!p:/usr/lib32/mips4/crt1.o%s}}} \ -- %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \ -- %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \ -- %{!p:/usr/lib32/mips3/crt1.o%s}}}} \ -+ %{mips4:%{pg:/usr/lib/mips4/gcrt1.o%s} \ -+ %{!pg:%{p:/usr/lib/mips4/mcrt1.o%s /usr/lib/mips4/libprof1.a%s} \ -+ %{!p:/usr/lib/mips4/crt1.o%s}}} \ -+ %{!mips4:%{pg:/usr/lib/mips3/gcrt1.o%s} \ -+ %{!pg:%{p:/usr/lib/mips3/mcrt1.o%s /usr/lib/mips3/libprof1.a%s} \ -+ %{!p:/usr/lib/mips3/crt1.o%s}}}} \ - %{mabi=64: \ -- %{mips4:%{pg:/usr/lib64/mips4/gcrt1.o} \ -- %{!pg:%{p:/usr/lib64/mips4/mcrt1.o /usr/lib64/mips4/libprof1.a} \ -- %{!p:/usr/lib64/mips4/crt1.o}}} \ -- %{!mips4:%{pg:/usr/lib64/mips3/gcrt1.o} \ -- %{!pg:%{p:/usr/lib64/mips3/mcrt1.o /usr/lib64/mips3/libprof1.a} \ -- %{!p:/usr/lib64/mips3/crt1.o}}}}} \ -+ %{mips4:%{pg:/usr/lib/mips4/gcrt1.o} \ -+ %{!pg:%{p:/usr/lib/mips4/mcrt1.o /usr/lib/mips4/libprof1.a} \ -+ %{!p:/usr/lib/mips4/crt1.o}}} \ -+ %{!mips4:%{pg:/usr/lib/mips3/gcrt1.o} \ -+ %{!pg:%{p:/usr/lib/mips3/mcrt1.o /usr/lib/mips3/libprof1.a} \ -+ %{!p:/usr/lib/mips3/crt1.o}}}}} \ - irix-crti.o%s crtbegin.o%s" - - #undef LIB_SPEC - #define LIB_SPEC \ -- "%{mabi=n32: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \ -- -L/usr/lib32} \ -- %{mabi=64: %{mips4:-L/usr/lib64/mips4} %{!mips4:-L/usr/lib64/mips3} \ -- -L/usr/lib64} \ -+ "%{mabi=n32: %{mips4:-L/usr/lib/mips4} %{!mips4:-L/usr/lib/mips3} \ -+ -L/usr/lib} \ -+ %{mabi=64: %{mips4:-L/usr/lib/mips4} %{!mips4:-L/usr/lib/mips3} \ -+ -L/usr/lib} \ - %{!shared:" \ - SUBTARGET_DONT_WARN_UNUSED_SPEC \ - " %{pthread:-lpthread} %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc " \ -@@ -293,10 +293,10 @@ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ - crtend.o%s irix-crtn.o%s \ - %{!shared: \ -- %{mabi=n32:%{mips4:/usr/lib32/mips4/crtn.o%s}\ -- %{!mips4:/usr/lib32/mips3/crtn.o%s}}\ -- %{mabi=64:%{mips4:/usr/lib64/mips4/crtn.o%s}\ -- %{!mips4:/usr/lib64/mips3/crtn.o%s}}}" -+ %{mabi=n32:%{mips4:/usr/lib/mips4/crtn.o%s}\ -+ %{!mips4:/usr/lib/mips3/crtn.o%s}}\ -+ %{mabi=64:%{mips4:/usr/lib/mips4/crtn.o%s}\ -+ %{!mips4:/usr/lib/mips3/crtn.o%s}}}" - - /* Generic part of the LINK_SPEC. */ - #undef LINK_SPEC -diff -Naur gcc-4.7.0-old/gcc/config/mips/linux64.h gcc-4.7.0-new/gcc/config/mips/linux64.h ---- gcc-4.7.0-old/gcc/config/mips/linux64.h 2011-07-19 11:00:27.000000000 -0700 -+++ gcc-4.7.0-new/gcc/config/mips/linux64.h 2012-04-23 21:02:07.000000000 -0700 -@@ -24,9 +24,9 @@ - #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" - - #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_LINKER64 "/lib/ld.so.1" -+#define GLIBC_DYNAMIC_LINKERN32 "/lib/ld.so.1" -+#define UCLIBC_DYNAMIC_LINKERN32 "/lib/ld-uClibc.so.0" - #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" - #define GNU_USER_DYNAMIC_LINKERN32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ -diff -Naur gcc-4.7.0-old/gcc/config/rs6000/linux64.h gcc-4.7.0-new/gcc/config/rs6000/linux64.h ---- gcc-4.7.0-old/gcc/config/rs6000/linux64.h 2012-03-12 09:16:51.000000000 -0700 -+++ gcc-4.7.0-new/gcc/config/rs6000/linux64.h 2012-04-23 21:02:07.000000000 -0700 -@@ -359,7 +359,7 @@ - #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 GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1" - #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" - #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" - #if DEFAULT_LIBC == LIBC_UCLIBC -diff -Naur gcc-4.7.0-old/gcc/config/sparc/linux64.h gcc-4.7.0-new/gcc/config/sparc/linux64.h ---- gcc-4.7.0-old/gcc/config/sparc/linux64.h 2011-11-11 17:05:07.000000000 -0800 -+++ gcc-4.7.0-new/gcc/config/sparc/linux64.h 2012-04-23 21:02:07.000000000 -0700 -@@ -94,7 +94,7 @@ - done. */ - - #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" --#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux.so.2" - - #ifdef SPARC_BI_ARCH - -@@ -113,7 +113,7 @@ - %{static:-static}} \ - " - --#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ -+#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,%R/usr/lib %{shared:-shared} \ - %{!shared: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ -@@ -202,7 +202,7 @@ - #else /* !SPARC_BI_ARCH */ - - #undef LINK_SPEC --#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ -+#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib %{shared:-shared} \ - %{!shared: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ diff --git a/packages/lang/gcc/patches/gcc-4.7.3-libstdc++-v3_config.patch b/packages/lang/gcc/patches/gcc-4.7.3-libstdc++-v3_config.patch deleted file mode 100644 index 12a99c3e30..0000000000 --- a/packages/lang/gcc/patches/gcc-4.7.3-libstdc++-v3_config.patch +++ /dev/null @@ -1,97 +0,0 @@ -diff -Naur gcc-4.7.0-old/libstdc++-v3/config.h.in gcc-4.7.0-new/libstdc++-v3/config.h.in ---- gcc-4.7.0-old/libstdc++-v3/config.h.in 2012-03-22 08:25:54.000000000 -0700 -+++ gcc-4.7.0-new/libstdc++-v3/config.h.in 2012-03-22 08:28:32.000000000 -0700 -@@ -130,7 +130,7 @@ - #undef HAVE_FABSL - - /* Define to 1 if you have the header file. */ --#undef HAVE_FENV_H -+#define HAVE_FENV_H 1 - - /* Define to 1 if you have the `finite' function. */ - #undef HAVE_FINITE -@@ -184,7 +184,7 @@ - #undef HAVE_HYPOTL - - /* Define if you have the iconv() function. */ --#undef HAVE_ICONV -+#define HAVE_ICONV 1 - - /* Define to 1 if you have the header file. */ - #undef HAVE_IEEEFP_H -@@ -223,7 +223,7 @@ - #undef HAVE_ISWBLANK - - /* Define if LC_MESSAGES is available in . */ --#undef HAVE_LC_MESSAGES -+#define HAVE_LC_MESSAGES 1 - - /* Define to 1 if you have the `ldexpf' function. */ - #undef HAVE_LDEXPF -@@ -304,7 +304,7 @@ - #undef HAVE_QFPCLASS - - /* Define to 1 if you have the `setenv' function. */ --#undef HAVE_SETENV -+#define HAVE_SETENV 1 - - /* Define to 1 if you have the `sincos' function. */ - #undef HAVE_SINCOS -@@ -346,7 +346,7 @@ - #undef HAVE_STDLIB_H - - /* Define if strerror_l is available in . */ --#undef HAVE_STRERROR_L -+#define HAVE_STRERROR_L 1 - - /* Define if strerror_r is available in . */ - #undef HAVE_STRERROR_R -@@ -377,7 +377,7 @@ - #undef HAVE_SYS_IOCTL_H - - /* Define to 1 if you have the header file. */ --#undef HAVE_SYS_IPC_H -+#define HAVE_SYS_IPC_H 1 - - /* Define to 1 if you have the header file. */ - #undef HAVE_SYS_ISA_DEFS_H -@@ -389,10 +389,10 @@ - #undef HAVE_SYS_PARAM_H - - /* Define to 1 if you have the header file. */ --#undef HAVE_SYS_RESOURCE_H -+#define HAVE_SYS_RESOURCE_H 1 - - /* Define to 1 if you have the header file. */ --#undef HAVE_SYS_SEM_H -+#define HAVE_SYS_SEM_H 1 - - /* Define to 1 if you have the header file. */ - #undef HAVE_SYS_STAT_H -@@ -401,7 +401,7 @@ - #undef HAVE_SYS_SYSINFO_H - - /* Define to 1 if you have the header file. */ --#undef HAVE_SYS_TIME_H -+#define HAVE_SYS_TIME_H 1 - - /* Define to 1 if you have the header file. */ - #undef HAVE_SYS_TYPES_H -@@ -431,7 +431,7 @@ - #undef HAVE_TGMATH_H - - /* Define to 1 if the target supports thread-local storage. */ --#undef HAVE_TLS -+#define HAVE_TLS 1 - - /* Define to 1 if you have the header file. */ - #undef HAVE_UNISTD_H -@@ -644,7 +644,7 @@ - #undef HAVE__TANL - - /* Define as const if the declaration of iconv() needs const. */ --#undef ICONV_CONST -+#define ICONV_CONST 1 - - /* Define to the sub-directory in which libtool stores uninstalled libraries. - */ diff --git a/packages/lang/gcc/patches/gcc-4.8.2-bug-58854.patch b/packages/lang/gcc/patches/gcc-4.8.2-bug-58854.patch new file mode 100644 index 0000000000..fec4d00311 --- /dev/null +++ b/packages/lang/gcc/patches/gcc-4.8.2-bug-58854.patch @@ -0,0 +1,10 @@ +--- a/gcc/config/arm/arm.c ++++ a/gcc/config/arm/arm.c +@@ -26547,6 +26547,7 @@ arm_expand_epilogue_apcs_frame (bool really_return) + num_regs = bit_count (saved_regs_mask); + if ((offsets->outgoing_args != (1 + num_regs)) || cfun->calls_alloca) + { ++ emit_insn (gen_blockage ()); + /* Unwind the stack to just below the saved registers. */ + emit_insn (gen_addsi3 (stack_pointer_rtx, + hard_frame_pointer_rtx, diff --git a/packages/lang/gcc/patches/gcc-4.7.3-disable_multilib_i386_linux64.patch b/packages/lang/gcc/patches/gcc-4.8.2-disable_multilib_i386_linux64.patch similarity index 77% rename from packages/lang/gcc/patches/gcc-4.7.3-disable_multilib_i386_linux64.patch rename to packages/lang/gcc/patches/gcc-4.8.2-disable_multilib_i386_linux64.patch index 45b1a131b1..67ae0f4583 100644 --- a/packages/lang/gcc/patches/gcc-4.7.3-disable_multilib_i386_linux64.patch +++ b/packages/lang/gcc/patches/gcc-4.8.2-disable_multilib_i386_linux64.patch @@ -1,7 +1,7 @@ -diff -Naur gcc-4.7.3/gcc/config/i386/t-linux64 gcc-4.7.3.patch/gcc/config/i386/t-linux64 ---- gcc-4.7.3/gcc/config/i386/t-linux64 2013-01-14 17:32:37.000000000 +0100 -+++ gcc-4.7.3.patch/gcc/config/i386/t-linux64 2013-04-13 01:57:45.286907048 +0200 -@@ -34,6 +34,6 @@ +diff -Naur gcc-4.8.2/gcc/config/i386/t-linux64 gcc-4.8.2.patch/gcc/config/i386/t-linux64 +--- gcc-4.8.2/gcc/config/i386/t-linux64 2013-01-10 21:38:27.000000000 +0100 ++++ gcc-4.8.2.patch/gcc/config/i386/t-linux64 2014-01-25 00:04:49.091673299 +0100 +@@ -33,6 +33,6 @@ comma=, MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) diff --git a/packages/lang/gcc/patches/gcc-4.8.2-dynamic_linker.patch b/packages/lang/gcc/patches/gcc-4.8.2-dynamic_linker.patch new file mode 100644 index 0000000000..04b7b6c468 --- /dev/null +++ b/packages/lang/gcc/patches/gcc-4.8.2-dynamic_linker.patch @@ -0,0 +1,60 @@ +diff -Naur gcc-4.8.2/gcc/config/i386/linux64.h gcc-4.8.2.patch/gcc/config/i386/linux64.h +--- gcc-4.8.2/gcc/config/i386/linux64.h 2013-01-10 21:38:27.000000000 +0100 ++++ gcc-4.8.2.patch/gcc/config/i386/linux64.h 2014-01-25 00:09:27.179269461 +0100 +@@ -28,5 +28,5 @@ + #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" + + #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" +-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" +-#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2" ++#define GLIBC_DYNAMIC_LINKERX32 "/lib/ld-linux-x32.so.2" +diff -Naur gcc-4.8.2/gcc/config/mips/linux64.h gcc-4.8.2.patch/gcc/config/mips/linux64.h +--- gcc-4.8.2/gcc/config/mips/linux64.h 2013-01-10 21:38:27.000000000 +0100 ++++ gcc-4.8.2.patch/gcc/config/mips/linux64.h 2014-01-25 00:09:31.217263893 +0100 +@@ -23,9 +23,9 @@ + #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" + + #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_LINKER64 "/lib/ld.so.1" ++#define GLIBC_DYNAMIC_LINKERN32 "/lib/ld.so.1" ++#define UCLIBC_DYNAMIC_LINKERN32 "/lib/ld-uClibc.so.0" + #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" + #define GNU_USER_DYNAMIC_LINKERN32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ +diff -Naur gcc-4.8.2/gcc/config/rs6000/linux64.h gcc-4.8.2.patch/gcc/config/rs6000/linux64.h +--- gcc-4.8.2/gcc/config/rs6000/linux64.h 2013-06-19 03:18:38.000000000 +0200 ++++ gcc-4.8.2.patch/gcc/config/rs6000/linux64.h 2014-01-25 00:09:31.217263893 +0100 +@@ -351,7 +351,7 @@ + #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 GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1" + #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" + #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" + #if DEFAULT_LIBC == LIBC_UCLIBC +diff -Naur gcc-4.8.2/gcc/config/sparc/linux64.h gcc-4.8.2.patch/gcc/config/sparc/linux64.h +--- gcc-4.8.2/gcc/config/sparc/linux64.h 2013-01-10 21:38:27.000000000 +0100 ++++ gcc-4.8.2.patch/gcc/config/sparc/linux64.h 2014-01-25 00:09:31.217263893 +0100 +@@ -93,7 +93,7 @@ + done. */ + + #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" +-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux.so.2" + + #ifdef SPARC_BI_ARCH + +@@ -201,7 +201,7 @@ + #else /* !SPARC_BI_ARCH */ + + #undef LINK_SPEC +-#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ ++#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ diff --git a/packages/lang/gcc/patches/gcc-Support-fuse-ld-bfd-and-fuse-ld-gold.patch b/packages/lang/gcc/patches/gcc-Support-fuse-ld-bfd-and-fuse-ld-gold.patch deleted file mode 100644 index 47033f1ba1..0000000000 --- a/packages/lang/gcc/patches/gcc-Support-fuse-ld-bfd-and-fuse-ld-gold.patch +++ /dev/null @@ -1,323 +0,0 @@ -From 18514bb58339ccee148545fd2a61f9dba1beabd8 Mon Sep 17 00:00:00 2001 -From: Stefan Saraev -Date: Wed, 15 May 2013 21:41:47 +0300 -Subject: [PATCH] gcc: Support -fuse-ld=bfd and -fuse-ld=gold - -this is a (partial) backport of the following patches -http://gcc.gnu.org/git/?p=gcc.git;a=patch;h=71f006b89ca312590ac63b99c9d85c0ca116fa94 -http://gcc.gnu.org/git/?p=gcc.git;a=patch;h=eadecd281f2d8bc957c4a613b67d27aeb7497412 -http://gcc.gnu.org/git/?p=gcc.git;a=patch;h=61f41b94c58c64e7334d97df57d6467cb1c7b70e -http://gcc.gnu.org/git/?p=gcc.git;a=patch;h=99d5fe2dc7fe91aa2471ae80315c9a9a60e43dc4 ---- - gcc/collect2.c | 68 ++++++++++++++++++++++++++++++++++++--------------- - gcc/common.opt | 8 ++++++ - gcc/config.in | 2 +- - gcc/configure | 12 ++++++-- - gcc/configure.ac | 12 ++++++-- - gcc/doc/invoke.texi | 8 +++++- - gcc/gcc.c | 3 +- - gcc/opts.c | 2 + - 8 files changed, 86 insertions(+), 29 deletions(-) - -diff --git a/gcc/collect2.c b/gcc/collect2.c -index 748a3f4..e7e1887 100644 ---- a/gcc/collect2.c -+++ b/gcc/collect2.c -@@ -1020,8 +1020,21 @@ maybe_run_lto_and_relink (char **lto_ld_argv, char **object_lst, - int - main (int argc, char **argv) - { -- static const char *const ld_suffix = "ld"; -- static const char *const plugin_ld_suffix = PLUGIN_LD; -+ enum linker_select -+ { -+ USE_DEFAULT_LD, -+ USE_PLUGIN_LD, -+ USE_GOLD_LD, -+ USE_BFD_LD, -+ USE_LD_MAX -+ } selected_linker = USE_DEFAULT_LD; -+ static const char *const ld_suffixes[USE_LD_MAX] = -+ { -+ "ld", -+ PLUGIN_LD_SUFFIX, -+ "ld.gold", -+ "ld.bfd" -+ }; - static const char *const real_ld_suffix = "real-ld"; - static const char *const collect_ld_suffix = "collect-ld"; - static const char *const nm_suffix = "nm"; -@@ -1032,16 +1045,13 @@ main (int argc, char **argv) - static const char *const strip_suffix = "strip"; - static const char *const gstrip_suffix = "gstrip"; - -+ const char *full_ld_suffixes[USE_LD_MAX]; - #ifdef CROSS_DIRECTORY_STRUCTURE - /* If we look for a program in the compiler directories, we just use - the short name, since these directories are already system-specific. - But it we look for a program in the system directories, we need to - qualify the program name with the target machine. */ - -- const char *const full_ld_suffix = -- concat(target_machine, "-", ld_suffix, NULL); -- const char *const full_plugin_ld_suffix = -- concat(target_machine, "-", plugin_ld_suffix, NULL); - const char *const full_nm_suffix = - concat (target_machine, "-", nm_suffix, NULL); - const char *const full_gnm_suffix = -@@ -1055,13 +1065,11 @@ main (int argc, char **argv) - const char *const full_gstrip_suffix = - concat (target_machine, "-", gstrip_suffix, NULL); - #else -- const char *const full_ld_suffix = ld_suffix; -- const char *const full_plugin_ld_suffix = plugin_ld_suffix; -- const char *const full_nm_suffix = nm_suffix; -- const char *const full_gnm_suffix = gnm_suffix; - #ifdef LDD_SUFFIX - const char *const full_ldd_suffix = ldd_suffix; - #endif -+ const char *const full_nm_suffix = nm_suffix; -+ const char *const full_gnm_suffix = gnm_suffix; - const char *const full_strip_suffix = strip_suffix; - const char *const full_gstrip_suffix = gstrip_suffix; - #endif /* CROSS_DIRECTORY_STRUCTURE */ -@@ -1078,6 +1086,7 @@ main (int argc, char **argv) - char **ld1_argv; - const char **ld1; - bool use_plugin = false; -+ bool use_collect_ld = false; - - /* The kinds of symbols we will have to consider when scanning the - outcome of a first pass link. This is ALL to start with, then might -@@ -1097,6 +1106,15 @@ main (int argc, char **argv) - int first_file; - int num_c_args; - char **old_argv; -+ int i; -+ -+ for (i = 0; i < USE_LD_MAX; i++) -+ full_ld_suffixes[i] -+#ifdef CROSS_DIRECTORY_STRUCTURE -+ = concat (target_machine, "-", ld_suffixes[i], NULL); -+#else -+ = ld_suffixes[i]; -+#endif - - p = argv[0] + strlen (argv[0]); - while (p != argv[0] && !IS_DIR_SEPARATOR (p[-1])) -@@ -1158,7 +1176,6 @@ main (int argc, char **argv) - are called. We also look for the -flto or -flto-partition=none flag to know - what LTO mode we are in. */ - { -- int i; - bool no_partition = false; - - for (i = 1; argv[i] != NULL; i ++) -@@ -1176,7 +1193,14 @@ main (int argc, char **argv) - { - use_plugin = true; - lto_mode = LTO_MODE_NONE; -+ if (selected_linker == USE_DEFAULT_LD) -+ selected_linker = USE_PLUGIN_LD; - } -+ else if (strcmp (argv[i], "-fuse-ld=bfd") == 0) -+ selected_linker = USE_BFD_LD; -+ else if (strcmp (argv[i], "-fuse-ld=gold") == 0) -+ selected_linker = USE_GOLD_LD; -+ - #ifdef COLLECT_EXPORT_LIST - /* since -brtl, -bexport, -b64 are not position dependent - also check for them here */ -@@ -1272,21 +1296,18 @@ main (int argc, char **argv) - ld_file_name = find_a_file (&cpath, real_ld_suffix); - /* Likewise for `collect-ld'. */ - if (ld_file_name == 0) -- ld_file_name = find_a_file (&cpath, collect_ld_suffix); -+ { -+ ld_file_name = find_a_file (&cpath, collect_ld_suffix); -+ use_collect_ld = ld_file_name != 0; -+ } - /* Search the compiler directories for `ld'. We have protection against - recursive calls in find_a_file. */ - if (ld_file_name == 0) -- ld_file_name = find_a_file (&cpath, -- use_plugin -- ? plugin_ld_suffix -- : ld_suffix); -+ ld_file_name = find_a_file (&cpath, ld_suffixes[selected_linker]); - /* Search the ordinary system bin directories - for `ld' (if native linking) or `TARGET-ld' (if cross). */ - if (ld_file_name == 0) -- ld_file_name = find_a_file (&path, -- use_plugin -- ? full_plugin_ld_suffix -- : full_ld_suffix); -+ ld_file_name = find_a_file (&path, full_ld_suffixes[selected_linker]); - - #ifdef REAL_NM_FILE_NAME - nm_file_name = find_a_file (&path, REAL_NM_FILE_NAME); -@@ -1443,6 +1464,13 @@ main (int argc, char **argv) - "configuration"); - #endif - } -+ else if (!use_collect_ld -+ && strncmp (arg, "-fuse-ld=", 9) == 0) -+ { -+ /* Do not pass -fuse-ld={bfd|gold} to the linker. */ -+ ld1--; -+ ld2--; -+ } - #ifdef TARGET_AIX_VERSION - else - { -diff --git a/gcc/common.opt b/gcc/common.opt -index e72d8cf..2e938f1 100644 ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -2089,6 +2089,14 @@ funwind-tables - Common Report Var(flag_unwind_tables) Optimization - Just generate unwind tables for exception handling - -+fuse-ld=bfd -+Common Negative(fuse-ld=gold) -+Use the bfd linker instead of the default linker -+ -+fuse-ld=gold -+Common Negative(fuse-ld=bfd) -+Use the gold linker instead of the default linker -+ - fuse-linker-plugin - Common Undocumented - -diff --git a/gcc/config.in b/gcc/config.in -index 2e632b2..b391b62 100644 ---- a/gcc/config.in -+++ b/gcc/config.in -@@ -1700,7 +1700,7 @@ - - /* Specify plugin linker */ - #ifndef USED_FOR_TARGET --#undef PLUGIN_LD -+#undef PLUGIN_LD_SUFFIX - #endif - - -diff --git a/gcc/configure b/gcc/configure -index 91adc79..3480292 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -21597,20 +21597,26 @@ fi - fi - - ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld --PLUGIN_LD=`basename $gcc_cv_ld` -+PLUGIN_LD_SUFFIX=`basename $gcc_cv_ld | sed -e "s,$target_alias-,,"` -+# if the PLUGIN_LD is set ld-new, just have it as ld -+# as that is the installed named. -+if test x$PLUGIN_LD_SUFFIX = xld-new \ -+ || test x$PLUGIN_LD_SUFFIX = xcollect-ld ; then -+ PLUGIN_LD_SUFFIX=ld -+fi - - # Check whether --with-plugin-ld was given. - if test "${with_plugin_ld+set}" = set; then : - withval=$with_plugin_ld; if test x"$withval" != x; then - ORIGINAL_PLUGIN_LD_FOR_TARGET="$withval" -- PLUGIN_LD="$withval" -+ PLUGIN_LD_SUFFIX=`echo $withval | sed -e "s,$target_alias-,,"` - fi - fi - - - - cat >>confdefs.h <<_ACEOF --#define PLUGIN_LD "$PLUGIN_LD" -+#define PLUGIN_LD_SUFFIX "$PLUGIN_LD_SUFFIX" - _ACEOF - - -diff --git a/gcc/configure.ac b/gcc/configure.ac -index 1d41895..0063a3d 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -2051,15 +2051,21 @@ else - fi]) - - ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld --PLUGIN_LD=`basename $gcc_cv_ld` -+PLUGIN_LD_SUFFIX=`basename $gcc_cv_ld | sed -e "s,$target_alias-,,"` -+# if the PLUGIN_LD is set ld-new, just have it as ld -+# as that is the installed named. -+if test x$PLUGIN_LD_SUFFIX = xld-new \ -+ || test x$PLUGIN_LD_SUFFIX = xcollect-ld ; then -+ PLUGIN_LD_SUFFIX=ld -+fi - AC_ARG_WITH(plugin-ld, - [AS_HELP_STRING([[--with-plugin-ld=[ARG]]], [specify the plugin linker])], - [if test x"$withval" != x; then - ORIGINAL_PLUGIN_LD_FOR_TARGET="$withval" -- PLUGIN_LD="$withval" -+ PLUGIN_LD_SUFFIX=`echo $withval | sed -e "s,$target_alias-,,"` - fi]) - AC_SUBST(ORIGINAL_PLUGIN_LD_FOR_TARGET) --AC_DEFINE_UNQUOTED(PLUGIN_LD, "$PLUGIN_LD", [Specify plugin linker]) -+AC_DEFINE_UNQUOTED(PLUGIN_LD_SUFFIX, "$PLUGIN_LD_SUFFIX", [Specify plugin linker]) - - # Check to see if we are using gold instead of ld - AC_MSG_CHECKING(whether we are using gold) -diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index f989952..ee33b03 100644 ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -415,7 +415,7 @@ Objective-C and Objective-C++ Dialects}. - -funit-at-a-time -funroll-all-loops -funroll-loops @gol - -funsafe-loop-optimizations -funsafe-math-optimizations -funswitch-loops @gol - -fvariable-expansion-in-unroller -fvect-cost-model -fvpt -fweb @gol ---fwhole-program -fwpa -fuse-linker-plugin @gol -+-fwhole-program -fwpa -fuse-ld=@var{linker} -fuse-linker-plugin @gol - --param @var{name}=@var{value} - -O -O0 -O1 -O2 -O3 -Os -Ofast} - -@@ -8042,6 +8042,12 @@ the comparison operation before register allocation is complete. - - Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}. - -+@item -fuse-ld=bfd -+Use the @command{bfd} linker instead of the default linker. -+ -+@item -fuse-ld=gold -+Use the @command{gold} linker instead of the default linker. -+ - @item -fcprop-registers - @opindex fcprop-registers - After register allocation and post-register allocation instruction splitting, -diff --git a/gcc/gcc.c b/gcc/gcc.c -index 939dcc8..a6da5c9 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -672,7 +672,8 @@ proper position among the other output files. */ - LINK_PLUGIN_SPEC \ - "%{flto|flto=*:%max_errors = value; - break; - -+ case OPT_fuse_ld_bfd: -+ case OPT_fuse_ld_gold: - case OPT_fuse_linker_plugin: - /* No-op. Used by the driver and passed to us because it starts with f.*/ - break; --- -1.7.2.5 -