diff options
-rw-r--r-- | Config.in | 11 | ||||
-rw-r--r-- | toolchain/binutils/2.16.91.0.7/110-arm-eabi-conf.patch | 24 | ||||
-rw-r--r-- | toolchain/gcc/4.1.0/110-arm-eabi.patch | 27 | ||||
-rw-r--r-- | toolchain/kernel-headers/linux-libc-headers-2.6.12.0-arm-eabi.patch | 166 | ||||
-rw-r--r-- | toolchain/uClibc/uClibc.config | 1 | ||||
-rw-r--r-- | toolchain/uClibc/uClibc.config-locale | 1 | ||||
-rw-r--r-- | toolchain/uClibc/uclibc.mk | 3 |
7 files changed, 233 insertions, 0 deletions
@@ -89,6 +89,16 @@ config BR2_ARM_TYPE default GENERIC_ARM if BR2_generic_arm choice + prompt "Target ABI" + depends BR2_arm || BR2_armeb + default BR2_ARM_OABI +config BR2_ARM_OABI + bool "OABI" +config BR2_ARM_EABI + bool "EABI" +endchoice + +choice prompt "Target Architecture Variant" depends BR2_sh default BR2_sh4 @@ -238,6 +248,7 @@ config BR2_GNU_BUILD_SUFFIX config BR2_GNU_TARGET_SUFFIX string "GNU target suffix" + default "linux-uclibcgnueabi" if BR2_ARM_EABI default "linux-uclibc" help The string used to pass to configure scripts via the diff --git a/toolchain/binutils/2.16.91.0.7/110-arm-eabi-conf.patch b/toolchain/binutils/2.16.91.0.7/110-arm-eabi-conf.patch new file mode 100644 index 000000000..be85ceb10 --- /dev/null +++ b/toolchain/binutils/2.16.91.0.7/110-arm-eabi-conf.patch @@ -0,0 +1,24 @@ +diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure +--- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300 ++++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300 +@@ -1299,7 +1299,7 @@ + arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* ) + noconfigdirs="$noconfigdirs target-libffi target-qthreads" + ;; +- arm*-*-linux-gnueabi) ++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) + noconfigdirs="$noconfigdirs target-libffi target-qthreads" + noconfigdirs="$noconfigdirs target-libjava target-libobjc" + ;; +diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in +--- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300 ++++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300 +@@ -497,7 +497,7 @@ + arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* ) + noconfigdirs="$noconfigdirs target-libffi target-qthreads" + ;; +- arm*-*-linux-gnueabi) ++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) + noconfigdirs="$noconfigdirs target-libffi target-qthreads" + noconfigdirs="$noconfigdirs target-libjava target-libobjc" + ;; diff --git a/toolchain/gcc/4.1.0/110-arm-eabi.patch b/toolchain/gcc/4.1.0/110-arm-eabi.patch new file mode 100644 index 000000000..acebe5308 --- /dev/null +++ b/toolchain/gcc/4.1.0/110-arm-eabi.patch @@ -0,0 +1,27 @@ +--- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300 ++++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300 +@@ -674,7 +674,7 @@ + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" + tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm" + case ${target} in +- arm*-*-linux-gnueabi) ++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) + tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h" + tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi" + # The BPABI long long divmod functions return a 128-bit value in + +diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h +--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300 ++++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400 +@@ -53,7 +53,11 @@ + /* Use ld-linux.so.3 so that it will be possible to run "classic" + GNU/Linux binaries on an EABI system. */ + #undef LINUX_TARGET_INTERPRETER ++#ifdef USE_UCLIBC ++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0" ++#else + #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3" ++#endif + + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ diff --git a/toolchain/kernel-headers/linux-libc-headers-2.6.12.0-arm-eabi.patch b/toolchain/kernel-headers/linux-libc-headers-2.6.12.0-arm-eabi.patch new file mode 100644 index 000000000..dcbd21b0a --- /dev/null +++ b/toolchain/kernel-headers/linux-libc-headers-2.6.12.0-arm-eabi.patch @@ -0,0 +1,166 @@ +--- linux-libc-headers-2.6.12.0/include/asm-arm/unistd.h 2005-07-06 03:17:41.000000000 +0300 ++++ linux-libc-headers-2.6.12.0-arm-eabi/include/asm-arm/unistd.h 2006-06-05 17:14:09.000000000 +0300 +@@ -15,10 +15,12 @@ + + #include <linux/linkage.h> + +-#if defined(__thumb__) ++#define __NR_OABI_SYSCALL_BASE 0x900000 ++ ++#if defined(__thumb__) || defined(__ARM_EABI__) + #define __NR_SYSCALL_BASE 0 + #else +-#define __NR_SYSCALL_BASE 0x900000 ++#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE + #endif + + /* +@@ -365,13 +375,13 @@ + #define __sys1(x) __sys2(x) + + #ifndef __syscall +-#if defined(__thumb__) +-#define __syscall(name) \ +- "push {r7}\n\t" \ +- "mov r7, #" __sys1(__NR_##name) "\n\t" \ +- "swi 0\n\t" \ +- "pop {r7}" ++#if defined(__thumb__) || defined(__ARM_EABI__) ++#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name; ++#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs ++#define __syscall(name) "swi\t0" + #else ++#define __SYS_REG(name) ++#define __SYS_REG_LIST(regs...) regs + #define __syscall(name) "swi\t" __sys1(__NR_##name) "" + #endif + #endif +@@ -387,33 +397,34 @@ + + #define _syscall0(type,name) \ + type name(void) { \ ++ __SYS_REG(name) \ + register long __res_r0 __asm__("r0"); \ + long __res; \ + __asm__ __volatile__ ( \ + __syscall(name) \ + : "=r" (__res_r0) \ +- : \ +- : "lr"); \ ++ : __SYS_REG_LIST() ); \ + __res = __res_r0; \ + __syscall_return(type,__res); \ + } + + #define _syscall1(type,name,type1,arg1) \ + type name(type1 arg1) { \ ++ __SYS_REG(name) \ + register long __r0 __asm__("r0") = (long)arg1; \ + register long __res_r0 __asm__("r0"); \ + long __res; \ + __asm__ __volatile__ ( \ + __syscall(name) \ + : "=r" (__res_r0) \ +- : "r" (__r0) \ +- : "lr"); \ ++ : __SYS_REG_LIST( "0" (__r0) ) ); \ + __res = __res_r0; \ + __syscall_return(type,__res); \ + } + + #define _syscall2(type,name,type1,arg1,type2,arg2) \ + type name(type1 arg1,type2 arg2) { \ ++ __SYS_REG(name) \ + register long __r0 __asm__("r0") = (long)arg1; \ + register long __r1 __asm__("r1") = (long)arg2; \ + register long __res_r0 __asm__("r0"); \ +@@ -421,8 +432,7 @@ + __asm__ __volatile__ ( \ + __syscall(name) \ + : "=r" (__res_r0) \ +- : "r" (__r0),"r" (__r1) \ +- : "lr"); \ ++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) ); \ + __res = __res_r0; \ + __syscall_return(type,__res); \ + } +@@ -430,6 +440,7 @@ + + #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ + type name(type1 arg1,type2 arg2,type3 arg3) { \ ++ __SYS_REG(name) \ + register long __r0 __asm__("r0") = (long)arg1; \ + register long __r1 __asm__("r1") = (long)arg2; \ + register long __r2 __asm__("r2") = (long)arg3; \ +@@ -438,8 +449,7 @@ + __asm__ __volatile__ ( \ + __syscall(name) \ + : "=r" (__res_r0) \ +- : "r" (__r0),"r" (__r1),"r" (__r2) \ +- : "lr"); \ ++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) ); \ + __res = __res_r0; \ + __syscall_return(type,__res); \ + } +@@ -447,6 +457,7 @@ + + #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\ + type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ ++ __SYS_REG(name) \ + register long __r0 __asm__("r0") = (long)arg1; \ + register long __r1 __asm__("r1") = (long)arg2; \ + register long __r2 __asm__("r2") = (long)arg3; \ +@@ -456,8 +467,7 @@ + __asm__ __volatile__ ( \ + __syscall(name) \ + : "=r" (__res_r0) \ +- : "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3) \ +- : "lr"); \ ++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) ); \ + __res = __res_r0; \ + __syscall_return(type,__res); \ + } +@@ -465,6 +475,7 @@ + + #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ + type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) { \ ++ __SYS_REG(name) \ + register long __r0 __asm__("r0") = (long)arg1; \ + register long __r1 __asm__("r1") = (long)arg2; \ + register long __r2 __asm__("r2") = (long)arg3; \ +@@ -475,14 +486,15 @@ + __asm__ __volatile__ ( \ + __syscall(name) \ + : "=r" (__res_r0) \ +- : "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3),"r" (__r4) \ +- : "lr"); \ ++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ ++ "r" (__r3), "r" (__r4) ) ); \ + __res = __res_r0; \ + __syscall_return(type,__res); \ + } + + #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \ + type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6) { \ ++ __SYS_REG(name) \ + register long __r0 __asm__("r0") = (long)arg1; \ + register long __r1 __asm__("r1") = (long)arg2; \ + register long __r2 __asm__("r2") = (long)arg3; \ +@@ -494,14 +506,15 @@ + __asm__ __volatile__ ( \ + __syscall(name) \ + : "=r" (__res_r0) \ +- : "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3), "r" (__r4),"r" (__r5) \ +- : "lr"); \ ++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ ++ "r" (__r3), "r" (__r4), "r" (__r5) ) ); \ + __res = __res_r0; \ + __syscall_return(type,__res); \ + } + + #ifdef __KERNEL_SYSCALLS__ + ++#include <linux/compiler.h> + #include <linux/types.h> + #include <linux/syscalls.h> + diff --git a/toolchain/uClibc/uClibc.config b/toolchain/uClibc/uClibc.config index cee8a81a0..bed5dc4f8 100644 --- a/toolchain/uClibc/uClibc.config +++ b/toolchain/uClibc/uClibc.config @@ -41,6 +41,7 @@ DO_C99_MATH=y WARNINGS="-Wall" KERNEL_SOURCE="/usr/src/linux" HAVE_DOT_CONFIG=y +# CONFIG_ARM_EABI is not set # CONFIG_GENERIC_ARM is not set # CONFIG_ARM610 is not set # CONFIG_ARM710 is not set diff --git a/toolchain/uClibc/uClibc.config-locale b/toolchain/uClibc/uClibc.config-locale index 99d38fd77..fcba00972 100644 --- a/toolchain/uClibc/uClibc.config-locale +++ b/toolchain/uClibc/uClibc.config-locale @@ -41,6 +41,7 @@ DO_C99_MATH=y WARNINGS="-Wall" KERNEL_SOURCE="/usr/src/linux" HAVE_DOT_CONFIG=y +# CONFIG_ARM_EABI is not set # CONFIG_GENERIC_ARM is not set # CONFIG_ARM610 is not set # CONFIG_ARM710 is not set diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk index 41962aa91..08a1ce776 100644 --- a/toolchain/uClibc/uclibc.mk +++ b/toolchain/uClibc/uclibc.mk @@ -82,6 +82,9 @@ ifeq ($(UCLIBC_TARGET_ARCH),arm) $(SED) 's,^.*CONFIG_$(shell echo $(BR2_ARM_TYPE)).*,CONFIG_$(shell echo $(BR2_ARM_TYPE))=y,g' \ $(UCLIBC_DIR)/.config endif +ifeq ($(BR2_ARM_EABI),y) + $(SED) 's,# CONFIG_ARM_EABI is not set,CONFIG_ARM_EABI=y,g' $(UCLIBC_DIR)/.config +endif ifneq ($(UCLIBC_TARGET_ENDIAN),) $(SED) '/^# ARCH_$(UCLIBC_TARGET_ENDIAN)_ENDIAN /{s,# ,,;s, is not set,=y,g}' \ -e '/^# ARCH_$(UCLIBC_NOT_TARGET_ENDIAN)_ENDIAN /{s,# ,,;s, is not set,=n,g}' \ |