summaryrefslogtreecommitdiffstats
path: root/main/gcc/gcc-4.8-musl.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-09-25 04:11:13 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-09-25 04:22:53 +0000
commita82bb8c62a5cbece8238be92eac4037cd5f490e0 (patch)
tree62b80b941985ffe0d0c39d74905db3dcad488b9a /main/gcc/gcc-4.8-musl.patch
parentff8fb9916ea590f68fda1a6903f319ab4b5ca6e4 (diff)
downloadaports-a82bb8c62a5cbece8238be92eac4037cd5f490e0.tar.bz2
aports-a82bb8c62a5cbece8238be92eac4037cd5f490e0.tar.xz
main/gcc: unbreak libgcc on uclibc, update musl patches
- refresh all musl patches (gcc_cv_libc_provides_ssp detects now) - add patch to fix the musl patch so that on uclibc we also use gcc_cv_target_dl_iterate_phdr since the sources was changed to use this instead of __GLIBC__ defines
Diffstat (limited to 'main/gcc/gcc-4.8-musl.patch')
-rw-r--r--main/gcc/gcc-4.8-musl.patch468
1 files changed, 238 insertions, 230 deletions
diff --git a/main/gcc/gcc-4.8-musl.patch b/main/gcc/gcc-4.8-musl.patch
index 26f89eb68..2d0934ea0 100644
--- a/main/gcc/gcc-4.8-musl.patch
+++ b/main/gcc/gcc-4.8-musl.patch
@@ -1,117 +1,34 @@
---- a/gcc/config/aarch64/aarch64-linux.h 2013-01-10 21:38:27.000000000 +0100
-+++ b/gcc/config/aarch64/aarch64-linux.h 2013-09-12 21:39:34.004829498 +0200
-@@ -21,7 +21,11 @@
- #ifndef GCC_AARCH64_LINUX_H
- #define GCC_AARCH64_LINUX_H
-
-+/* The AArch64 port currently supports two dynamic linkers:
-+ - ld-linux-aarch64.so.1 - GLIBC dynamic linker
-+ - ld-musl-aarch64.so.1 - musl libc dynamic linker */
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64.so.1"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64.so.1"
-
- #define LINUX_TARGET_LINK_SPEC "%{h*} \
- %{static:-Bstatic} \
# HG changeset patch
-# Parent c3eb69047e35491fda9cd9ab1ee2ace1299c793c
-Support for arm-linux-musl.
+# Parent f50bb54f331f73405131a30b4f353cfda1c70304
+Use the generic implementation of libstdc++ primitives when we're on musl, not the glibc one.
-diff -r c3eb69047e35 gcc/config/arm/linux-eabi.h
---- a/gcc/config/arm/linux-eabi.h Thu Sep 19 07:11:38 2013 -0400
-+++ b/gcc/config/arm/linux-eabi.h Thu Sep 19 08:56:47 2013 -0400
-@@ -77,6 +77,23 @@
- %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
- %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
-
-+/* For ARM musl currently supports four dynamic linkers:
-+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
-+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
-+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
-+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
-+ musl does not support the legacy OABI mode.
-+ All the dynamic linkers live in /lib.
-+ We default to soft-float, EL. */
-+#undef MUSL_DYNAMIC_LINKER
-+#if TARGET_BIG_ENDIAN_DEFAULT
-+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
-+#endif
-+#define MUSL_DYNAMIC_LINKER \
-+ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
+diff -r f50bb54f331f libstdc++-v3/configure.host
+--- a/libstdc++-v3/configure.host Fri Mar 29 16:38:52 2013 -0400
++++ b/libstdc++-v3/configure.host Fri Mar 29 16:41:10 2013 -0400
+@@ -264,6 +264,13 @@
+ os_include_dir="os/bsd/freebsd"
+ ;;
+ gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
++ # check for musl by target
++ case "${host_os}" in
++ *-musl*)
++ os_include_dir="os/generic"
++ ;;
++ *)
+
- /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
- use the GNU/Linux version, not the generic BPABI version. */
- #undef LINK_SPEC
-diff -r c3eb69047e35 libitm/config/arm/hwcap.cc
---- a/libitm/config/arm/hwcap.cc Thu Sep 19 07:11:38 2013 -0400
-+++ b/libitm/config/arm/hwcap.cc Thu Sep 19 08:56:47 2013 -0400
-@@ -40,7 +40,11 @@
-
- #ifdef __linux__
- #include <unistd.h>
-+#ifdef __GLIBC__
- #include <sys/fcntl.h>
-+#else
-+#include <fcntl.h>
-+#endif
- #include <elf.h>
-
- static void __attribute__((constructor))
-diff -r ef9a64dbe461 gcc/configure
---- a/gcc/configure Thu Sep 19 09:37:33 2013 -0400
-+++ b/gcc/configure Thu Sep 19 09:40:09 2013 -0400
-@@ -26764,11 +26764,12 @@
- gcc_cv_libc_provides_ssp=yes
- fi
- ;;
-- *-*-gnu*)
-+ *-*-gnu* | *-*-musl*)
- # Avoid complicated tests (see
- # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
- # simply assert that glibc does provide this, which is true for all
- # realistically usable GNU/Hurd configurations.
-+ # All supported versions of musl provide it as well
- gcc_cv_libc_provides_ssp=yes;;
- *-*-darwin* | *-*-freebsd*)
- ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
-@@ -26851,6 +26852,9 @@
- gcc_cv_target_dl_iterate_phdr=no
+ if [ "$uclibc" = "yes" ]; then
+ os_include_dir="os/uclibc"
+ elif [ "$bionic" = "yes" ]; then
+@@ -272,6 +279,9 @@
+ os_include_dir="os/gnu-linux"
fi
;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
++
++ esac
+ ;;
- esac
-
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
-diff -r ef9a64dbe461 gcc/configure.ac
---- a/gcc/configure.ac Thu Sep 19 09:37:33 2013 -0400
-+++ b/gcc/configure.ac Thu Sep 19 09:40:09 2013 -0400
-@@ -4747,11 +4747,12 @@
- gcc_cv_libc_provides_ssp=yes
- fi]
- ;;
-- *-*-gnu*)
-+ *-*-gnu* | *-*-musl*)
- # Avoid complicated tests (see
- # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
- # simply assert that glibc does provide this, which is true for all
- # realistically usable GNU/Hurd configurations.
-+ # All supported versions of musl provide it as well
- gcc_cv_libc_provides_ssp=yes;;
- *-*-darwin* | *-*-freebsd*)
- AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes],
-@@ -4817,6 +4818,9 @@
- gcc_cv_target_dl_iterate_phdr=no
- fi
+ hpux*)
+ os_include_dir="os/hpux"
;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ ;;
- esac
- GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR])
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
# HG changeset patch
# Parent 572f7b4d1c50cefde3aa2c43d06040fc308ad989
Adding -mmusl as a musl libc specifier, and the necessary hacks for it to know how to find musl's dynamic linker.
@@ -340,6 +257,111 @@ diff -r 2b94537ce249 libgomp/config/posix/time.c
#include "libgomp.h"
#include <unistd.h>
#if TIME_WITH_SYS_TIME
+diff -r 7cba4201a2ae libgcc/unwind-dw2-fde-dip.c
+--- a/libgcc/unwind-dw2-fde-dip.c Sat Jul 27 22:53:05 2013 -0400
++++ b/libgcc/unwind-dw2-fde-dip.c Sat Jul 27 22:57:08 2013 -0400
+@@ -46,33 +46,13 @@
+ #include "unwind-compat.h"
+ #include "gthr.h"
+
+-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
+- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
++#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR)
+ # define USE_PT_GNU_EH_FRAME
+-#endif
+-
+-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+- && defined(__BIONIC__)
+-# define USE_PT_GNU_EH_FRAME
+-#endif
+-
+-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+- && defined(__FreeBSD__) && __FreeBSD__ >= 7
+-# define ElfW __ElfN
+-# define USE_PT_GNU_EH_FRAME
+-#endif
+-
+-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+- && defined(__OpenBSD__)
+-# define ElfW(type) Elf_##type
+-# define USE_PT_GNU_EH_FRAME
+-#endif
+-
+-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+- && defined(TARGET_DL_ITERATE_PHDR) \
+- && defined(__sun__) && defined(__svr4__)
+-# define USE_PT_GNU_EH_FRAME
++# ifdef __OpenBSD__
++# define ElfW(type) Elf_##typ
++# elif defined(__FreeBSD__) && __FreeBSD__ >= 7
++# define ElfW __ElfN
++# endif
+ #endif
+
+ #if defined(USE_PT_GNU_EH_FRAME)
+diff -r 75d9c38318a7 gcc/configure
+--- a/gcc/configure Tue Sep 24 06:52:49 2013 -0400
++++ b/gcc/configure Tue Sep 24 06:54:33 2013 -0400
+@@ -26736,6 +26736,9 @@
+ else
+ gcc_cv_libc_provides_ssp=no
+ case "$target" in
++ *-*-musl*)
++ # All versions of musl provide stack protector
++ gcc_cv_libc_provides_ssp=yes;;
+ *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
+ # glibc 2.4 and later provides __stack_chk_fail and
+ # either __stack_chk_guard, or TLS access to stack guard canary.
+@@ -26769,6 +26772,7 @@
+ # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
+ # simply assert that glibc does provide this, which is true for all
+ # realistically usable GNU/Hurd configurations.
++ # All supported versions of musl provide it as well
+ gcc_cv_libc_provides_ssp=yes;;
+ *-*-darwin* | *-*-freebsd*)
+ ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
+@@ -26851,6 +26855,9 @@
+ gcc_cv_target_dl_iterate_phdr=no
+ fi
+ ;;
++ *-linux-musl*)
++ gcc_cv_target_dl_iterate_phdr=yes
++ ;;
+ esac
+
+ if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
+diff -r 75d9c38318a7 gcc/configure.ac
+--- a/gcc/configure.ac Tue Sep 24 06:52:49 2013 -0400
++++ b/gcc/configure.ac Tue Sep 24 06:54:33 2013 -0400
+@@ -4719,6 +4719,9 @@
+ gcc_cv_libc_provides_ssp,
+ [gcc_cv_libc_provides_ssp=no
+ case "$target" in
++ *-*-musl*)
++ # All versions of musl provide stack protector
++ gcc_cv_libc_provides_ssp=yes;;
+ *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
+ [# glibc 2.4 and later provides __stack_chk_fail and
+ # either __stack_chk_guard, or TLS access to stack guard canary.
+@@ -4752,6 +4755,7 @@
+ # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
+ # simply assert that glibc does provide this, which is true for all
+ # realistically usable GNU/Hurd configurations.
++ # All supported versions of musl provide it as well
+ gcc_cv_libc_provides_ssp=yes;;
+ *-*-darwin* | *-*-freebsd*)
+ AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes],
+@@ -4817,6 +4821,9 @@
+ gcc_cv_target_dl_iterate_phdr=no
+ fi
+ ;;
++ *-linux-musl*)
++ gcc_cv_target_dl_iterate_phdr=yes
++ ;;
+ esac
+ GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR])
+ if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
# HG changeset patch
# Parent 94e435662aff38e86c9ca0dff4bbf451e0190b34
Get rid of ever-broken fixincludes on musl.
@@ -359,36 +381,106 @@ diff -r 94e435662aff -r e27957848dc8 fixincludes/mkfixinc.sh
# THEN create a no-op fixer and exit
(echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
# HG changeset patch
-# Parent f50bb54f331f73405131a30b4f353cfda1c70304
-Use the generic implementation of libstdc++ primitives when we're on musl, not the glibc one.
+# Parent 3ea10cd626cb7abdfd56d3fe8d2c9ed58a82797b
+Support for i386-linux-musl and x86_64-linux-musl.
-diff -r f50bb54f331f libstdc++-v3/configure.host
---- a/libstdc++-v3/configure.host Fri Mar 29 16:38:52 2013 -0400
-+++ b/libstdc++-v3/configure.host Fri Mar 29 16:41:10 2013 -0400
-@@ -264,6 +264,13 @@
- os_include_dir="os/bsd/freebsd"
- ;;
- gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
-+ # check for musl by target
-+ case "${host_os}" in
-+ *-musl*)
-+ os_include_dir="os/generic"
-+ ;;
-+ *)
+diff -r 3ea10cd626cb gcc/config/i386/linux.h
+--- a/gcc/config/i386/linux.h Fri Mar 29 16:41:17 2013 -0400
++++ b/gcc/config/i386/linux.h Fri Mar 29 16:41:20 2013 -0400
+@@ -21,3 +21,4 @@
+
+ #define GNU_USER_LINK_EMULATION "elf_i386"
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
+diff -r 3ea10cd626cb gcc/config/i386/linux64.h
+--- a/gcc/config/i386/linux64.h Fri Mar 29 16:41:17 2013 -0400
++++ b/gcc/config/i386/linux64.h Fri Mar 29 16:41:20 2013 -0400
+@@ -30,3 +30,7 @@
+ #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"
+
- if [ "$uclibc" = "yes" ]; then
- os_include_dir="os/uclibc"
- elif [ "$bionic" = "yes" ]; then
-@@ -272,6 +279,9 @@
- os_include_dir="os/gnu-linux"
- fi
- ;;
++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
++#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
+diff -r 3ea10cd626cb libitm/config/linux/x86/tls.h
+--- a/libitm/config/linux/x86/tls.h Fri Mar 29 16:41:17 2013 -0400
++++ b/libitm/config/linux/x86/tls.h Fri Mar 29 16:41:20 2013 -0400
+@@ -25,16 +25,19 @@
+ #ifndef LIBITM_X86_TLS_H
+ #define LIBITM_X86_TLS_H 1
+
+-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
++#if defined(__GLIBC_PREREQ)
++#if __GLIBC_PREREQ(2, 10)
+ /* Use slots in the TCB head rather than __thread lookups.
+ GLIBC has reserved words 10 through 13 for TM. */
+ #define HAVE_ARCH_GTM_THREAD 1
+ #define HAVE_ARCH_GTM_THREAD_DISP 1
+ #endif
++#endif
+
+ #include "config/generic/tls.h"
+
+-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
++#if defined(__GLIBC_PREREQ)
++#if __GLIBC_PREREQ(2, 10)
+ namespace GTM HIDDEN {
+
+ #ifdef __x86_64__
+@@ -101,5 +104,6 @@
+
+ } // namespace GTM
+ #endif /* >= GLIBC 2.10 */
++#endif
+
+ #endif // LIBITM_X86_TLS_H
+# HG changeset patch
+# Parent c3eb69047e35491fda9cd9ab1ee2ace1299c793c
+Support for arm-linux-musl.
+
+diff -r c3eb69047e35 gcc/config/arm/linux-eabi.h
+--- a/gcc/config/arm/linux-eabi.h Thu Sep 19 07:11:38 2013 -0400
++++ b/gcc/config/arm/linux-eabi.h Thu Sep 19 08:56:47 2013 -0400
+@@ -77,6 +77,23 @@
+ %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
+ %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
+
++/* For ARM musl currently supports four dynamic linkers:
++ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
++ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
++ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
++ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
++ musl does not support the legacy OABI mode.
++ All the dynamic linkers live in /lib.
++ We default to soft-float, EL. */
++#undef MUSL_DYNAMIC_LINKER
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
++#else
++#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
++#endif
++#define MUSL_DYNAMIC_LINKER \
++ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
+
-+ esac
-+ ;;
- hpux*)
- os_include_dir="os/hpux"
- ;;
+ /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
+ use the GNU/Linux version, not the generic BPABI version. */
+ #undef LINK_SPEC
+diff -r c3eb69047e35 libitm/config/arm/hwcap.cc
+--- a/libitm/config/arm/hwcap.cc Thu Sep 19 07:11:38 2013 -0400
++++ b/libitm/config/arm/hwcap.cc Thu Sep 19 08:56:47 2013 -0400
+@@ -40,7 +40,11 @@
+
+ #ifdef __linux__
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <sys/fcntl.h>
++#else
++#include <fcntl.h>
++#endif
+ #include <elf.h>
+
+ static void __attribute__((constructor))
# HG changeset patch
# Parent 4618ad6f036f1e944a5262ae5875dcdf62c41f8b
Support for mips-linux-musl.
@@ -515,101 +607,17 @@ diff -r 2ffe76b215fd gcc/config/rs6000/sysv4.h
{ "cpp_os_ads", CPP_OS_ADS_SPEC }, \
{ "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
{ "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
-diff -r 7cba4201a2ae libgcc/unwind-dw2-fde-dip.c
---- a/libgcc/unwind-dw2-fde-dip.c Sat Jul 27 22:53:05 2013 -0400
-+++ b/libgcc/unwind-dw2-fde-dip.c Sat Jul 27 22:57:08 2013 -0400
-@@ -46,33 +46,13 @@
- #include "unwind-compat.h"
- #include "gthr.h"
-
--#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
-- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
-+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR)
- # define USE_PT_GNU_EH_FRAME
--#endif
--
--#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-- && defined(__BIONIC__)
--# define USE_PT_GNU_EH_FRAME
--#endif
--
--#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-- && defined(__FreeBSD__) && __FreeBSD__ >= 7
--# define ElfW __ElfN
--# define USE_PT_GNU_EH_FRAME
--#endif
--
--#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-- && defined(__OpenBSD__)
--# define ElfW(type) Elf_##type
--# define USE_PT_GNU_EH_FRAME
--#endif
--
--#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-- && defined(TARGET_DL_ITERATE_PHDR) \
-- && defined(__sun__) && defined(__svr4__)
--# define USE_PT_GNU_EH_FRAME
-+# ifdef __OpenBSD__
-+# define ElfW(type) Elf_##typ
-+# elif defined(__FreeBSD__) && __FreeBSD__ >= 7
-+# define ElfW __ElfN
-+# endif
- #endif
-
- #if defined(USE_PT_GNU_EH_FRAME)
-# HG changeset patch
-# Parent 3ea10cd626cb7abdfd56d3fe8d2c9ed58a82797b
-Support for i386-linux-musl and x86_64-linux-musl.
-
-diff -r 3ea10cd626cb gcc/config/i386/linux.h
---- a/gcc/config/i386/linux.h Fri Mar 29 16:41:17 2013 -0400
-+++ b/gcc/config/i386/linux.h Fri Mar 29 16:41:20 2013 -0400
-@@ -21,3 +21,4 @@
-
- #define GNU_USER_LINK_EMULATION "elf_i386"
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
-diff -r 3ea10cd626cb gcc/config/i386/linux64.h
---- a/gcc/config/i386/linux64.h Fri Mar 29 16:41:17 2013 -0400
-+++ b/gcc/config/i386/linux64.h Fri Mar 29 16:41:20 2013 -0400
-@@ -30,3 +30,7 @@
- #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 MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
-+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
-diff -r 3ea10cd626cb libitm/config/linux/x86/tls.h
---- a/libitm/config/linux/x86/tls.h Fri Mar 29 16:41:17 2013 -0400
-+++ b/libitm/config/linux/x86/tls.h Fri Mar 29 16:41:20 2013 -0400
-@@ -25,16 +25,19 @@
- #ifndef LIBITM_X86_TLS_H
- #define LIBITM_X86_TLS_H 1
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- /* Use slots in the TCB head rather than __thread lookups.
- GLIBC has reserved words 10 through 13 for TM. */
- #define HAVE_ARCH_GTM_THREAD 1
- #define HAVE_ARCH_GTM_THREAD_DISP 1
- #endif
-+#endif
-
- #include "config/generic/tls.h"
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- namespace GTM HIDDEN {
-
- #ifdef __x86_64__
-@@ -101,5 +104,6 @@
+--- a/gcc/config/aarch64/aarch64-linux.h 2013-01-10 21:38:27.000000000 +0100
++++ b/gcc/config/aarch64/aarch64-linux.h 2013-09-12 21:39:34.004829498 +0200
+@@ -21,7 +21,11 @@
+ #ifndef GCC_AARCH64_LINUX_H
+ #define GCC_AARCH64_LINUX_H
- } // namespace GTM
- #endif /* >= GLIBC 2.10 */
-+#endif
++/* The AArch64 port currently supports two dynamic linkers:
++ - ld-linux-aarch64.so.1 - GLIBC dynamic linker
++ - ld-musl-aarch64.so.1 - musl libc dynamic linker */
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64.so.1"
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64.so.1"
- #endif // LIBITM_X86_TLS_H
+ #define LINUX_TARGET_LINK_SPEC "%{h*} \
+ %{static:-Bstatic} \