summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO3
-rw-r--r--mk/build.mk1
-rw-r--r--package/avahi/Makefile4
-rw-r--r--package/mpd/Makefile24
-rw-r--r--package/musl/Makefile3
-rw-r--r--package/strace/Makefile2
-rw-r--r--package/strace/patches/patch-defs_h33
-rw-r--r--package/strace/patches/patch-desc_c11
-rw-r--r--package/strace/patches/patch-net_c17
-rw-r--r--package/strace/patches/patch-process_c49
-rw-r--r--package/strace/patches/patch-signal_c22
-rw-r--r--package/strace/patches/patch-syscall_c17
-rw-r--r--package/strace/patches/patch-time_c14
-rw-r--r--target/config/Config.in1
-rw-r--r--target/ppc/kernel/qemu-ppc3
-rw-r--r--target/sh/Makefile6
-rw-r--r--target/sh/sys-available/qemu-sh41
-rw-r--r--target/sh/sys-available/qemu-sh4eb1
-rw-r--r--toolchain/gcc/patches/4.7.3/musl-sh.patch2
-rw-r--r--toolchain/gcc/patches/4.7.3/musl-sparc.patch6
-rw-r--r--toolchain/musl/Makefile3
-rw-r--r--toolchain/musl/patches/mips64.patch12
-rw-r--r--toolchain/musl/patches/musl-git-20140225.patch8039
23 files changed, 8247 insertions, 27 deletions
diff --git a/TODO b/TODO
index cdf057a56..05c85e9e6 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,7 @@
- update gcc to 4.8.2
+- socat openssl flavour + update
+- use gnu_host_name for host_ dir
+- move target/tools to tools, mv binaries to host_ dir, use ADK_HOST_NEED_FOO (xz,lzop,bzip2,..)
- add toolchain archive creation target (optimize for size)
- hash-style=gnu for non-mips and non-musl
- add arm hard and softfloat toolchains
diff --git a/mk/build.mk b/mk/build.mk
index 1a458c870..eadccdcb3 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -35,6 +35,7 @@ DEFCONFIG= ADK_DEBUG=n \
ADK_PACKAGE_URLGRABBER=n \
ADK_PACKAGE_LIBSSP=n \
ADK_PACKAGE_OPENAFS=n \
+ ADK_PACKAGE_OPENJDK7=n \
ADK_PKG_XORG=n \
ADK_PKG_MPDBOX=n \
ADK_PKG_DEVELOPMENT=n \
diff --git a/package/avahi/Makefile b/package/avahi/Makefile
index a857cb6e2..fa8c56fe1 100644
--- a/package/avahi/Makefile
+++ b/package/avahi/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= avahi
PKG_VERSION:= 0.6.31
-PKG_RELEASE:= 1
+PKG_RELEASE:= 2
PKG_MD5SUM:= 2f22745b8f7368ad5a0a3fddac343f2d
PKG_DESCR:= mDNS daemon
PKG_SECTION:= dhcp
@@ -98,5 +98,7 @@ libavahi-install:
${IDIR_LIBAVAHI}/usr/lib
${CP} ${WRKINST}/usr/lib/libavahi-core.so* \
${IDIR_LIBAVAHI}/usr/lib
+ ${CP} ${WRKINST}/usr/lib/libavahi-glib.so* \
+ ${IDIR_LIBAVAHI}/usr/lib
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/mpd/Makefile b/package/mpd/Makefile
index 589aa14b4..222ad74bd 100644
--- a/package/mpd/Makefile
+++ b/package/mpd/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= mpd
-PKG_VERSION:= 0.18.5
-PKG_RELEASE:= 3
-PKG_MD5SUM:= 63bcf6ce338caa2ae2cd6dc8e9710d5c
+PKG_VERSION:= 0.18.8
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 7bbe1caf5abe404dc985ca4f44984b1f
PKG_DESCR:= A music player daemon
PKG_SECTION:= multimedia
PKG_DEPENDS:= glib libstdcxx libgcc libiconv-tiny libmpdclient
@@ -23,7 +23,7 @@ DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz
PKG_FLAVOURS_MPD:= WITH_ALSA WITH_AO WITH_MP3 WITH_MP4 WITH_TREMOR
PKG_FLAVOURS_MPD+= WITH_OGG WITH_FLAC WITH_WAV WITH_MMS WITH_FFMPEG
PKG_FLAVOURS_MPD+= WITH_SHOUT WITH_CURL WITH_SAMPLERATE WITH_HTTPD
-PKG_FLAVOURS_MPD+= WITH_OPUS WITH_PULSE
+PKG_FLAVOURS_MPD+= WITH_OPUS WITH_PULSE WITH_AVAHI
PKGFD_WITH_ALSA:= enable ALSA output
PKGFS_WITH_ALSA:= alsa-lib
@@ -119,6 +119,13 @@ ifeq ($(ADK_PACKAGE_MPD_WITH_PULSE),y)
PKG_FDEPENDS+= pulseaudio
endif
+PKGFD_WITH_AVAHI:= enable AVAHI/zeroconf support
+PKGFS_WITH_AVAHI:= libavahi
+PKGFB_WITH_AVAHI:= avahi
+ifeq ($(ADK_PACKAGE_MPD_WITH_AVAHI),y)
+PKG_FDEPENDS+= libavahi
+endif
+
PKGFD_WITH_HTTPD:= enable HTTP output
include ${TOPDIR}/mk/package.mk
@@ -139,8 +146,7 @@ CONFIGURE_ARGS+= --disable-jack \
--disable-sqlite \
--disable-mpg123 \
--disable-soundcloud \
- --enable-inotify \
- --with-zeroconf=no
+ --enable-inotify
ifneq (${ADK_PACKAGE_MPD_WITH_HTTPD},)
CONFIGURE_ARGS+= --enable-httpd-output
@@ -148,6 +154,12 @@ else
CONFIGURE_ARGS+= --disable-httpd-output
endif
+ifneq (${ADK_PACKAGE_MPD_WITH_AVAHI},)
+CONFIGURE_ARGS+= --with-zeroconf=avahi
+else
+CONFIGURE_ARGS+= --with-zeroconf=no
+endif
+
ifneq (${ADK_PACKAGE_MPD_WITH_PULSE},)
CONFIGURE_ARGS+= --enable-pulse
else
diff --git a/package/musl/Makefile b/package/musl/Makefile
index ad7ec664f..1de20d37e 100644
--- a/package/musl/Makefile
+++ b/package/musl/Makefile
@@ -49,6 +49,9 @@ endif
ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
MARCH:= armhf
endif
+ifeq ($(CPU_ARCH),sh4)
+MARCH:= sh
+endif
# do nothing, musl is already build in toolchain directory
do-install:
diff --git a/package/strace/Makefile b/package/strace/Makefile
index 624cf8909..9f0cfe047 100644
--- a/package/strace/Makefile
+++ b/package/strace/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= strace
PKG_VERSION:= 4.8
-PKG_RELEASE:= 7
+PKG_RELEASE:= 8
PKG_MD5SUM:= c575ef43829586801f514fd91bfe7575
PKG_DESCR:= System call trace program
PKG_SECTION:= debug
diff --git a/package/strace/patches/patch-defs_h b/package/strace/patches/patch-defs_h
new file mode 100644
index 000000000..910715f7a
--- /dev/null
+++ b/package/strace/patches/patch-defs_h
@@ -0,0 +1,33 @@
+--- strace-4.8.orig/defs.h 2013-05-14 16:10:42.000000000 +0200
++++ strace-4.8/defs.h 2014-02-26 17:36:34.000000000 +0100
+@@ -155,18 +155,18 @@ extern char *stpcpy(char *dst, const cha
+ || defined(METAG) \
+ || defined(TILE) \
+ || defined(XTENSA) \
+- ) && defined(__GLIBC__)
++ ) && defined(__linux__)
+ # include <sys/ptrace.h>
+ #else
+ /* Work around awkward prototype in ptrace.h. */
+ # define ptrace xptrace
+ # include <sys/ptrace.h>
+ # undef ptrace
+-# ifdef POWERPC
++#if defined(POWERPC) && defined(__GLIBC__)
+ # define __KERNEL__
+ # include <asm/ptrace.h>
+ # undef __KERNEL__
+-# endif
++#endif
+ extern long ptrace(int, int, char *, long);
+ #endif
+
+@@ -222,7 +222,7 @@ extern long ptrace(int, int, char *, lon
+ # define PTRACE_EVENT_EXIT 6
+ #endif
+
+-#if !defined(__GLIBC__)
++#if !defined(__GLIBC__) && !defined(PTRACE_PEEKUSER)
+ # define PTRACE_PEEKUSER PTRACE_PEEKUSR
+ # define PTRACE_POKEUSER PTRACE_POKEUSR
+ #endif
diff --git a/package/strace/patches/patch-desc_c b/package/strace/patches/patch-desc_c
new file mode 100644
index 000000000..9cfb5f505
--- /dev/null
+++ b/package/strace/patches/patch-desc_c
@@ -0,0 +1,11 @@
+--- strace-4.8.orig/desc.c 2013-05-02 00:39:10.000000000 +0200
++++ strace-4.8/desc.c 2014-02-25 15:16:36.000000000 +0100
+@@ -223,7 +223,7 @@ static const struct xlat perf_event_open
+ { 0, NULL },
+ };
+
+-#if _LFS64_LARGEFILE
++#if defined(_LFS64_LARGEFILE) && defined(__GLIBC__) || defined(__UCLIBC__)
+ /* fcntl/lockf */
+ static void
+ printflock64(struct tcb *tcp, long addr, int getlk)
diff --git a/package/strace/patches/patch-net_c b/package/strace/patches/patch-net_c
new file mode 100644
index 000000000..f579ea5fb
--- /dev/null
+++ b/package/strace/patches/patch-net_c
@@ -0,0 +1,17 @@
+--- strace-4.8.orig/net.c 2013-05-18 00:20:02.000000000 +0200
++++ strace-4.8/net.c 2014-02-25 16:06:44.000000000 +0100
+@@ -95,12 +95,14 @@
+ #endif
+
+ /* Under Linux these are enums so we can't test for them with ifdef. */
++#if !defined(IPPROTO_MAX)
+ #define IPPROTO_EGP IPPROTO_EGP
+ #define IPPROTO_PUP IPPROTO_PUP
+ #define IPPROTO_IDP IPPROTO_IDP
+ #define IPPROTO_IGMP IPPROTO_IGMP
+ #define IPPROTO_RAW IPPROTO_RAW
+ #define IPPROTO_MAX IPPROTO_MAX
++#endif
+
+ static const struct xlat domains[] = {
+ #ifdef PF_UNSPEC
diff --git a/package/strace/patches/patch-process_c b/package/strace/patches/patch-process_c
new file mode 100644
index 000000000..a3d71bc9e
--- /dev/null
+++ b/package/strace/patches/patch-process_c
@@ -0,0 +1,49 @@
+--- strace-4.8.orig/process.c 2013-05-18 00:22:19.000000000 +0200
++++ strace-4.8/process.c 2014-02-25 20:02:55.000000000 +0100
+@@ -55,7 +55,7 @@
+ # endif
+ #endif
+
+-#ifdef HAVE_LINUX_PTRACE_H
++#if defined(HAVE_LINUX_PTRACE_H) && defined(__GLIBC__)
+ # undef PTRACE_SYSCALL
+ # ifdef HAVE_STRUCT_IA64_FPREG
+ # define ia64_fpreg XXX_ia64_fpreg
+@@ -104,6 +104,10 @@
+ # include <asm/rse.h>
+ #endif
+
++#ifdef __arm__
++#include <asm/ptrace.h>
++#endif
++
+ #ifdef HAVE_PRCTL
+ # include <sys/prctl.h>
+
+@@ -2857,7 +2861,7 @@ sys_sched_setscheduler(struct tcb *tcp)
+ if (umove(tcp, tcp->u_arg[2], &p) < 0)
+ tprintf(", %#lx", tcp->u_arg[2]);
+ else
+- tprintf(", { %d }", p.__sched_priority);
++ tprintf(", { %d }", p.sched_priority);
+ }
+ return 0;
+ }
+@@ -2872,7 +2876,7 @@ sys_sched_getparam(struct tcb *tcp)
+ if (umove(tcp, tcp->u_arg[1], &p) < 0)
+ tprintf("%#lx", tcp->u_arg[1]);
+ else
+- tprintf("{ %d }", p.__sched_priority);
++ tprintf("{ %d }", p.sched_priority);
+ }
+ return 0;
+ }
+@@ -2885,7 +2889,7 @@ sys_sched_setparam(struct tcb *tcp)
+ if (umove(tcp, tcp->u_arg[1], &p) < 0)
+ tprintf("%d, %#lx", (int) tcp->u_arg[0], tcp->u_arg[1]);
+ else
+- tprintf("%d, { %d }", (int) tcp->u_arg[0], p.__sched_priority);
++ tprintf("%d, { %d }", (int) tcp->u_arg[0], p.sched_priority);
+ }
+ return 0;
+ }
diff --git a/package/strace/patches/patch-signal_c b/package/strace/patches/patch-signal_c
new file mode 100644
index 000000000..d0f9dde00
--- /dev/null
+++ b/package/strace/patches/patch-signal_c
@@ -0,0 +1,22 @@
+--- strace-4.8.orig/signal.c 2013-05-23 15:41:23.000000000 +0200
++++ strace-4.8/signal.c 2014-02-26 17:40:43.000000000 +0100
+@@ -60,6 +60,10 @@
+ # include <asm/ptrace_offsets.h>
+ #endif
+
++#ifndef POWERPC
++#include <asm/ptrace.h>
++#endif
++
+ #if defined(SPARC) || defined(SPARC64) || defined(MIPS)
+ typedef struct {
+ struct pt_regs si_regs;
+@@ -815,7 +819,7 @@ sys_sigreturn(struct tcb *tcp)
+ {
+ #if defined(ARM)
+ if (entering(tcp)) {
+- struct sigcontext_struct sc;
++ struct sigcontext sc;
+ sigset_t sigm;
+ if (umove(tcp, arm_regs.ARM_sp, &sc) < 0)
+ return 0;
diff --git a/package/strace/patches/patch-syscall_c b/package/strace/patches/patch-syscall_c
new file mode 100644
index 000000000..2c47009e4
--- /dev/null
+++ b/package/strace/patches/patch-syscall_c
@@ -0,0 +1,17 @@
+--- strace-4.8.orig/syscall.c 2013-05-14 16:10:42.000000000 +0200
++++ strace-4.8/syscall.c 2014-02-26 17:46:14.000000000 +0100
+@@ -72,12 +72,8 @@
+ # include <elf.h>
+ #endif
+
+-#if defined(AARCH64)
+-# include <asm/ptrace.h>
+-#endif
+-
+-#if defined(XTENSA)
+-# include <asm/ptrace.h>
++#ifndef POWERPC
++#include <asm/ptrace.h>
+ #endif
+
+ #ifndef ERESTARTSYS
diff --git a/package/strace/patches/patch-time_c b/package/strace/patches/patch-time_c
new file mode 100644
index 000000000..53a6cf76b
--- /dev/null
+++ b/package/strace/patches/patch-time_c
@@ -0,0 +1,14 @@
+--- strace-4.8.orig/time.c 2012-05-01 23:17:51.000000000 +0200
++++ strace-4.8/time.c 2014-02-25 17:25:14.000000000 +0100
+@@ -774,7 +774,11 @@ printsigevent(struct tcb *tcp, long arg)
+ /* _pad[0] is the _tid field which might not be
+ present in the userlevel definition of the
+ struct. */
++#if defined(__GLIBC__)
+ tprintf("{%d}", sev._sigev_un._pad[0]);
++#else
++ tprintf("{%d}", (int) sev.__pad[0]);
++#endif
+ else if (sev.sigev_notify == SIGEV_THREAD)
+ tprintf("{%p, %p}", sev.sigev_notify_function,
+ sev.sigev_notify_attributes);
diff --git a/target/config/Config.in b/target/config/Config.in
index e4bea1031..e22880b1e 100644
--- a/target/config/Config.in
+++ b/target/config/Config.in
@@ -696,6 +696,7 @@ config ADK_TARGET_LIB_MUSL
ADK_LINUX_MICROBLAZE || \
ADK_LINUX_MIPS || \
ADK_LINUX_PPC || \
+ ADK_LINUX_SH || \
ADK_LINUX_X86 || \
ADK_LINUX_X86_64
help
diff --git a/target/ppc/kernel/qemu-ppc b/target/ppc/kernel/qemu-ppc
index d3cada6ae..08dd506b5 100644
--- a/target/ppc/kernel/qemu-ppc
+++ b/target/ppc/kernel/qemu-ppc
@@ -30,6 +30,9 @@ CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
CONFIG_BLK_DEV_SD=y
CONFIG_ATA=y
+CONFIG_SATA_PMP=y
+CONFIG_ATA_SFF=y
+CONFIG_ATA_BMDMA=y
CONFIG_PATA_MACIO=y
CONFIG_MACINTOSH_DRIVERS=y
CONFIG_ADB=y
diff --git a/target/sh/Makefile b/target/sh/Makefile
index b7160a509..98c5fb3ce 100644
--- a/target/sh/Makefile
+++ b/target/sh/Makefile
@@ -26,7 +26,7 @@ imageinstall: $(FW_DIR)/$(INITRAMFS)
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_SH),y)
+ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
@echo 'qemu-system-${CPU_ARCH} -M r2d -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
endif
@@ -35,8 +35,8 @@ ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
imageinstall: createinitramfs
@cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
@echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_SH),y)
+ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-{CPU_ARCH} -M r2d -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+ @echo 'qemu-system-${CPU_ARCH} -M r2d -kernel $(FW_DIR)/$(TARGET_KERNEL)'
endif
endif
diff --git a/target/sh/sys-available/qemu-sh4 b/target/sh/sys-available/qemu-sh4
index 54f13fb65..a872b20dc 100644
--- a/target/sh/sys-available/qemu-sh4
+++ b/target/sh/sys-available/qemu-sh4
@@ -8,6 +8,7 @@ config ADK_TARGET_SYSTEM_QEMU_SH4
select ADK_TARGET_WITH_VGA
select ADK_TARGET_WITH_INPUT
select ADK_TARGET_WITH_USB
+ select ADK_TARGET_KERNEL_ZIMAGE
help
Support for Qemu Emulator (superh).
diff --git a/target/sh/sys-available/qemu-sh4eb b/target/sh/sys-available/qemu-sh4eb
index 70365d7d4..aeffc92b6 100644
--- a/target/sh/sys-available/qemu-sh4eb
+++ b/target/sh/sys-available/qemu-sh4eb
@@ -9,6 +9,7 @@ config ADK_TARGET_SYSTEM_QEMU_SH4EB
select ADK_TARGET_WITH_VGA
select ADK_TARGET_WITH_INPUT
select ADK_TARGET_WITH_USB
+ select ADK_TARGET_KERNEL_ZIMAGE
help
Support for Qemu Emulator (superh).
diff --git a/toolchain/gcc/patches/4.7.3/musl-sh.patch b/toolchain/gcc/patches/4.7.3/musl-sh.patch
index 7738f266e..fbf06082a 100644
--- a/toolchain/gcc/patches/4.7.3/musl-sh.patch
+++ b/toolchain/gcc/patches/4.7.3/musl-sh.patch
@@ -5,7 +5,7 @@ diff -Nur gcc-4.7.3.orig/gcc/config/sh/linux.h gcc-4.7.3/gcc/config/sh/linux.h
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh.1"
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh.so.1"
#undef SUBTARGET_LINK_EMUL_SUFFIX
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
diff --git a/toolchain/gcc/patches/4.7.3/musl-sparc.patch b/toolchain/gcc/patches/4.7.3/musl-sparc.patch
index 228b8522d..7c9214f07 100644
--- a/toolchain/gcc/patches/4.7.3/musl-sparc.patch
+++ b/toolchain/gcc/patches/4.7.3/musl-sparc.patch
@@ -5,8 +5,8 @@ diff -Nur gcc-4.7.3.orig/gcc/config/sparc/linux64.h gcc-4.7.3/gcc/config/sparc/l
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-sparc.1"
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-sparc.1"
++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-sparc.so.1"
++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-sparc.so.1"
+
#ifdef SPARC_BI_ARCH
@@ -18,7 +18,7 @@ diff -Nur gcc-4.7.3.orig/gcc/config/sparc/linux.h gcc-4.7.3/gcc/config/sparc/lin
done. */
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sparc.1"
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sparc.so.1"
#undef LINK_SPEC
#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
diff --git a/toolchain/musl/Makefile b/toolchain/musl/Makefile
index 44ee75775..7382b84da 100644
--- a/toolchain/musl/Makefile
+++ b/toolchain/musl/Makefile
@@ -18,6 +18,9 @@ endif
ifeq ($(CPU_ARCH),microblazeel)
REAL_GNU_TARGET_NAME:= $(subst microblazeel,microblaze,$(REAL_GNU_TARGET_NAME))
endif
+ifeq ($(CPU_ARCH),sh4)
+REAL_GNU_TARGET_NAME:= $(subst sh4,sh,$(REAL_GNU_TARGET_NAME))
+endif
$(WRKBUILD)/.headers:
(cd $(WRKBUILD); CC='$(TARGET_CC)' CROSS_COMPILE='$(TARGET_CROSS)' \
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