diff options
-rw-r--r-- | target/Config.in | 35 | ||||
-rw-r--r-- | target/toolchain-arm/target.mk | 2 | ||||
-rw-r--r-- | target/toolchain-armel/target.mk | 2 | ||||
-rw-r--r-- | toolchain/eglibc/Makefile | 4 | ||||
-rw-r--r-- | toolchain/eglibc/patches/eglibc-cross.patch | 92 | ||||
-rw-r--r-- | toolchain/glibc/Makefile | 18 |
6 files changed, 125 insertions, 28 deletions
diff --git a/target/Config.in b/target/Config.in index fc0f36809..6ad3feb74 100644 --- a/target/Config.in +++ b/target/Config.in @@ -478,24 +478,24 @@ config ADK_LINUX_X86_64_TOOLCHAIN endchoice -choice -prompt "Target Optimization" -depends on ADK_LINUX_ARMEL_TOOLCHAIN || ADK_LINUX_ARM_TOOLCHAIN - -config ADK_LINUX_ARM_V5TE - bool "armv5te" - help - -config ADK_LINUX_ARM_V4T - bool "armv4t" - help - -endchoice +#choice +#prompt "Target Optimization" +#depends on ADK_LINUX_ARMEL_TOOLCHAIN || ADK_LINUX_ARM_TOOLCHAIN +# +#config ADK_LINUX_ARM_V5TE +# bool "armv5te" +# help +# +#config ADK_LINUX_ARM_V4T +# bool "armv4t" +# help +# +#endchoice -config ADK_TARGET_ARCH_OPTIMIZATION - string - default "armv5te" if ADK_LINUX_ARM_V5TE - default "armv4t" if ADK_LINUX_ARM_V4T +#config ADK_TARGET_ARCH_OPTIMIZATION +# string +# default "armv5te" if ADK_LINUX_ARM_V5TE +# default "armv4t" if ADK_LINUX_ARM_V4T choice prompt "Architecture" @@ -785,6 +785,7 @@ config ADK_TARGET_LIB_GLIBC ADK_LINUX_X86_ALIX2D || \ ADK_LINUX_X86_ALIX2D13 || \ ADK_LINUX_X86_WRAP || \ + ADK_LINUX_MIPS_RB532 || \ ADK_LINUX_RESCUE || \ ADK_LINUX_X86_64_SHUTTLE || \ ADK_LINUX_TOOLCHAIN diff --git a/target/toolchain-arm/target.mk b/target/toolchain-arm/target.mk index 9037d7ac4..64327fb30 100644 --- a/target/toolchain-arm/target.mk +++ b/target/toolchain-arm/target.mk @@ -1,5 +1,5 @@ ARCH:= arm -CPU_ARCH:= armeb +CPU_ARCH:= arm KERNEL_VERSION:= 2.6.33 KERNEL_RELEASE:= 1 KERNEL_MD5SUM:= c3883760b18d50e8d78819c54d579b00 diff --git a/target/toolchain-armel/target.mk b/target/toolchain-armel/target.mk index 64327fb30..c1d2d8136 100644 --- a/target/toolchain-armel/target.mk +++ b/target/toolchain-armel/target.mk @@ -1,5 +1,5 @@ ARCH:= arm -CPU_ARCH:= arm +CPU_ARCH:= armel KERNEL_VERSION:= 2.6.33 KERNEL_RELEASE:= 1 KERNEL_MD5SUM:= c3883760b18d50e8d78819c54d579b00 diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile index f52cf0717..863cd88ba 100644 --- a/toolchain/eglibc/Makefile +++ b/toolchain/eglibc/Makefile @@ -7,6 +7,10 @@ include Makefile.inc include ${TOPDIR}/mk/buildhlp.mk +ifneq ($(ADK_DEBUG),) +TARGET_CFLAGS+= -O2 +endif + EGLIBC_CONFOPTS:= \ --build=$(GNU_HOST_NAME) \ --host=$(REAL_GNU_TARGET_NAME) \ diff --git a/toolchain/eglibc/patches/eglibc-cross.patch b/toolchain/eglibc/patches/eglibc-cross.patch new file mode 100644 index 000000000..e2cc86c2e --- /dev/null +++ b/toolchain/eglibc/patches/eglibc-cross.patch @@ -0,0 +1,92 @@ +diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc/types.h eglibc-2.11.1/libc/sunrpc/rpc/types.h +--- eglibc-2.11.1.orig/libc/sunrpc/rpc/types.h 2010-02-24 08:09:59.000000000 +0100 ++++ eglibc-2.11.1/libc/sunrpc/rpc/types.h 2010-03-22 18:30:14.944408497 +0100 +@@ -68,6 +68,7 @@ + #include <sys/types.h> + #endif + ++#if !defined(_CROSS_RPCGEN_) + #ifndef __u_char_defined + typedef __u_char u_char; + typedef __u_short u_short; +@@ -83,6 +84,7 @@ + typedef __caddr_t caddr_t; + # define __daddr_t_defined + #endif ++#endif + + #include <sys/time.h> + #include <sys/param.h> +diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_clntout.c eglibc-2.11.1/libc/sunrpc/rpc_clntout.c +--- eglibc-2.11.1.orig/libc/sunrpc/rpc_clntout.c 2010-02-24 08:10:01.000000000 +0100 ++++ eglibc-2.11.1/libc/sunrpc/rpc_clntout.c 2010-03-22 18:30:38.973160151 +0100 +@@ -31,7 +31,7 @@ + */ + #include <stdio.h> + #include <string.h> +-#include <rpc/types.h> ++#include "rpc/types.h" + #include "rpc_parse.h" + #include "rpc_util.h" + #include "proto.h" +diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_main.c eglibc-2.11.1/libc/sunrpc/rpc_main.c +--- eglibc-2.11.1.orig/libc/sunrpc/rpc_main.c 2010-02-24 08:10:00.000000000 +0100 ++++ eglibc-2.11.1/libc/sunrpc/rpc_main.c 2010-03-22 18:31:31.245661003 +0100 +@@ -37,7 +37,11 @@ + #include <stdio.h> + #include <string.h> + #include <unistd.h> ++#ifdef _CROSS_RPCGEN_ ++#define gettext(X) (X) ++#else + #include <libintl.h> ++#endif + #include <ctype.h> + #include <sys/types.h> + #include <sys/param.h> +diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_scan.c eglibc-2.11.1/libc/sunrpc/rpc_scan.c +--- eglibc-2.11.1.orig/libc/sunrpc/rpc_scan.c 2010-02-24 08:10:00.000000000 +0100 ++++ eglibc-2.11.1/libc/sunrpc/rpc_scan.c 2010-03-22 18:31:16.146907097 +0100 +@@ -36,7 +36,11 @@ + #include <stdio.h> + #include <ctype.h> + #include <string.h> ++#ifdef _CROSS_RPCGEN_ ++#define gettext(X) (X) ++#else + #include <libintl.h> ++#endif + #include "rpc_scan.h" + #include "rpc_parse.h" + #include "rpc_util.h" +diff -Nur eglibc-2.11.1.orig/libc/timezone/Makefile eglibc-2.11.1/libc/timezone/Makefile +--- eglibc-2.11.1.orig/libc/timezone/Makefile 2010-02-24 08:09:02.000000000 +0100 ++++ eglibc-2.11.1/libc/timezone/Makefile 2010-03-22 18:50:04.134408513 +0100 +@@ -69,10 +69,11 @@ + $(addprefix $(inst_zonedir)/, \ + $(posixrules-file))) + +-install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \ +- $(zonenames:%=posix/%) \ +- $(zonenames:%=right/%)) \ +- $(installed-localtime-file) $(installed-posixrules-file) ++install-others = ++#install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \ ++# $(zonenames:%=posix/%) \ ++# $(zonenames:%=right/%)) \ ++# $(installed-localtime-file) $(installed-posixrules-file) + + ifeq ($(have-ksh),yes) + install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab +@@ -181,8 +182,9 @@ + $(objpfx)zic: $(addprefix $(objpfx), $(zic-objs)) + + $(addprefix $(objpfx)cross-,$(zic-objs)): $(objpfx)cross-%.o: %.c +- gcc $< -c $(OUTPUT_OPTION) $(CFLAGS-$*.c) $(CPPFLAGS-$*) \ +- -DCROSS_ZIC $(compile-mkdep-flags) ++ gcc $< -c $(OUTPUT_OPTION) \ ++ $(filter-out -DHAVE_GETTEXT,$(CFLAGS-$*.c)) \ ++ $(CPPFLAGS-$*) -DCROSS_ZIC $(compile-mkdep-flags) + + $(objpfx)cross-zic: $(addprefix $(objpfx)cross-,$(zic-objs)) + gcc $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@ diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile index a0e4ce11e..bfd56f9fe 100644 --- a/toolchain/glibc/Makefile +++ b/toolchain/glibc/Makefile @@ -10,20 +10,19 @@ include ${TOPDIR}/mk/buildhlp.mk # glibc does not compile with Os TARGET_CFLAGS:=$(subst Os,O2,$(TARGET_CFLAGS)) -GLIBC_CONFOPTS:= \ +GLIBC_CONFOPTS:= \ --build=$(GNU_HOST_NAME) \ --host=$(REAL_GNU_TARGET_NAME) \ --with-headers=$(TOOLCHAIN_SYSROOT)/usr/include \ --disable-nls \ --disable-sanity-checks \ - --disable-nls \ --without-cvs \ --disable-profile \ --disable-debug \ + --enable-kernel="2.6.0" \ --without-gd \ --with-__thread \ --with-tls \ - --enable-kernel="2.6.0" \ --enable-add-ons GLIBC_ENV:= PATH='${TARGET_PATH}' \ @@ -33,7 +32,6 @@ GLIBC_ENV:= PATH='${TARGET_PATH}' \ CXX=${REAL_GNU_TARGET_NAME}-g++ \ AR=${REAL_GNU_TARGET_NAME}-ar \ RANLIB=${REAL_GNU_TARGET_NAME}-ranlib \ - LD=${REAL_GNU_TARGET_NAME}-ld \ libc_cv_forced_unwind=yes \ libc_cv_c_cleanup=yes \ libc_cv_gnu99_inline=yes \ @@ -51,19 +49,21 @@ GLIBC_BUILD_DIR_INITIAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-headers GLIBC_BUILD_DIR_FINAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-final $(WRKBUILD)/.headers_configure: - (cd ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION); ln -sf ../glibc-ports-2.11/ ports); mkdir -p $(GLIBC_BUILD_DIR_INITIAL) + (cd ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION); \ + ln -sf ../../w-glibc-ports-2.11-1/glibc-ports-2.11/ ports); (cd $(GLIBC_BUILD_DIR_INITIAL); \ + ${GLIBC_ENV} \ $(WRKBUILD)/configure \ - --prefix=/usr \ - --with-sysroot=$(TOOLCHAIN_SYSROOT) \ - ${GLIBC_CONFOPTS} \ + --prefix=/usr \ + --with-sysroot=$(TOOLCHAIN_SYSROOT) \ + ${GLIBC_CONFOPTS} \ ); touch $@ $(WRKBUILD)/.headers: $(WRKBUILD)/.headers_configure mkdir -p $(TOOLCHAIN_SYSROOT)/usr/lib - -$(MAKE) ${GLIBC_MAKEOPTS} -C $(GLIBC_BUILD_DIR_INITIAL) \ + -${GLIBC_ENV} $(MAKE) ${GLIBC_MAKEOPTS} -C $(GLIBC_BUILD_DIR_INITIAL) \ cross-compiling=yes \ install_root=$(TOOLCHAIN_SYSROOT) \ install-headers |