diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-02-27 19:42:53 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-02-27 19:42:53 +0100 |
commit | b4607f0f799c33138d27dd68fea5c23db2c19756 (patch) | |
tree | 19f9bfcf1344d53675d4715343ae1ff26bc4c64b /toolchain | |
parent | 75d149d0e0c688b9f121f06114abdae3bebff62c (diff) | |
parent | fe967bd0b07b9c17a99cc8b31a756d8438a49117 (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/eglibc/Makefile | 4 | ||||
-rw-r--r-- | toolchain/eglibc/Makefile.inc | 2 | ||||
-rw-r--r-- | toolchain/gcc/Makefile | 29 | ||||
-rw-r--r-- | toolchain/glibc/Makefile | 4 | ||||
-rw-r--r-- | toolchain/glibc/Makefile.inc | 2 | ||||
-rw-r--r-- | toolchain/kernel-headers/patches/3.4.82/aufs2.patch (renamed from toolchain/kernel-headers/patches/3.4.71/aufs2.patch) | 0 | ||||
-rw-r--r-- | toolchain/kernel-headers/patches/3.4.82/linux-gcc-check.patch (renamed from toolchain/kernel-headers/patches/3.4.71/linux-gcc-check.patch) | 0 | ||||
-rw-r--r-- | toolchain/kernel-headers/patches/3.4.82/microperl.patch (renamed from toolchain/kernel-headers/patches/3.4.71/microperl.patch) | 0 | ||||
-rw-r--r-- | toolchain/kernel-headers/patches/3.4.82/mkpiggy.patch (renamed from toolchain/kernel-headers/patches/3.4.71/mkpiggy.patch) | 0 | ||||
-rw-r--r-- | toolchain/kernel-headers/patches/3.4.82/relocs.patch (renamed from toolchain/kernel-headers/patches/3.4.71/relocs.patch) | 0 | ||||
-rw-r--r-- | toolchain/musl/patches/mips64.patch | 12 | ||||
-rw-r--r-- | toolchain/musl/patches/musl-git-20140225.patch | 8039 | ||||
-rw-r--r-- | toolchain/uClibc/Makefile | 3 |
13 files changed, 8058 insertions, 37 deletions
diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile index dbccb8866..5ac8e493d 100644 --- a/toolchain/eglibc/Makefile +++ b/toolchain/eglibc/Makefile @@ -21,10 +21,6 @@ TARGET_CFLAGS_LIBC:= $(filter-out -fstack-protector,$(TARGET_CFLAGS_LIBC)) include Makefile.inc include ${TOPDIR}/mk/buildhlp.mk -ifeq ($(ADK_TARGET_NO_FPU),y) -EGLIBC_CONFOPTS+= --without-fp -endif - EGLIBC_BUILD_DIR_INITIAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-headers EGLIBC_BUILD_DIR_FINAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-final diff --git a/toolchain/eglibc/Makefile.inc b/toolchain/eglibc/Makefile.inc index abb6879c3..1ac72ef54 100644 --- a/toolchain/eglibc/Makefile.inc +++ b/toolchain/eglibc/Makefile.inc @@ -10,7 +10,7 @@ EGLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \ --without-cvs \ --disable-profile \ --disable-debug \ - --enable-kernel=2.6.0 \ + --enable-kernel=2.6.32 \ --without-gd \ --disable-nscd \ --with-__thread \ diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index 32710c9bd..2cd720a63 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -81,24 +81,21 @@ else GCC_CONFOPTS+= --enable-target-optspace endif -ifeq ($(ARCH),mips) -ifeq ($(ADK_TARGET_NO_FPU),y) -GCC_CONFOPTS+= --with-float=soft -else -GCC_CONFOPTS+= --with-float=hard -endif +ifeq ($(ARCH),arm) +GCC_CONFOPTS+= --with-float=$(ADK_TARGET_FLOAT) +GCC_CONFOPTS+= --with-mode=$(ADK_TARGET_ARM_MODE) endif -ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y) -GCC_CONFOPTS+= --with-arch=armv6 --with-tune=arm1176jzf-s --with-fpu=vfp --with-float=hard +ifeq ($(ADK_CPU_ARM926EJ_S),y) +GCC_CONFOPTS+= --with-arch=armv5te --with-tune=arm1176jzf-s endif -ifeq ($(ADK_TARGET_SYSTEM_CUBOX_I),y) -ifeq ($(ADK_LINUX_ARM_WITH_THUMB),y) -GCC_CONFOPTS+= --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=neon --with-float=hard --with-mode=thumb -else -GCC_CONFOPTS+= --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=neon --with-float=hard --with-mode=arm +ifeq ($(ADK_CPU_ARM1176JZF_S),y) +GCC_CONFOPTS+= --with-arch=armv6 --with-tune=arm1176jzf-s --with-fpu=vfp endif + +ifeq ($(ADK_CPU_CORTEX_A9),y) +GCC_CONFOPTS+= --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=neon endif ifneq ($(ADK_TARGET_ABI),) @@ -209,10 +206,12 @@ $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled # fix linking g++ apps with libtool @-test -d $(STAGING_TARGET_DIR)/lib32 && \ cd $(STAGING_TARGET_DIR)/lib32 && \ - ln -sf libstdc++.so.6.0.17 libstdc++.so + ln -sf libstdc++.so.6.0.17 libstdc++.so && \ + ln -sf libstdc++.so.6.0.17 libstdc++.so.6 @-test -d $(STAGING_TARGET_DIR)/lib64 && \ cd $(STAGING_TARGET_DIR)/lib64 && \ - ln -sf libstdc++.so.6.0.17 libstdc++.so + ln -sf libstdc++.so.6.0.17 libstdc++.so && \ + ln -sf libstdc++.so.6.0.17 libstdc++.so.6 # cleanup unneeded docs rm -rf $(STAGING_HOST_DIR)/share touch $@ diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile index 0905f2f61..2fc0015d7 100644 --- a/toolchain/glibc/Makefile +++ b/toolchain/glibc/Makefile @@ -16,10 +16,6 @@ TARGET_CFLAGS_LIBC:= $(filter-out -fstack-protector,$(TARGET_CFLAGS_LIBC)) include Makefile.inc include ${TOPDIR}/mk/buildhlp.mk -ifeq ($(ADK_TARGET_NO_FPU),y) -GLIBC_CONFOPTS+= --without-fp -endif - GLIBC_MAKEOPTS+= cross-compiling=yes ifeq (${ADK_MAKE_PARALLEL},y) GLIBC_MAKEOPTS+= PARALLELMFLAGS="-j1" diff --git a/toolchain/glibc/Makefile.inc b/toolchain/glibc/Makefile.inc index 4a34c9d18..e28405643 100644 --- a/toolchain/glibc/Makefile.inc +++ b/toolchain/glibc/Makefile.inc @@ -18,7 +18,7 @@ GLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \ --disable-nscd \ --with-__thread \ --with-tls \ - --enable-kernel="2.6.0" \ + --enable-kernel="2.6.32" \ --enable-add-ons GLIBC_ENV:= PATH='${TARGET_PATH}' \ BUILD_CC=${CC_FOR_BUILD} \ diff --git a/toolchain/kernel-headers/patches/3.4.71/aufs2.patch b/toolchain/kernel-headers/patches/3.4.82/aufs2.patch index d40c9a3fe..d40c9a3fe 100644 --- a/toolchain/kernel-headers/patches/3.4.71/aufs2.patch +++ b/toolchain/kernel-headers/patches/3.4.82/aufs2.patch diff --git a/toolchain/kernel-headers/patches/3.4.71/linux-gcc-check.patch b/toolchain/kernel-headers/patches/3.4.82/linux-gcc-check.patch index 7cc381845..7cc381845 100644 --- a/toolchain/kernel-headers/patches/3.4.71/linux-gcc-check.patch +++ b/toolchain/kernel-headers/patches/3.4.82/linux-gcc-check.patch diff --git a/toolchain/kernel-headers/patches/3.4.71/microperl.patch b/toolchain/kernel-headers/patches/3.4.82/microperl.patch index 44c39f6e8..44c39f6e8 100644 --- a/toolchain/kernel-headers/patches/3.4.71/microperl.patch +++ b/toolchain/kernel-headers/patches/3.4.82/microperl.patch diff --git a/toolchain/kernel-headers/patches/3.4.71/mkpiggy.patch b/toolchain/kernel-headers/patches/3.4.82/mkpiggy.patch index d4e815cd2..d4e815cd2 100644 --- a/toolchain/kernel-headers/patches/3.4.71/mkpiggy.patch +++ b/toolchain/kernel-headers/patches/3.4.82/mkpiggy.patch diff --git a/toolchain/kernel-headers/patches/3.4.71/relocs.patch b/toolchain/kernel-headers/patches/3.4.82/relocs.patch index 43c5bb580..43c5bb580 100644 --- a/toolchain/kernel-headers/patches/3.4.71/relocs.patch +++ b/toolchain/kernel-headers/patches/3.4.82/relocs.patch diff --git a/toolchain/musl/patches/mips64.patch b/toolchain/musl/patches/mips64.patch deleted file mode 100644 index fdeb5017b..000000000 --- a/toolchain/musl/patches/mips64.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur musl-0.9.14.orig/configure musl-0.9.14/configure ---- musl-0.9.14.orig/configure 2013-09-23 23:01:11.000000000 +0200 -+++ musl-0.9.14/configure 2013-11-09 20:16:14.000000000 +0100 -@@ -225,7 +225,7 @@ - arm*) ARCH=arm ;; - i?86*) ARCH=i386 ;; - x86_64*) ARCH=x86_64 ;; --mips-*|mipsel-*) ARCH=mips ;; -+mips-*|mipsel-*|mips64-*|mips64el-*) ARCH=mips ;; - microblaze-*) ARCH=microblaze ;; - powerpc-*) ARCH=powerpc ;; - unknown) fail "$0: unable to detect target arch; try $0 --target=..." ;; diff --git a/toolchain/musl/patches/musl-git-20140225.patch b/toolchain/musl/patches/musl-git-20140225.patch new file mode 100644 index 000000000..8ee372c0a --- /dev/null +++ b/toolchain/musl/patches/musl-git-20140225.patch @@ -0,0 +1,8039 @@ +diff -Nur musl-0.9.15/arch/arm/bits/shm.h musl-git/arch/arm/bits/shm.h +--- musl-0.9.15/arch/arm/bits/shm.h 2014-01-03 21:12:17.000000000 +0100 ++++ musl-git/arch/arm/bits/shm.h 2014-02-25 15:24:14.000000000 +0100 +@@ -16,3 +16,14 @@ + unsigned long __pad1; + unsigned long __pad2; + }; ++ ++struct shminfo { ++ unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4]; ++}; ++ ++struct shm_info { ++ int __used_ids; ++ unsigned long shm_tot, shm_rss, shm_swp; ++ unsigned long __swap_attempts, __swap_successes; ++}; ++ +diff -Nur musl-0.9.15/arch/arm/bits/termios.h musl-git/arch/arm/bits/termios.h +--- musl-0.9.15/arch/arm/bits/termios.h 2014-01-03 21:12:17.000000000 +0100 ++++ musl-git/arch/arm/bits/termios.h 2014-02-25 15:24:14.000000000 +0100 +@@ -42,6 +42,7 @@ + #define IXANY 0004000 + #define IXOFF 0010000 + #define IMAXBEL 0020000 ++#define IUTF8 0040000 + + #define OPOST 0000001 + #define OLCUC 0000002 +@@ -75,9 +76,6 @@ + #define VT0 0000000 + #define VT1 0040000 + +-/* ?? */ +-#define XTABS 0014000 +- + #define B0 0000000 + #define B50 0000001 + #define B75 0000002 +@@ -125,8 +123,6 @@ + #define HUPCL 0002000 + #define CLOCAL 0004000 + +-#define CRTSCTS 020000000000 +- + #define ISIG 0000001 + #define ICANON 0000002 + #define ECHO 0000010 +@@ -137,14 +133,11 @@ + #define TOSTOP 0000400 + #define IEXTEN 0100000 + +-/* Extensions? */ +-#define CBAUDEX 0010000 + #define ECHOCTL 0001000 + #define ECHOPRT 0002000 + #define ECHOKE 0004000 + #define FLUSHO 0010000 + #define PENDIN 0040000 +-#define EXTPROC 0200000 + + #define TCOOFF 0 + #define TCOON 1 +@@ -158,3 +151,10 @@ + #define TCSANOW 0 + #define TCSADRAIN 1 + #define TCSAFLUSH 2 ++ ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++#define CBAUDEX 0010000 ++#define CRTSCTS 020000000000 ++#define EXTPROC 0200000 ++#define XTABS 0014000 ++#endif +diff -Nur musl-0.9.15/arch/arm/syscall_arch.h musl-git/arch/arm/syscall_arch.h +--- musl-0.9.15/arch/arm/syscall_arch.h 2014-01-03 21:12:17.000000000 +0100 ++++ musl-git/arch/arm/syscall_arch.h 2014-02-25 15:24:14.000000000 +0100 +@@ -3,6 +3,8 @@ + ((union { long long ll; long l[2]; }){ .ll = x }).l[1] + #define __SYSCALL_LL_O(x) 0, __SYSCALL_LL_E((x)) + ++long (__syscall)(long, ...); ++ + #ifndef __clang__ + + #define __asm_syscall(...) do { \ +diff -Nur musl-0.9.15/arch/i386/bits/shm.h musl-git/arch/i386/bits/shm.h +--- musl-0.9.15/arch/i386/bits/shm.h 2014-01-03 21:12:17.000000000 +0100 ++++ musl-git/arch/i386/bits/shm.h 2014-02-25 15:24:14.000000000 +0100 +@@ -16,3 +16,14 @@ + unsigned long __pad1; + unsigned long __pad2; + }; ++ ++struct shminfo { ++ unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4]; ++}; ++ ++struct shm_info { ++ int __used_ids; ++ unsigned long shm_tot, shm_rss, shm_swp; ++ unsigned long __swap_attempts, __swap_successes; ++}; ++ +diff -Nur musl-0.9.15/arch/i386/bits/termios.h musl-git/arch/i386/bits/termios.h +--- musl-0.9.15/arch/i386/bits/termios.h 2014-01-03 21:12:17.000000000 +0100 ++++ musl-git/arch/i386/bits/termios.h 2014-02-25 15:24:14.000000000 +0100 +@@ -42,6 +42,7 @@ + #define IXANY 0004000 + #define IXOFF 0010000 + #define IMAXBEL 0020000 ++#define IUTF8 0040000 + + #define OPOST 0000001 + #define OLCUC 0000002 +@@ -75,9 +76,6 @@ + #define VT0 0000000 + #define VT1 0040000 + +-/* ?? */ +-#define XTABS 0014000 +- + #define B0 0000000 + #define B50 0000001 + #define B75 0000002 +@@ -125,8 +123,6 @@ + #define HUPCL 0002000 + #define CLOCAL 0004000 + +-#define CRTSCTS 020000000000 +- + #define ISIG 0000001 + #define ICANON 0000002 + #define ECHO 0000010 +@@ -137,14 +133,11 @@ + #define TOSTOP 0000400 + #define IEXTEN 0100000 + +-/* Extensions? */ +-#define CBAUDEX 0010000 + #define ECHOCTL 0001000 + #define ECHOPRT 0002000 + #define ECHOKE 0004000 + #define FLUSHO 0010000 + #define PENDIN 0040000 +-#define EXTPROC 0200000 + + #define TCOOFF 0 + #define TCOON 1 +@@ -158,3 +151,10 @@ + #define TCSANOW 0 + #define TCSADRAIN 1 + #define TCSAFLUSH 2 ++ ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++#define CBAUDEX 0010000 ++#define CRTSCTS 020000000000 ++#define EXTPROC 0200000 ++#define XTABS 0014000 ++#endif +diff -Nur musl-0.9.15/arch/microblaze/bits/shm.h musl-git/arch/microblaze/bits/shm.h +--- musl-0.9.15/arch/microblaze/bits/shm.h 2014-01-03 21:12:17.000000000 +0100 ++++ musl-git/arch/microblaze/bits/shm.h 2014-02-25 15:24:14.000000000 +0100 +@@ -16,3 +16,14 @@ + unsigned long __pad1; + unsigned long __pad2; + }; ++ ++struct shminfo { ++ unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4]; ++}; ++ ++struct shm_info { ++ int __used_ids; ++ unsigned long shm_tot, shm_rss, shm_swp; ++ unsigned long __swap_attempts, __swap_successes; ++}; ++ +diff -Nur musl-0.9.15/arch/microblaze/bits/termios.h musl-git/arch/microblaze/bits/termios.h +--- musl-0.9.15/arch/microblaze/bits/termios.h 2014-01-03 21:12:17.000000000 +0100 ++++ musl-git/arch/microblaze/bits/termios.h 2014-02-25 15:24:14.000000000 +0100 +@@ -42,6 +42,7 @@ + #define IXANY 0004000 + #define IXOFF 0010000 + #define IMAXBEL 0020000 ++#define IUTF8 0040000 + + #define OPOST 0000001 + #define OLCUC 0000002 +@@ -75,9 +76,6 @@ + #define VT0 0000000 + #define VT1 0040000 + +-/* ?? */ +-#define XTABS 0014000 +- + #define B0 0000000 + #define B50 0000001 + #define B75 0000002 +@@ -125,8 +123,6 @@ + #define HUPCL 0002000 + #define CLOCAL 0004000 + +-#define CRTSCTS 020000000000 +- + #define ISIG 0000001 + #define ICANON 0000002 + #define ECHO 0000010 +@@ -137,14 +133,11 @@ + #define TOSTOP 0000400 + #define IEXTEN 0100000 + +-/* Extensions? */ +-#define CBAUDEX 0010000 + #define ECHOCTL 0001000 + #define ECHOPRT 0002000 + #define ECHOKE 0004000 + #define FLUSHO 0010000 + #define PENDIN 0040000 +-#define EXTPROC 0200000 + + #define TCOOFF 0 + #define TCOON 1 +@@ -158,3 +151,10 @@ + #define TCSANOW 0 + #define TCSADRAIN 1 + #define TCSAFLUSH 2 ++ ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++#define CBAUDEX 0010000 ++#define CRTSCTS 020000000000 ++#define EXTPROC 0200000 ++#define XTABS 0014000 ++#endif +diff -Nur musl-0.9.15/arch/microblaze/syscall_arch.h musl-git/arch/microblaze/syscall_arch.h +--- musl-0.9.15/arch/microblaze/syscall_arch.h 2014-01-03 21:12:17.000000000 +0100 ++++ musl-git/arch/microblaze/syscall_arch.h 2014-02-25 15:24:14.000000000 +0100 +@@ -3,6 +3,8 @@ + ((union { long long ll; long l[2]; }){ .ll = x }).l[1] + #define __SYSCALL_LL_O(x) 0, __SYSCALL_LL_E((x)) + ++long (__syscall)(long, ...); ++ + #ifndef __clang__ + + static __inline long __syscall0(long n) +diff -Nur musl-0.9.15/arch/mips/bits/fenv.h musl-git/arch/mips/bits/fenv.h +--- musl-0.9.15/arch/mips/bits/fenv.h 2014-01-03 21:12:17.000000000 +0100 ++++ musl-git/arch/mips/bits/fenv.h 2014-02-25 15:24:14.000000000 +0100 +@@ -1,3 +1,7 @@ ++#ifdef __mips_soft_float ++#define FE_ALL_EXCEPT 0 ++#define FE_TONEAREST 0 ++#else + #define FE_INEXACT 4 + #define FE_UNDERFLOW 8 + #define FE_OVERFLOW 16 +@@ -10,6 +14,7 @@ + #define FE_TOWARDZERO 1 + #define FE_UPWARD 2 + #define FE_DOWNWARD 3 ++#endif + + typedef unsigned short fexcept_t; + +diff -Nur musl-0.9.15/arch/mips/bits/shm.h musl-git/arch/mips/bits/shm.h +--- musl-0.9.15/arch/mips/bits/shm.h 2014-01-03 21:12:17.000000000 +0100 ++++ musl-git/arch/mips/bits/shm.h 2014-02-25 15:24:14.000000000 +0100 +@@ -13,3 +13,14 @@ + unsigned long __pad1; + unsigned long __pad2; + }; ++ ++struct shminfo { ++ unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4]; ++}; ++ ++struct shm_info { ++ int __used_ids; ++ unsigned long shm_tot, shm_rss, shm_swp; ++ unsigned long __swap_attempts, __swap_successes; ++}; ++ +diff -Nur musl-0.9.15/arch/mips/bits/termios.h musl-git/arch/mips/bits/termios.h +--- musl-0.9.15/arch/mips/bits/termios.h 2014-01-03 21:12:17.000000000 +0100 ++++ musl-git/arch/mips/bits/termios.h 2014-02-25 15:24:14.000000000 +0100 +@@ -77,9 +77,6 @@ + #define VT0 0000000 + #define VT1 0040000 + +-/* ?? */ +-#define XTABS 0014000 +- + #define B0 0000000 + #define B50 0000001 + #define B75 0000002 +@@ -129,12 +126,6 @@ + #define PARODD 0001000 + #define HUPCL 0002000 + #define CLOCAL 0004000 +-#define CBAUDEX 0010000 +- +-#define CIBAUD 002003600000 +-#define CMSPAR 010000000000 +-#define CRTSCTS 020000000000 +-#define IBSHIFT 16 + + #define ISIG 0000001 + #define ICANON 0000002 +@@ -152,9 +143,6 @@ + #define PENDIN 0040000 + #define TOSTOP 0100000 + #define ITOSTOP 0100000 +-#define EXTPROC 0200000 +- +-#define TIOCSER_TEMT 1 + + #define TCOOFF 0 + #define TCOON 1 +@@ -168,3 +156,14 @@ + #define TCSANOW 0 + #define TCSADRAIN 1 + #define TCSAFLUSH 2 ++ ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++#define CBAUDEX 0010000 ++#define CIBAUD 002003600000 ++#define IBSHIFT 16 ++#define CMSPAR 010000000000 ++#define CRTSCTS 020000000000 ++#define EXTPROC 0200000 ++#define XTABS 0014000 ++#define TIOCSER_TEMT 1 ++#endif +diff -Nur musl-0.9.15/arch/mips/reloc.h musl-git/arch/mips/reloc.h +--- musl-0.9.15/arch/mips/reloc.h 2014-01-03 21:12:17.000000000 +0100 ++++ musl-git/arch/mips/reloc.h 2014-02-25 15:24:14.000000000 +0100 +@@ -8,7 +8,13 @@ + #define ENDIAN_SUFFIX "" + #endif + +-#define LDSO_ARCH "mips" ENDIAN_SUFFIX ++#ifdef __mips_soft_float ++#define FP_SUFFIX "-sf" ++#else ++#define FP_SUFFIX "" ++#endif ++ ++#define LDSO_ARCH "mips" ENDIAN_SUFFIX FP_SUFFIX + + #define IS_COPY(x) ((x)==R_MIPS_COPY) + #define IS_PLT(x) 1 +diff -Nur musl-0.9.15/arch/mips/syscall_arch.h musl-git/arch/mips/syscall_arch.h +--- musl-0.9.15/arch/mips/syscall_arch.h 2014-01-03 21:12:17.000000000 +0100 ++++ musl-git/arch/mips/syscall_arch.h 2014-02-25 15:24:14.000000000 +0100 +@@ -3,6 +3,8 @@ + ((union { long long ll; long l[2]; }){ .ll = x }).l[1] + #define __SYSCALL_LL_O(x) 0, __SYSCALL_LL_E((x)) + ++long (__syscall)(long, ...); ++ + #ifndef __clang__ + + #define __asm_syscall(...) do { \ +diff -Nur musl-0.9.15/arch/powerpc/bits/shm.h musl-git/arch/powerpc/bits/shm.h +--- musl-0.9.15/arch/powerpc/bits/shm.h 2014-01-03 21:12:17.000000000 +0100 ++++ musl-git/arch/powerpc/bits/shm.h 2014-02-25 15:24:14.000000000 +0100 +@@ -16,3 +16,14 @@ + unsigned long __pad1; + unsigned long __pad2; + }; ++ ++struct shminfo { ++ unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4]; ++}; ++ ++struct shm_info { ++ int __used_ids; ++ unsigned long shm_tot, shm_rss, shm_swp; ++ unsigned long __swap_attempts, __swap_successes; ++}; ++ +diff -Nur musl-0.9.15/arch/powerpc/bits/termios.h musl-git/arch/powerpc/bits/termios.h +--- musl-0.9.15/arch/powerpc/bits/termios.h 2014-01-03 21:12:17.000000000 +0100 ++++ musl-git/arch/powerpc/bits/termios.h 2014-02-25 15:24:14.000000000 +0100 +@@ -66,7 +66,6 @@ + #define TAB1 00002000 + #define TAB2 00004000 + #define TAB3 00006000 +-#define XTABS 00006000 + #define CRDLY 00030000 + #define CR0 00000000 + #define CR1 00010000 +@@ -101,7 +100,6 @@ + #define B38400 0000017 + #define EXTA B19200 + #define EXTB B38400 +-#define CBAUDEX 0000000 + #define B57600 00020 + #define B115200 00021 + #define B230400 00022 +@@ -120,9 +118,6 @@ + #define B4000000 00036 + #define BOTHER 00037 + +-#define CIBAUD 077600000 +-#define IBSHIFT 16 +- + #define CSIZE 00001400 + #define CS5 00000000 + #define CS6 00000400 +@@ -136,8 +131,6 @@ + #define HUPCL 00040000 + + #define CLOCAL 00100000 +-#define CMSPAR 010000000000 +-#define CRTSCTS 020000000000 + + #define ISIG 0x00000080 + #define ICANON 0x00000100 +@@ -154,7 +147,6 @@ + #define FLUSHO 0x00800000 + #define PENDIN 0x20000000 + #define IEXTEN 0x00000400 +-#define EXTPROC 0x10000000 + + #define TCOOFF 0 + #define TCOON 1 +@@ -168,3 +160,13 @@ + #define TCSANOW 0 + #define TCSADRAIN 1 + #define TCSAFLUSH 2 ++ ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++#define CBAUDEX 0000000 ++#define CIBAUD 077600000 ++#define IBSHIFT 16 ++#define CMSPAR 010000000000 ++#define CRTSCTS 020000000000 ++#define EXTPROC 0x10000000 ++#define XTABS 00006000 ++#endif +diff -Nur musl-0.9.15/arch/superh/atomic.h musl-git/arch/superh/atomic.h +--- musl-0.9.15/arch/superh/atomic.h 1970-01-01 01:00:00.000000000 +0100 ++++ musl-git/arch/superh/atomic.h 2014-02-25 15:24:14.000000000 +0100 +@@ -0,0 +1,87 @@ ++#ifndef _INTERNAL_ATOMIC_H ++#define _INTERNAL_ATOMIC_H ++ ++#include <stdint.h> ++ ++static inline int a_ctz_l(unsigned long x) ++{ ++ static const char debruijn32[32] = { ++ 0, 1, 23, 2, 29, 24, 19, 3, 30, 27, 25, 11, 20, 8, 4, 13, ++ 31, 22, 28, 18, 26, 10, 7, 12, 21, 17, 9, 6, 16, 5, 15, 14 ++ }; ++ return debruijn32[(x&-x)*0x076be629 >> 27]; ++} ++ ++static inline int a_ctz_64(uint64_t x) ++{ ++ uint32_t y = x; ++ if (!y) { ++ y = x>>32; ++ return 32 + a_ctz_l(y); ++ } ++ return a_ctz_l(y); ++} ++ ++int __sh_cas(volatile int *, int, int); ++int __sh_swap(volatile int *, int); ++int __sh_fetch_add(volatile int *, int); ++void __sh_store(volatile int *, int); ++void __sh_and(volatile int *, int); ++void __sh_or(volatile int *, int); ++ ++#define a_cas(p,t,s) __sh_cas(p,t,s) ++#define a_swap(x,v) __sh_swap(x,v) ++#define a_fetch_add(x,v) __sh_fetch_add(x, v) ++#define a_store(x,v) __sh_store(x, v) ++#define a_and(x,v) __sh_and(x, v) ++#define a_or(x,v) __sh_or(x, v) ++ ++static inline void *a_cas_p(volatile void *p, void *t, void *s) ++{ ++ return (void *)a_cas(p, (int)t, (int)s); ++} ++ ++static inline long a_cas_l(volatile void *p, long t, long s) ++{ ++ return a_cas(p, t, s); ++} ++ ++static inline void a_inc(volatile int *x) ++{ ++ a_fetch_add(x, 1); ++} ++ ++static inline void a_dec(volatile int *x) ++{ ++ a_fetch_add(x, -1); ++} ++ ++static inline void a_spin() ++{ ++} ++ ++static inline void a_crash() ++{ ++ *(volatile char *)0=0; ++} ++ ++static inline void a_or_l(volatile void *p, long v) ++{ ++ a_or(p, v); ++} ++ ++static inline void a_and_64(volatile uint64_t *p, uint64_t v) ++{ ++ union { uint64_t v; uint32_t r[2]; } u = { v }; ++ a_and((int *)p, u.r[0]); ++ a_and((int *)p+1, u.r[1]); ++} ++ ++static inline void a_or_64(volatile uint64_t *p, uint64_t v) ++{ ++ union { uint64_t v; uint32_t r[2]; } u = { v }; ++ a_or((int *)p, u.r[0]); ++ a_or((int *)p+1, u.r[1]); ++} ++ ++#endif +diff -Nur musl-0.9.15/arch/superh/bits/alltypes.h.in musl-git/arch/superh/bits/alltypes.h.in +--- musl-0.9.15/arch/superh/bits/alltypes.h.in 1970-01-01 01:00:00.000000000 +0100 ++++ musl-git/arch/superh/bits/alltypes.h.in 2014-02-25 15:24:14.000000000 +0100 +@@ -0,0 +1,23 @@ ++#define _Addr int ++#define _Int64 long long ++#define _Reg int ++ ++TYPEDEF __builtin_va_list va_list; ++TYPEDEF __builtin_va_list __isoc_va_list; ++ ++#ifndef __cplusplus ++TYPEDEF long wchar_t; ++#endif ++TYPEDEF unsigned wint_t; ++ ++TYPEDEF float float_t; ++TYPEDEF double double_t; ++ ++TYPEDEF long time_t; ++TYPEDEF long suseconds_t; ++ ++TYPEDEF struct { union { int __i[9]; unsigned __s[9]; } __u; } pthread_attr_t; ++TYPEDEF struct { union { int __i[6]; void *__p[6]; } __u; } pthread_mutex_t; ++TYPEDEF struct { union { int __i[12]; void *__p[12]; } __u; } pthread_cond_t; ++TYPEDEF struct { union { int __i[8]; void *__p[8]; } __u; } pthread_rwlock_t; ++TYPEDEF struct { union { int __i[5]; void *__p[5]; } __u; } pthread_barrier_t; +diff -Nur musl-0.9.15/arch/superh/bits/endian.h musl-git/arch/superh/bits/endian.h +--- musl-0.9.15/arch/superh/bits/endian.h 1970-01-01 01:00:00.000000000 +0100 ++++ musl-git/arch/superh/bits/endian.h 2014-02-25 15:24:14.000000000 +0100 +@@ -0,0 +1,5 @@ ++#if __LITTLE_ENDIAN__ ++#define __BYTE_ORDER __LITTLE_ENDIAN ++#else ++#define __BYTE_ORDER __BIG_ENDIAN ++#endif +diff -Nur musl-0.9.15/arch/superh/bits/errno.h musl-git/arch/superh/bits/errno.h +--- musl-0.9.15/arch/superh/bits/errno.h 1970-01-01 01:00:00.000000000 +0100 ++++ musl-git/arch/superh/bits/errno.h 2014-02-25 15:24:14.000000000 +0100 +@@ -0,0 +1,134 @@ ++#define EPERM 1 ++#define ENOENT 2 ++#define ESRCH 3 ++#define EINTR 4 ++#define EIO 5 ++#define ENXIO 6 ++#define E2BIG 7 ++#define ENOEXEC 8 ++#define EBADF 9 ++#define ECHILD 10 ++#define EAGAIN 11 ++#define ENOMEM 12 ++#define EACCES 13 ++#define EFAULT 14 ++#define ENOTBLK 15 ++#define EBUSY 16 ++#define EEXIST 17 ++#define EXDEV 18 ++#define ENODEV 19 ++#define ENOTDIR 20 ++#define EISDIR 21 ++#define EINVAL 22 ++#define ENFILE 23 ++#define EMFILE 24 ++#define ENOTTY 25 ++#define ETXTBSY 26 ++#define EFBIG 27 ++#define ENOSPC 28 ++#define ESPIPE 29 ++#define EROFS 30 ++#define EMLINK 31 ++#define EPIPE 32 ++#define EDOM 33 ++#define ERANGE 34 ++#define EDEADLK 35 ++#define ENAMETOOLONG 36 ++#define ENOLCK 37 ++#define ENOSYS 38 ++#define ENOTEMPTY 39 ++#define ELOOP 40 ++#define EWOULDBLOCK EAGAIN ++#define ENOMSG 42 ++#define EIDRM 43 ++#define ECHRNG 44 ++#define EL2NSYNC 45 ++#define EL3HLT 46 ++#define EL3RST 47 ++#define ELNRNG 48 ++#define EUNATCH 49 ++#define ENOCSI 50 ++#define EL2HLT 51 ++#define EBADE 52 ++#define EBADR 53 ++#define EXFULL 54 ++#define ENOANO 55 ++#define EBADRQC 56 ++#define EBADSLT 57 ++#define EDEADLOCK EDEADLK ++#define EBFONT 59 ++#define ENOSTR 60 ++#define ENODATA 61 ++#define ETIME 62 ++#define ENOSR 63 ++#define ENONET 64 ++#define ENOPKG 65 ++#define EREMOTE 66 ++#define ENOLINK 67 ++#define EADV 68 ++#define ESRMNT 69 ++#define ECOMM 70 ++#define EPROTO 71 ++#define EMULTIHOP 72 ++#define EDOTDOT 73 ++#define EBADMSG 74 ++#define EOVERFLOW 75 ++#define ENOTUNIQ 76 ++#define EBADFD 77 ++#define EREMCHG 78 ++#define ELIBACC 79 ++#define ELIBBAD 80 ++#define ELIBSCN 81 ++#define ELIBMAX 82 ++#define ELIBEXEC 83 ++#define EILSEQ 84 ++#define ERESTART 85 ++#define ESTRPIPE 86 ++#define EUSERS 87 ++#define ENOTSOCK 88 ++#define EDESTADDRREQ 89 ++#define EMSGSIZE 90 ++#define EPROTOTYPE 91 ++#define ENOPROTOOPT 92 ++#define EPROTONOSUPPORT 93 ++#define ESOCKTNOSUPPORT 94 ++#define EOPNOTSUPP 95 ++#define ENOTSUP EOPNOTSUPP ++#define EPFNOSUPPORT 96 ++#define EAFNOSUPPORT 97 ++#define EADDRINUSE 98 ++#define EADDRNOTAVAIL 99 ++#define ENETDOWN 100 ++#define ENETUNREACH 101 ++#define ENETRESET 102 ++#define ECONNABORTED 103 ++#define ECONNRESET 104 ++#define ENOBUFS 105 ++#define EISCONN 106 ++#define ENOTCONN 107 ++#define ESHUTDOWN 108 ++#define ETOOMANYREFS 109 ++#define ETIMEDOUT 110 ++#define ECONNREFUSED 111 ++#define EHOSTDOWN 112 ++#define EHOSTUNREACH 113 ++#define EALREADY 114 ++#define EINPROGRESS 115 ++#define ESTALE 116 ++#define EUCLEAN 117 ++#define ENOTNAM 118 ++#define ENAVAIL 119 ++#define EISNAM 120 ++#define EREMOTEIO 121 ++#define EDQUOT 122 ++#define ENOMEDIUM 123 ++#define EMEDIUMTYPE 124 ++#define ECANCELED 125 ++#define ENOKEY 126 ++#define EKEYEXPIRED 127 ++#define EKEYREVOKED 128 ++#define EKEYREJECTED 129 ++#define EOWNERDEAD 130 ++#define ENOTRECOVERABLE 131 ++#define ERFKILL 132 ++#define EHWPOISON 133 +diff -Nur musl-0.9.15/arch/superh/bits/fcntl.h musl-git/arch/superh/bits/fcntl.h +--- musl-0.9.15/arch/superh/bits/fcntl.h 1970-01-01 01:00:00.000000000 +0100 ++++ musl-git/arch/superh/bits/fcntl.h 2014-02-25 15:24:14.000000000 +0100 +@@ -0,0 +1,39 @@ ++#define O_CREAT 0100 ++#define O_EXCL 0200 ++#define O_NOCTTY 0400 ++#define O_TRUNC 01000 ++#define O_APPEND 02000 ++#define O_NONBLOCK 04000 ++#define O_DSYNC 010000 ++#define O_SYNC 04010000 ++#define O_RSYNC 04010000 ++#define O_DIRECTORY 0200000 ++#define O_NOFOLLOW 0400000 ++#define O_CLOEXEC 02000000 ++ ++#define O_ASYNC 020000 ++#define O_DIRECT 040000 ++#define O_LARGEFILE 0100000 ++#define O_NOATIME 01000000 ++#define O_TMPFILE 020200000 ++#define O_NDELAY O_NONBLOCK ++ ++#define F_DUPFD 0 ++#define F_GETFD 1 ++#define F_SETFD 2 ++#define F_GETFL 3 ++#define F_SETFL 4 ++ ++#define F_SETOWN 8 ++#define F_GETOWN 9 ++#define F_SETSIG 10 ++#define F_GETSIG 11 ++ ++#define F_GETLK 12 ++#define F_SETLK 13 ++#define F_SETLKW 14 ++ ++#define F_SETOWN_EX 15 ++#define F_GETOWN_EX 16 ++ ++#define F_GETOWNER_UIDS 17 +diff -Nur musl-0.9.15/arch/superh/bits/fenv.h musl-git/arch/superh/bits/fenv.h +--- musl-0.9.15/arch/superh/bits/fenv.h 1970-01-01 01:00:00.000000000 +0100 ++++ musl-git/arch/superh/bits/fenv.h 2014-02-25 15:24:14.000000000 +0100 +@@ -0,0 +1,17 @@ ++#define FE_TONEAREST 0 ++#define FE_TOWARDZERO 1 ++ ++#define FE_INEXACT 0x04 ++#define FE_UNDERFLOW 0x08 ++#define FE_OVERFLOW 0x10 ++#define FE_DIVBYZERO 0x20 ++#define FE_INVALID 0x40 ++#define FE_ALL_EXCEPT 0x7c ++ ++typedef unsigned long fexcept_t; ++ ++typedef struct { ++ unsigned long __cw; ++} fenv_t; ++ ++#define FE_DFL_ENV ((const fenv_t *) -1) +diff -Nur musl-0.9.15/arch/superh/bits/float.h musl-git/arch/superh/bits/float.h +--- musl-0.9.15/arch/superh/bits/float.h 1970-01-01 01:00:00.000000000 +0100 ++++ musl-git/arch/superh/bits/float.h 2014-02-25 15:24:14.000000000 +0100 +@@ -0,0 +1,17 @@ ++#define FLT_ROUNDS 1 ++#define FLT_EVAL_METHOD 0 ++ ++#define LDBL_TRUE_MIN 4.94065645841246544177e-324L ++#define LDBL_MIN 2.22507385850720138309e-308L ++#define LDBL_MAX 1.79769313486231570815e+308L ++#define LDBL_EPSILON 2.22044604925031308085e-16L ++ ++#define LDBL_MANT_DIG 53 ++#define LDBL_MIN_EXP (-1021) ++#define LDBL_MAX_EXP 1024 ++ ++#define LDBL_DIG 15 ++#define LDBL_MIN_10_EXP (-307) ++#define LDBL_MAX_10_EXP 308 ++ ++#define DECIMAL_DIG 17 +diff -Nur musl-0.9.15/arch/superh/bits/ioctl.h musl-git/arch/superh/bits/ioctl.h +--- musl-0.9.15/arch/superh/bits/ioctl.h 1970-01-01 01:00:00.000000000 +0100 ++++ musl-git/arch/superh/bits/ioctl.h 2014-02-25 15:24:14.000000000 +0100 +@@ -0,0 +1,205 @@ ++#define _IOC(a,b,c,d) ( ((a)<<30) | ((b)<<8) | (c) | ((d)<<16) ) ++#define _IOC_NONE 0U ++#define _IOC_WRITE 1U ++#define _IOC_READ 2U ++ ++#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0) ++#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c)) ++#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c)) ++#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c)) ++ ++#define FIOCLEX _IO('f', 1) ++#define FIONCLEX _IO('f', 2) ++#define FIOASYNC _IOW('f', 125, int) ++#define FIONBIO _IOW('f', 126, int) ++#define FIONREAD _IOR('f', 127, int) ++#define TIOCINQ FIONREAD ++#define FIOQSIZE _IOR('f', 128, char[8]) ++ ++#define TCGETA _IOR('t', 23, char[18]) ++#define TCSETA _IOW('t', 24, c |