From 2ec757233179928bb4d8d514509d88f1b2235783 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 15 Apr 2014 20:17:29 +0200 Subject: fix superh big endian compile for musl --- package/gcc/patches/4.8.2/musl-cross.patch | 50 +++++++++++++++--------------- package/musl/Makefile | 6 ++++ package/patch/patches/patch-Makefile_in | 18 ----------- 3 files changed, 31 insertions(+), 43 deletions(-) delete mode 100644 package/patch/patches/patch-Makefile_in (limited to 'package') diff --git a/package/gcc/patches/4.8.2/musl-cross.patch b/package/gcc/patches/4.8.2/musl-cross.patch index 5afbe360d..e12f98f3d 100644 --- a/package/gcc/patches/4.8.2/musl-cross.patch +++ b/package/gcc/patches/4.8.2/musl-cross.patch @@ -1,6 +1,6 @@ diff -Nur gcc-4.8.2.orig/fixincludes/mkfixinc.sh gcc-4.8.2/fixincludes/mkfixinc.sh --- gcc-4.8.2.orig/fixincludes/mkfixinc.sh 2012-10-28 22:42:48.000000000 +0100 -+++ gcc-4.8.2/fixincludes/mkfixinc.sh 2014-04-14 10:40:44.602902861 +0200 ++++ gcc-4.8.2/fixincludes/mkfixinc.sh 2014-04-15 15:34:20.289308442 +0200 @@ -19,7 +19,8 @@ powerpc-*-eabi* | \ powerpc-*-rtems* | \ @@ -13,7 +13,7 @@ diff -Nur gcc-4.8.2.orig/fixincludes/mkfixinc.sh gcc-4.8.2/fixincludes/mkfixinc. (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} diff -Nur gcc-4.8.2.orig/gcc/config/aarch64/aarch64-linux.h gcc-4.8.2/gcc/config/aarch64/aarch64-linux.h --- gcc-4.8.2.orig/gcc/config/aarch64/aarch64-linux.h 2013-08-13 15:22:18.000000000 +0200 -+++ gcc-4.8.2/gcc/config/aarch64/aarch64-linux.h 2014-04-14 10:40:44.602902861 +0200 ++++ gcc-4.8.2/gcc/config/aarch64/aarch64-linux.h 2014-04-15 15:34:20.289308442 +0200 @@ -21,7 +21,11 @@ #ifndef GCC_AARCH64_LINUX_H #define GCC_AARCH64_LINUX_H @@ -28,7 +28,7 @@ diff -Nur gcc-4.8.2.orig/gcc/config/aarch64/aarch64-linux.h gcc-4.8.2/gcc/config diff -Nur gcc-4.8.2.orig/gcc/config/arm/linux-eabi.h gcc-4.8.2/gcc/config/arm/linux-eabi.h --- gcc-4.8.2.orig/gcc/config/arm/linux-eabi.h 2013-01-10 21:38:27.000000000 +0100 -+++ gcc-4.8.2/gcc/config/arm/linux-eabi.h 2014-04-14 10:40:44.602902861 +0200 ++++ gcc-4.8.2/gcc/config/arm/linux-eabi.h 2014-04-15 15:34:20.289308442 +0200 @@ -77,6 +77,23 @@ %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" @@ -55,7 +55,7 @@ diff -Nur gcc-4.8.2.orig/gcc/config/arm/linux-eabi.h gcc-4.8.2/gcc/config/arm/li #undef LINK_SPEC diff -Nur gcc-4.8.2.orig/gcc/config/i386/linux64.h gcc-4.8.2/gcc/config/i386/linux64.h --- gcc-4.8.2.orig/gcc/config/i386/linux64.h 2013-01-10 21:38:27.000000000 +0100 -+++ gcc-4.8.2/gcc/config/i386/linux64.h 2014-04-14 10:40:44.602902861 +0200 ++++ gcc-4.8.2/gcc/config/i386/linux64.h 2014-04-15 15:34:20.289308442 +0200 @@ -30,3 +30,7 @@ #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" @@ -66,7 +66,7 @@ diff -Nur gcc-4.8.2.orig/gcc/config/i386/linux64.h gcc-4.8.2/gcc/config/i386/lin +#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" diff -Nur gcc-4.8.2.orig/gcc/config/i386/linux.h gcc-4.8.2/gcc/config/i386/linux.h --- gcc-4.8.2.orig/gcc/config/i386/linux.h 2013-01-10 21:38:27.000000000 +0100 -+++ gcc-4.8.2/gcc/config/i386/linux.h 2014-04-14 10:40:44.602902861 +0200 ++++ gcc-4.8.2/gcc/config/i386/linux.h 2014-04-15 15:34:20.289308442 +0200 @@ -21,3 +21,4 @@ #define GNU_USER_LINK_EMULATION "elf_i386" @@ -74,7 +74,7 @@ diff -Nur gcc-4.8.2.orig/gcc/config/i386/linux.h gcc-4.8.2/gcc/config/i386/linux +#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" diff -Nur gcc-4.8.2.orig/gcc/config/linux.h gcc-4.8.2/gcc/config/linux.h --- gcc-4.8.2.orig/gcc/config/linux.h 2013-01-10 21:38:27.000000000 +0100 -+++ gcc-4.8.2/gcc/config/linux.h 2014-04-14 10:40:44.594902489 +0200 ++++ gcc-4.8.2/gcc/config/linux.h 2014-04-15 15:34:20.293308455 +0200 @@ -32,10 +32,12 @@ #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) @@ -222,7 +222,7 @@ diff -Nur gcc-4.8.2.orig/gcc/config/linux.h gcc-4.8.2/gcc/config/linux.h +#endif diff -Nur gcc-4.8.2.orig/gcc/config/linux.opt gcc-4.8.2/gcc/config/linux.opt --- gcc-4.8.2.orig/gcc/config/linux.opt 2013-01-10 21:38:27.000000000 +0100 -+++ gcc-4.8.2/gcc/config/linux.opt 2014-04-14 10:40:44.594902489 +0200 ++++ gcc-4.8.2/gcc/config/linux.opt 2014-04-15 15:34:20.293308455 +0200 @@ -30,3 +30,7 @@ muclibc Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) @@ -233,7 +233,7 @@ diff -Nur gcc-4.8.2.orig/gcc/config/linux.opt gcc-4.8.2/gcc/config/linux.opt +Use musl C library diff -Nur gcc-4.8.2.orig/gcc/config/microblaze/linux.h gcc-4.8.2/gcc/config/microblaze/linux.h --- gcc-4.8.2.orig/gcc/config/microblaze/linux.h 2013-03-14 16:43:23.000000000 +0100 -+++ gcc-4.8.2/gcc/config/microblaze/linux.h 2014-04-14 10:40:44.602902861 +0200 ++++ gcc-4.8.2/gcc/config/microblaze/linux.h 2014-04-15 15:34:20.293308455 +0200 @@ -25,7 +25,22 @@ #undef TLS_NEEDS_GOT #define TLS_NEEDS_GOT 1 @@ -260,7 +260,7 @@ diff -Nur gcc-4.8.2.orig/gcc/config/microblaze/linux.h gcc-4.8.2/gcc/config/micr { "dynamic_linker", DYNAMIC_LINKER } diff -Nur gcc-4.8.2.orig/gcc/config/microblaze/microblaze.h gcc-4.8.2/gcc/config/microblaze/microblaze.h --- gcc-4.8.2.orig/gcc/config/microblaze/microblaze.h 2013-03-14 16:43:23.000000000 +0100 -+++ gcc-4.8.2/gcc/config/microblaze/microblaze.h 2014-04-14 10:40:44.602902861 +0200 ++++ gcc-4.8.2/gcc/config/microblaze/microblaze.h 2014-04-15 15:34:20.293308455 +0200 @@ -213,6 +213,12 @@ #define STRICT_ALIGNMENT 1 #define PCC_BITFIELD_TYPE_MATTERS 1 @@ -276,7 +276,7 @@ diff -Nur gcc-4.8.2.orig/gcc/config/microblaze/microblaze.h gcc-4.8.2/gcc/config && (ALIGN) < BITS_PER_WORD \ diff -Nur gcc-4.8.2.orig/gcc/config/mips/linux.h gcc-4.8.2/gcc/config/mips/linux.h --- gcc-4.8.2.orig/gcc/config/mips/linux.h 2013-01-10 21:38:27.000000000 +0100 -+++ gcc-4.8.2/gcc/config/mips/linux.h 2014-04-14 10:40:44.602902861 +0200 ++++ gcc-4.8.2/gcc/config/mips/linux.h 2014-04-15 15:34:20.293308455 +0200 @@ -18,3 +18,10 @@ . */ @@ -290,7 +290,7 @@ diff -Nur gcc-4.8.2.orig/gcc/config/mips/linux.h gcc-4.8.2/gcc/config/mips/linux +#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips" MUSL_DYNAMIC_LINKER_E ".so.1" diff -Nur gcc-4.8.2.orig/gcc/config/rs6000/linux64.h gcc-4.8.2/gcc/config/rs6000/linux64.h --- gcc-4.8.2.orig/gcc/config/rs6000/linux64.h 2013-06-19 03:18:38.000000000 +0200 -+++ gcc-4.8.2/gcc/config/rs6000/linux64.h 2014-04-14 10:40:44.602902861 +0200 ++++ gcc-4.8.2/gcc/config/rs6000/linux64.h 2014-04-15 15:34:20.293308455 +0200 @@ -354,17 +354,21 @@ #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1" #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" @@ -319,7 +319,7 @@ diff -Nur gcc-4.8.2.orig/gcc/config/rs6000/linux64.h gcc-4.8.2/gcc/config/rs6000 #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) diff -Nur gcc-4.8.2.orig/gcc/config/rs6000/secureplt.h gcc-4.8.2/gcc/config/rs6000/secureplt.h --- gcc-4.8.2.orig/gcc/config/rs6000/secureplt.h 2013-01-10 21:38:27.000000000 +0100 -+++ gcc-4.8.2/gcc/config/rs6000/secureplt.h 2014-04-14 10:40:44.602902861 +0200 ++++ gcc-4.8.2/gcc/config/rs6000/secureplt.h 2014-04-15 15:34:20.293308455 +0200 @@ -18,3 +18,4 @@ . */ @@ -327,7 +327,7 @@ diff -Nur gcc-4.8.2.orig/gcc/config/rs6000/secureplt.h gcc-4.8.2/gcc/config/rs60 +#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt" diff -Nur gcc-4.8.2.orig/gcc/config/rs6000/sysv4.h gcc-4.8.2/gcc/config/rs6000/sysv4.h --- gcc-4.8.2.orig/gcc/config/rs6000/sysv4.h 2013-06-19 03:18:38.000000000 +0200 -+++ gcc-4.8.2/gcc/config/rs6000/sysv4.h 2014-04-14 10:40:44.602902861 +0200 ++++ gcc-4.8.2/gcc/config/rs6000/sysv4.h 2014-04-15 15:34:20.293308455 +0200 @@ -550,6 +550,9 @@ #ifndef CC1_SECURE_PLT_DEFAULT_SPEC #define CC1_SECURE_PLT_DEFAULT_SPEC "" @@ -380,12 +380,12 @@ diff -Nur gcc-4.8.2.orig/gcc/config/rs6000/sysv4.h gcc-4.8.2/gcc/config/rs6000/s { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ diff -Nur gcc-4.8.2.orig/gcc/config/sh/linux.h gcc-4.8.2/gcc/config/sh/linux.h --- gcc-4.8.2.orig/gcc/config/sh/linux.h 2013-03-14 04:01:53.000000000 +0100 -+++ gcc-4.8.2/gcc/config/sh/linux.h 2014-04-14 10:42:16.650563570 +0200 ++++ gcc-4.8.2/gcc/config/sh/linux.h 2014-04-15 17:15:20.493877154 +0200 @@ -43,7 +43,14 @@ #define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+#if TARGET_BIG_ENDIAN_DEFAULT /* BE */ ++#if TARGET_ENDIAN_DEFAULT == 0 /* BE */ +#define MUSL_DYNAMIC_LINKER_E "eb" +#else +#define MUSL_DYNAMIC_LINKER_E @@ -398,7 +398,7 @@ diff -Nur gcc-4.8.2.orig/gcc/config/sh/linux.h gcc-4.8.2/gcc/config/sh/linux.h #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" diff -Nur gcc-4.8.2.orig/gcc/config/sh/sh.c gcc-4.8.2/gcc/config/sh/sh.c --- gcc-4.8.2.orig/gcc/config/sh/sh.c 2013-03-13 19:09:10.000000000 +0100 -+++ gcc-4.8.2/gcc/config/sh/sh.c 2014-04-14 10:41:29.816848543 +0200 ++++ gcc-4.8.2/gcc/config/sh/sh.c 2014-04-15 15:34:20.297308468 +0200 @@ -24,6 +24,9 @@ malloc & co, which are poisoned by "system.h". The proper solution is to include in "system.h" instead of . */ @@ -421,7 +421,7 @@ diff -Nur gcc-4.8.2.orig/gcc/config/sh/sh.c gcc-4.8.2/gcc/config/sh/sh.c diff -Nur gcc-4.8.2.orig/gcc/config.gcc gcc-4.8.2/gcc/config.gcc --- gcc-4.8.2.orig/gcc/config.gcc 2013-10-03 02:47:24.000000000 +0200 -+++ gcc-4.8.2/gcc/config.gcc 2014-04-14 10:40:44.602902861 +0200 ++++ gcc-4.8.2/gcc/config.gcc 2014-04-15 15:34:20.297308468 +0200 @@ -550,7 +550,7 @@ esac @@ -454,7 +454,7 @@ diff -Nur gcc-4.8.2.orig/gcc/config.gcc gcc-4.8.2/gcc/config.gcc fi diff -Nur gcc-4.8.2.orig/gcc/configure gcc-4.8.2/gcc/configure --- gcc-4.8.2.orig/gcc/configure 2013-06-19 03:18:38.000000000 +0200 -+++ gcc-4.8.2/gcc/configure 2014-04-14 10:40:44.598902675 +0200 ++++ gcc-4.8.2/gcc/configure 2014-04-15 15:34:20.301308482 +0200 @@ -26739,6 +26739,9 @@ else gcc_cv_libc_provides_ssp=no @@ -485,7 +485,7 @@ diff -Nur gcc-4.8.2.orig/gcc/configure gcc-4.8.2/gcc/configure if test x$gcc_cv_target_dl_iterate_phdr = xyes; then diff -Nur gcc-4.8.2.orig/gcc/configure.ac gcc-4.8.2/gcc/configure.ac --- gcc-4.8.2.orig/gcc/configure.ac 2013-06-19 03:18:38.000000000 +0200 -+++ gcc-4.8.2/gcc/configure.ac 2014-04-14 10:40:44.598902675 +0200 ++++ gcc-4.8.2/gcc/configure.ac 2014-04-15 15:34:20.309308509 +0200 @@ -4722,6 +4722,9 @@ gcc_cv_libc_provides_ssp, [gcc_cv_libc_provides_ssp=no @@ -516,7 +516,7 @@ diff -Nur gcc-4.8.2.orig/gcc/configure.ac gcc-4.8.2/gcc/configure.ac if test x$gcc_cv_target_dl_iterate_phdr = xyes; then diff -Nur gcc-4.8.2.orig/gcc/ginclude/stddef.h gcc-4.8.2/gcc/ginclude/stddef.h --- gcc-4.8.2.orig/gcc/ginclude/stddef.h 2013-01-10 21:38:27.000000000 +0100 -+++ gcc-4.8.2/gcc/ginclude/stddef.h 2014-04-14 10:40:44.594902489 +0200 ++++ gcc-4.8.2/gcc/ginclude/stddef.h 2014-04-15 15:34:20.313308522 +0200 @@ -181,6 +181,7 @@ #ifndef _GCC_SIZE_T #ifndef _SIZET_ @@ -543,7 +543,7 @@ diff -Nur gcc-4.8.2.orig/gcc/ginclude/stddef.h gcc-4.8.2/gcc/ginclude/stddef.h #endif /* _GCC_SIZE_T */ diff -Nur gcc-4.8.2.orig/libgcc/unwind-dw2-fde-dip.c gcc-4.8.2/libgcc/unwind-dw2-fde-dip.c --- gcc-4.8.2.orig/libgcc/unwind-dw2-fde-dip.c 2013-02-04 20:06:20.000000000 +0100 -+++ gcc-4.8.2/libgcc/unwind-dw2-fde-dip.c 2014-04-14 10:40:44.594902489 +0200 ++++ gcc-4.8.2/libgcc/unwind-dw2-fde-dip.c 2014-04-15 15:34:20.313308522 +0200 @@ -46,33 +46,13 @@ #include "unwind-compat.h" #include "gthr.h" @@ -586,7 +586,7 @@ diff -Nur gcc-4.8.2.orig/libgcc/unwind-dw2-fde-dip.c gcc-4.8.2/libgcc/unwind-dw2 #if defined(USE_PT_GNU_EH_FRAME) diff -Nur gcc-4.8.2.orig/libgomp/config/posix/time.c gcc-4.8.2/libgomp/config/posix/time.c --- gcc-4.8.2.orig/libgomp/config/posix/time.c 2013-01-14 19:18:49.000000000 +0100 -+++ gcc-4.8.2/libgomp/config/posix/time.c 2014-04-14 10:40:44.594902489 +0200 ++++ gcc-4.8.2/libgomp/config/posix/time.c 2014-04-15 15:34:20.313308522 +0200 @@ -28,6 +28,8 @@ The following implementation uses the most simple POSIX routines. If present, POSIX 4 clocks should be used instead. */ @@ -598,7 +598,7 @@ diff -Nur gcc-4.8.2.orig/libgomp/config/posix/time.c gcc-4.8.2/libgomp/config/po #if TIME_WITH_SYS_TIME diff -Nur gcc-4.8.2.orig/libitm/config/arm/hwcap.cc gcc-4.8.2/libitm/config/arm/hwcap.cc --- gcc-4.8.2.orig/libitm/config/arm/hwcap.cc 2013-02-03 18:46:11.000000000 +0100 -+++ gcc-4.8.2/libitm/config/arm/hwcap.cc 2014-04-14 10:40:44.602902861 +0200 ++++ gcc-4.8.2/libitm/config/arm/hwcap.cc 2014-04-15 15:34:20.313308522 +0200 @@ -40,7 +40,11 @@ #ifdef __linux__ @@ -613,7 +613,7 @@ diff -Nur gcc-4.8.2.orig/libitm/config/arm/hwcap.cc gcc-4.8.2/libitm/config/arm/ static void __attribute__((constructor)) diff -Nur gcc-4.8.2.orig/libitm/config/linux/x86/tls.h gcc-4.8.2/libitm/config/linux/x86/tls.h --- gcc-4.8.2.orig/libitm/config/linux/x86/tls.h 2013-02-03 18:46:11.000000000 +0100 -+++ gcc-4.8.2/libitm/config/linux/x86/tls.h 2014-04-14 10:40:44.602902861 +0200 ++++ gcc-4.8.2/libitm/config/linux/x86/tls.h 2014-04-15 15:34:20.313308522 +0200 @@ -25,16 +25,19 @@ #ifndef LIBITM_X86_TLS_H #define LIBITM_X86_TLS_H 1 @@ -645,7 +645,7 @@ diff -Nur gcc-4.8.2.orig/libitm/config/linux/x86/tls.h gcc-4.8.2/libitm/config/l #endif // LIBITM_X86_TLS_H diff -Nur gcc-4.8.2.orig/libstdc++-v3/configure.host gcc-4.8.2/libstdc++-v3/configure.host --- gcc-4.8.2.orig/libstdc++-v3/configure.host 2013-06-19 03:18:38.000000000 +0200 -+++ gcc-4.8.2/libstdc++-v3/configure.host 2014-04-14 10:40:44.594902489 +0200 ++++ gcc-4.8.2/libstdc++-v3/configure.host 2014-04-15 15:34:20.313308522 +0200 @@ -264,6 +264,13 @@ os_include_dir="os/bsd/freebsd" ;; diff --git a/package/musl/Makefile b/package/musl/Makefile index efb5404cb..f400ba357 100644 --- a/package/musl/Makefile +++ b/package/musl/Makefile @@ -46,6 +46,12 @@ endif ifeq ($(CPU_ARCH),ppc) MARCH:= powerpc endif +ifeq ($(CPU_ARCH),sh4) +MARCH:= sh +endif +ifeq ($(CPU_ARCH),sh4eb) +MARCH:= sheb +endif ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y) MARCH:= armhf endif diff --git a/package/patch/patches/patch-Makefile_in b/package/patch/patches/patch-Makefile_in deleted file mode 100644 index eab39b6e8..000000000 --- a/package/patch/patches/patch-Makefile_in +++ /dev/null @@ -1,18 +0,0 @@ ---- patch-2.5.9.orig/Makefile.in 2003-05-20 18:15:48.000000000 +0200 -+++ patch-2.5.9/Makefile.in 2009-06-13 22:52:33.487310060 +0200 -@@ -112,11 +112,11 @@ patch$(EXEEXT): $(OBJS) - $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) - - install:: all installdirs -- $(INSTALL_PROGRAM) patch$(EXEEXT) $(bindir)/$(patch_name)$(EXEEXT) -- -$(INSTALL_DATA) $(srcdir)/patch.man $(man1dir)/$(patch_name)$(man1ext) -+ $(INSTALL_PROGRAM) patch$(EXEEXT) $(DESTDIR)/$(bindir)/$(patch_name)$(EXEEXT) -+ -$(INSTALL_DATA) $(srcdir)/patch.man $(DESTDIR)/$(man1dir)/$(patch_name)$(man1ext) - --installdirs:: -- $(SHELL) $(srcdir)/mkinstalldirs $(bindir) $(man1dir) -+installdirs: -+ $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)/$(bindir) $(DESTDIR)/$(man1dir) - - install-strip:: - $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install -- cgit v1.2.3