musl-cross-make/patches/gcc-4.9.3/x86.diff
rofl0r df82dd95d8 add patches for gcc 4.9.3
at least mips support is broken, but microblazed and possibly other
archs work.

while building mips the following error was encountered:
Mode = sf\|df
Suffix = si\|2\|3
/tmp/musl-cross-make/gcc-4.9.3/build0/./gcc/xgcc -B/tmp/musl-cross-make/gcc-4.9.3/build0/./gcc/ -B/tmp/musl-cross-make/output/mips-linux-musl/bin/ -B/tmp/musl-cross-make/output/mips-linux-musl/lib/ -isystem /tmp/musl-cross-make/output/mips-linux-musl/include -isystem /tmp/musl-cross-make/output/mips-linux-musl/sys-include    -g -O2 -O0 -g0 -minterlink-mips16 -O2  -g -O2 -O0 -g0 -minterlink-mips16 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fPIC -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -fPIC -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include  -DHAVE_CC_TLS  -o subsf3.o -MT subsf3.o -MD -MP -MF subsf3.dep subsf3 -c ../../../libgcc/config/hardfp.c -fvisibility=hidden -DHIDE_EXPORTS -Wno-missing-prototypes
xgcc: error: subsf3: No such file or directory
make[3]: *** [subsf3.o] Error 1

this seems like a bug in a shell command that's invoked during the build,
possibly a sed command using GNU-only syntax.
2015-11-02 15:36:27 +00:00

56 lines
1.8 KiB
Diff

# HG changeset patch
# Parent ab9383ed51ae0c261e0c860fc6b953eb57976eef
Support for i386-linux-musl and x86_64-linux-musl.
diff -r ab9383ed51ae gcc/config/i386/linux.h
--- a/gcc/config/i386/linux.h Sun Jul 26 15:32:21 2015 -0400
+++ b/gcc/config/i386/linux.h Sun Jul 26 15:32:23 2015 -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 ab9383ed51ae gcc/config/i386/linux64.h
--- a/gcc/config/i386/linux64.h Sun Jul 26 15:32:21 2015 -0400
+++ b/gcc/config/i386/linux64.h Sun Jul 26 15:32:23 2015 -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 ab9383ed51ae libitm/config/linux/x86/tls.h
--- a/libitm/config/linux/x86/tls.h Sun Jul 26 15:32:21 2015 -0400
+++ b/libitm/config/linux/x86/tls.h Sun Jul 26 15:32:23 2015 -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