diff options
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/gcc/Makefile | 6 | ||||
-rw-r--r-- | toolchain/glibc/patches/glibc-cross.patch | 33 | ||||
-rw-r--r-- | toolchain/glibc/patches/sparc64.patch | 21 | ||||
-rw-r--r-- | toolchain/musl/Makefile | 6 | ||||
-rw-r--r-- | toolchain/uClibc/Makefile | 38 |
5 files changed, 39 insertions, 65 deletions
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index bbbd3d09c..f32b1836d 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -18,6 +18,7 @@ GCC_CONFOPTS= --prefix=$(STAGING_HOST_DIR) \ --with-libelf=$(STAGING_HOST_DIR) \ --disable-__cxa_atexit \ --with-gnu-ld \ + --with-gnu-as \ --disable-libsanitizer \ --disable-libitm \ --disable-libmudflap \ @@ -100,6 +101,10 @@ ifeq ($(ADK_CPU_CORTEX_A9),y) GCC_CONFOPTS+= --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=neon endif +ifeq ($(ADK_CPU_SPARC_V9),y) +GCC_CONFOPTS+= --with-cpu=ultrasparc +endif + ifneq ($(ADK_TARGET_MIPS_ABI),) GCC_CONFOPTS+= --with-abi=${ADK_TARGET_MIPS_ABI} endif @@ -172,6 +177,7 @@ $(GCC_BUILD_DIR_FINAL)/.configured: $(WRKBUILD)/configure \ ${GCC_CONFOPTS} \ --enable-languages=$(LANGUAGES) \ + --with-build-sysroot='$${prefix}/${STAGING_HOST2TARGET}' \ --with-sysroot='$${prefix}/${STAGING_HOST2TARGET}' \ --enable-shared touch $@ diff --git a/toolchain/glibc/patches/glibc-cross.patch b/toolchain/glibc/patches/glibc-cross.patch index 4084fd20d..a1903179d 100644 --- a/toolchain/glibc/patches/glibc-cross.patch +++ b/toolchain/glibc/patches/glibc-cross.patch @@ -1,8 +1,8 @@ -diff -Nur glibc-2.18.orig/sunrpc/rpc/types.h glibc-2.18/sunrpc/rpc/types.h ---- glibc-2.18.orig/sunrpc/rpc/types.h 2013-08-11 00:52:55.000000000 +0200 -+++ glibc-2.18/sunrpc/rpc/types.h 2013-09-13 08:25:18.000000000 +0200 -@@ -69,19 +69,25 @@ - #include <sys/types.h> +diff -Nur glibc-2.19.orig/sunrpc/rpc/types.h glibc-2.19/sunrpc/rpc/types.h +--- glibc-2.19.orig/sunrpc/rpc/types.h 2014-02-07 10:04:38.000000000 +0100 ++++ glibc-2.19/sunrpc/rpc/types.h 2014-03-03 13:42:42.000000000 +0100 +@@ -74,19 +74,24 @@ + # define __daddr_t_defined #endif -#ifndef __u_char_defined @@ -18,15 +18,14 @@ diff -Nur glibc-2.18.orig/sunrpc/rpc/types.h glibc-2.18/sunrpc/rpc/types.h +typedef unsigned short u_short; +typedef unsigned int u_int; +typedef unsigned long u_long; -+#if __WORDSIZE == 64 ++#if __WORDSIZE == 64 ++#ifndef __APPLE__ +typedef long int quad_t; +typedef unsigned long int u_quad_t; ++#endif +#elif defined __GLIBC_HAVE_LONG_LONG +typedef long long int quad_t; +typedef unsigned long long int u_quad_t; -+#endif -+#if defined(_CROSS_RPCGEN_) -+typedef u_quad_t fsid_t; #endif -#ifndef __daddr_t_defined -typedef __daddr_t daddr_t; @@ -39,14 +38,14 @@ diff -Nur glibc-2.18.orig/sunrpc/rpc/types.h glibc-2.18/sunrpc/rpc/types.h # define __daddr_t_defined #endif -diff -Nur glibc-2.18.orig/sunrpc/rpc_main.c glibc-2.18/sunrpc/rpc_main.c ---- glibc-2.18.orig/sunrpc/rpc_main.c 2013-08-11 00:52:55.000000000 +0200 -+++ glibc-2.18/sunrpc/rpc_main.c 2013-09-13 08:26:07.000000000 +0200 +diff -Nur glibc-2.19.orig/sunrpc/rpc_main.c glibc-2.19/sunrpc/rpc_main.c +--- glibc-2.19.orig/sunrpc/rpc_main.c 2014-02-07 10:04:38.000000000 +0100 ++++ glibc-2.19/sunrpc/rpc_main.c 2014-03-04 07:12:00.000000000 +0100 @@ -38,7 +38,11 @@ #include <stdio.h> #include <string.h> #include <unistd.h> -+#ifdef _CROSS_RPCGEN_ ++#ifdef __APPLE__ +#define gettext(X) (X) +#else #include <libintl.h> @@ -70,14 +69,14 @@ diff -Nur glibc-2.18.orig/sunrpc/rpc_main.c glibc-2.18/sunrpc/rpc_main.c } else -diff -Nur glibc-2.18.orig/sunrpc/rpc_scan.c glibc-2.18/sunrpc/rpc_scan.c ---- glibc-2.18.orig/sunrpc/rpc_scan.c 2013-08-11 00:52:55.000000000 +0200 -+++ glibc-2.18/sunrpc/rpc_scan.c 2013-09-13 08:25:18.000000000 +0200 +diff -Nur glibc-2.19.orig/sunrpc/rpc_scan.c glibc-2.19/sunrpc/rpc_scan.c +--- glibc-2.19.orig/sunrpc/rpc_scan.c 2014-02-07 10:04:38.000000000 +0100 ++++ glibc-2.19/sunrpc/rpc_scan.c 2014-03-04 07:11:29.000000000 +0100 @@ -37,7 +37,11 @@ #include <stdio.h> #include <ctype.h> #include <string.h> -+#ifdef _CROSS_RPCGEN_ ++#ifdef __APPLE__ +#define gettext(X) (X) +#else #include <libintl.h> diff --git a/toolchain/glibc/patches/sparc64.patch b/toolchain/glibc/patches/sparc64.patch deleted file mode 100644 index c8ff7ce9f..000000000 --- a/toolchain/glibc/patches/sparc64.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -Nur glibc-2.12.1.orig/sysdeps/sparc/sparc64/Makefile glibc-2.12.1/sysdeps/sparc/sparc64/Makefile ---- glibc-2.12.1.orig/sysdeps/sparc/sparc64/Makefile 2010-07-27 13:34:39.000000000 +0200 -+++ glibc-2.12.1/sysdeps/sparc/sparc64/Makefile 2011-01-01 23:58:16.370676501 +0100 -@@ -1,3 +1,5 @@ -+sysdep-CFLAGS += -mcpu=v9 -Wa,-Av9a -+ - ifeq ($(subdir),csu) - sysdep_routines += hp-timing - elide-routines.os += hp-timing -@@ -10,3 +12,11 @@ - ifeq ($(subdir),string) - sysdep_routines += align-cpy - endif -+ -+ASFLAGS-.o += -Wa,-Av9a -+ASFLAGS-.os += -Wa,-Av9a -+ASFLAGS-.op += -Wa,-Av9a -+ASFLAGS-.og += -Wa,-Av9a -+ASFLAGS-.ob += -Wa,-Av9a -+ASFLAGS-.oS += -Wa,-Av9a -+ diff --git a/toolchain/musl/Makefile b/toolchain/musl/Makefile index d675dc4cc..aa5e8845c 100644 --- a/toolchain/musl/Makefile +++ b/toolchain/musl/Makefile @@ -15,12 +15,6 @@ endif ifeq ($(CPU_ARCH),mips64) GNU_TARGET_NAME:= $(subst mips64,mips,$(GNU_TARGET_NAME)) endif -ifeq ($(CPU_ARCH),microblazeel) -GNU_TARGET_NAME:= $(subst microblazeel,microblaze,$(GNU_TARGET_NAME)) -endif -ifeq ($(CPU_ARCH),sh4) -GNU_TARGET_NAME:= $(subst sh4,sh,$(GNU_TARGET_NAME)) -endif $(WRKBUILD)/.headers: (cd $(WRKBUILD); CC='$(TARGET_CC)' CROSS_COMPILE='$(TARGET_CROSS)' \ diff --git a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile index 4ee9af510..e5f1d8cac 100644 --- a/toolchain/uClibc/Makefile +++ b/toolchain/uClibc/Makefile @@ -14,30 +14,28 @@ ifeq (${ADK_MAKE_PARALLEL},y) UCLIBC_MAKEOPTS+= -j${ADK_MAKE_JOBS} endif -UCLIBCCFG=uclibc.config +$(WRKBUILD)/.headers: + $(SED) 's,^CROSS_COMPILE=.*,CROSS_COMPILE=$(TARGET_CROSS),g' $(WRKBUILD)/Rules.mak + sed -e 's^KERNEL_HEADERS.*$$KERNEL_HEADERS=\"${STAGING_TARGET_DIR}/usr/include\"' \ + $(TOPDIR)/target/$(ADK_TARGET_ARCH)/uclibc.config >${WRKBUILD}/.config ifeq ($(ADK_TARGET_ENDIAN),little) -ifeq ($(ADK_CPU_MIPS64),y) -UCLIBCCFG=uclibc.config.little.mips64 + $(SED) 's/.*\(ARCH_LITTLE_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config + $(SED) 's/.*\(ARCH_WANTS_LITTLE_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config + $(SED) 's/.*\(ARCH_BIG_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(ARCH_WANTS_BIG_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config else -UCLIBCCFG=uclibc.config.little + $(SED) 's/.*\(ARCH_BIG_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config + $(SED) 's/.*\(ARCH_WANTS_BIG_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config + $(SED) 's/.*\(ARCH_LITTLE_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(ARCH_WANTS_LITTLE_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config endif -endif -ifeq ($(ADK_TARGET_ENDIAN),big) -ifeq ($(ADK_CPU_MIPS64),y) -UCLIBCCFG=uclibc.config.big.mips64 +ifeq ($(ADK_LINUX_64),y) + $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS64\).*/\1=y/' ${WRKBUILD}/.config + $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS32\).*/# \1 is not set/' ${WRKBUILD}/.config else -UCLIBCCFG=uclibc.config.big -endif + $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS32\).*/\1=y/' ${WRKBUILD}/.config + $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS64\).*/# \1 is not set/' ${WRKBUILD}/.config endif - -ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y) -UCLIBCCFG=uclibc.config.little.mips64 -endif - -$(WRKBUILD)/.headers: - $(SED) 's,^CROSS_COMPILE=.*,CROSS_COMPILE=$(TARGET_CROSS),g' $(WRKBUILD)/Rules.mak - sed -e 's^KERNEL_HEADERS.*$$KERNEL_HEADERS=\"${STAGING_TARGET_DIR}/usr/include\"' \ - $(TOPDIR)/target/$(ADK_TARGET_ARCH)/$(UCLIBCCFG) >${WRKBUILD}/.config ifeq ($(ADK_TARGET_ABI_N64),y) $(SED) 's/.*\(CONFIG_MIPS_N64_ABI\).*/\1=y/' ${WRKBUILD}/.config $(SED) 's/.*\(CONFIG_MIPS_O32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config @@ -116,8 +114,6 @@ endif RUNTIME_PREFIX=/ \ CPU_CFLAGS="$(TARGET_CFLAGS)" \ all install_runtime - rm -rf $(STAGING_TARGET_DIR)/lib/libc.so - ln -s libc.so.0 $(STAGING_TARGET_DIR)/lib/libc.so # cleanup toolchain -find $(STAGING_TARGET_DIR) $(STAGING_HOST_DIR) -name \*.la -delete ifeq ($(ADK_TOOLCHAIN),y) |