revert ARM to oabi by default, add some eabi patches for fixing up the toolchain...
authorFelix Fietkau <nbd@openwrt.org>
Thu, 14 Feb 2008 14:31:31 +0000 (14:31 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 14 Feb 2008 14:31:31 +0000 (14:31 +0000)
SVN-Revision: 10458

include/package.mk
rules.mk
target/linux/ixp4xx/config-default
toolchain/Config.in
toolchain/gcc/Config.in
toolchain/gcc/patches/4.1.2/930-eabi_fixes.patch [new file with mode: 0644]
toolchain/gcc/patches/4.2.0/930-eabi_fixes.patch [new file with mode: 0644]
toolchain/gcc/patches/4.2.1/930-eabi_fixes.patch [new file with mode: 0644]
toolchain/gcc/patches/4.2.2/930-eabi_fixes.patch [new file with mode: 0644]
toolchain/gcc/patches/4.2.3/930-eabi_fixes.patch [new file with mode: 0644]

index 7f9437c334c412097a1cf6ea112342809c00ba8d..74ad47874771d6152bc488741ffc21cf3792e6b9 100644 (file)
@@ -30,7 +30,7 @@ include $(INCLUDE_DIR)/package-bin.mk
 include $(INCLUDE_DIR)/autotools.mk
 
 override MAKEFLAGS=
-export CONFIG_SITE:=$(INCLUDE_DIR)/site/$(REAL_GNU_TARGET_NAME)
+export CONFIG_SITE:=$(INCLUDE_DIR)/site/$(patsubst %gnueabi,%,$(REAL_GNU_TARGET_NAME))
 CUR_MAKEFILE:=$(filter-out Makefile,$(firstword $(MAKEFILE_LIST)))
 SUBMAKE:=$(NO_TRACE_MAKE) $(if $(CUR_MAKEFILE),-f $(CUR_MAKEFILE))
 
index da16ed4466ccec6006dcd3bd240f74fe2eb1d10a..7cc9add1b8108a2f46c349bcabfb5673399a0d42 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -51,9 +51,9 @@ IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/ipkg
 
 ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
   -include $(TOOLCHAIN_DIR)/info.mk
-  REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc
+  REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc$(if $(CONFIG_EABI_SUPPORT),gnueabi)
   GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux
-  TARGET_CROSS:=$(if $(TARGET_CROSS),$(TARGET_CROSS),$(OPTIMIZE_FOR_CPU)-linux-uclibc-)
+  TARGET_CROSS:=$(if $(TARGET_CROSS),$(TARGET_CROSS),$(OPTIMIZE_FOR_CPU)-linux-uclibc$(if $(CONFIG_EABI_SUPPORT),gnueabi)-)
 endif
 
 TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(STAGING_DIR_HOST)/bin:$(STAGING_DIR)/host/bin:$(PATH)
index f9cfe532331497c1bd461c86e1af9a50016b5e23..5116bd82b648af1e5f74d1e68fb6d60cbc0605c0 100644 (file)
@@ -298,7 +298,7 @@ CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
 # CONFIG_NO_IDLE_HZ is not set
 # CONFIG_NTFS_FS is not set
 # CONFIG_NVRAM is not set
-# CONFIG_OABI_COMPAT is not set
+CONFIG_OABI_COMPAT=y
 # CONFIG_PATA_ALI is not set
 # CONFIG_PATA_AMD is not set
 CONFIG_PATA_ARTOP=m
index 7fa32566d65b9e3df6bbd5f1d7c00a71efecba89..192818f9428f9bff943254530fade70188a10f19 100644 (file)
@@ -55,7 +55,7 @@ config TARGET_OPTIMIZATION
        default "-O2 -pipe -march=i486 -funit-at-a-time" if TARGET_x86
        default "-Os -pipe -march=i486 -funit-at-a-time" if TARGET_rdc
        default "-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time" if mipsel || mips
-       default "-Os -pipe -mabi=aapcs-linux -march=armv5te -mtune=xscale -funit-at-a-time" if armeb || arm
+       default "-Os -pipe -march=armv5te -mtune=xscale -funit-at-a-time" if armeb || arm
        default "-Os -pipe -funit-at-a-time"
        help
          Optimizations to use when building for the target host.
index 01557138d549bcd2d1fca2d51b8ae79306cf482e..13b5238bf7df4bf45bf4902872c9572ee714edc9 100644 (file)
@@ -34,6 +34,15 @@ choice
 
 endchoice
 
+config EABI_SUPPORT
+       bool
+       depends arm||armeb
+       depends BROKEN
+       prompt "Enable EABI support" if TOOLCHAINOPTS
+       default n
+       help
+         Enable ARM EABI support
+
 config EXTRA_GCC_CONFIG_OPTIONS
        string
        prompt "Additional gcc options" if TOOLCHAINOPTS
diff --git a/toolchain/gcc/patches/4.1.2/930-eabi_fixes.patch b/toolchain/gcc/patches/4.1.2/930-eabi_fixes.patch
new file mode 100644 (file)
index 0000000..03814b9
--- /dev/null
@@ -0,0 +1,36 @@
+Index: gcc-4.1.2/gcc/config.gcc
+===================================================================
+--- gcc-4.1.2.orig/gcc/config.gcc      2008-02-12 23:29:31.037442374 +0100
++++ gcc-4.1.2/gcc/config.gcc   2008-02-12 23:30:11.051722656 +0100
+@@ -670,7 +670,7 @@
+       extra_parts=""
+       use_collect2=yes
+       ;;
+-arm*-*-linux*)                        # ARM GNU/Linux with ELF
++arm*-linux*)                  # ARM GNU/Linux with ELF
+       tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" 
+       case $target in
+       arm*b-*)
+@@ -679,7 +679,7 @@
+       esac
+       tmake_file="${tmake_file} t-linux arm/t-arm"
+       case ${target} in
+-      arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
++      arm*-*eabi)
+           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 
+Index: gcc-4.1.2/gcc/config/arm/linux-eabi.h
+===================================================================
+--- gcc-4.1.2.orig/gcc/config/arm/linux-eabi.h 2008-02-12 23:51:04.655161444 +0100
++++ gcc-4.1.2/gcc/config/arm/linux-eabi.h      2008-02-12 23:51:10.619501332 +0100
+@@ -48,7 +48,8 @@
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
++#define SUBTARGET_EXTRA_LINK_SPEC \
++      " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} "
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+    GNU/Linux binaries on an EABI system.  */
diff --git a/toolchain/gcc/patches/4.2.0/930-eabi_fixes.patch b/toolchain/gcc/patches/4.2.0/930-eabi_fixes.patch
new file mode 100644 (file)
index 0000000..52b5689
--- /dev/null
@@ -0,0 +1,36 @@
+Index: gcc-4.2.0/gcc/config.gcc
+===================================================================
+--- gcc-4.2.0.orig/gcc/config.gcc      2008-02-13 00:19:06.507477329 +0100
++++ gcc-4.2.0/gcc/config.gcc   2008-02-13 00:19:42.239640606 +0100
+@@ -701,7 +701,7 @@
+       extra_parts=""
+       use_collect2=yes
+       ;;
+-arm*-*-linux*)                        # ARM GNU/Linux with ELF
++arm*-linux*)                  # ARM GNU/Linux with ELF
+       tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+       tmake_file="${tmake_file} t-linux arm/t-arm"
+       case ${target} in
+@@ -710,7 +710,7 @@
+               ;;
+       esac
+       case ${target} in
+-      arm*-*-linux-*eabi)
++      arm*-linux-*eabi)
+           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
+Index: gcc-4.2.0/gcc/config/arm/linux-eabi.h
+===================================================================
+--- gcc-4.2.0.orig/gcc/config/arm/linux-eabi.h 2008-02-13 00:18:31.343062422 +0100
++++ gcc-4.2.0/gcc/config/arm/linux-eabi.h      2008-02-13 00:19:11.825120518 +0100
+@@ -48,7 +48,8 @@
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
++#define SUBTARGET_EXTRA_LINK_SPEC \
++      " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} "
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+    GNU/Linux binaries on an EABI system.  */
diff --git a/toolchain/gcc/patches/4.2.1/930-eabi_fixes.patch b/toolchain/gcc/patches/4.2.1/930-eabi_fixes.patch
new file mode 100644 (file)
index 0000000..52b5689
--- /dev/null
@@ -0,0 +1,36 @@
+Index: gcc-4.2.0/gcc/config.gcc
+===================================================================
+--- gcc-4.2.0.orig/gcc/config.gcc      2008-02-13 00:19:06.507477329 +0100
++++ gcc-4.2.0/gcc/config.gcc   2008-02-13 00:19:42.239640606 +0100
+@@ -701,7 +701,7 @@
+       extra_parts=""
+       use_collect2=yes
+       ;;
+-arm*-*-linux*)                        # ARM GNU/Linux with ELF
++arm*-linux*)                  # ARM GNU/Linux with ELF
+       tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+       tmake_file="${tmake_file} t-linux arm/t-arm"
+       case ${target} in
+@@ -710,7 +710,7 @@
+               ;;
+       esac
+       case ${target} in
+-      arm*-*-linux-*eabi)
++      arm*-linux-*eabi)
+           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
+Index: gcc-4.2.0/gcc/config/arm/linux-eabi.h
+===================================================================
+--- gcc-4.2.0.orig/gcc/config/arm/linux-eabi.h 2008-02-13 00:18:31.343062422 +0100
++++ gcc-4.2.0/gcc/config/arm/linux-eabi.h      2008-02-13 00:19:11.825120518 +0100
+@@ -48,7 +48,8 @@
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
++#define SUBTARGET_EXTRA_LINK_SPEC \
++      " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} "
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+    GNU/Linux binaries on an EABI system.  */
diff --git a/toolchain/gcc/patches/4.2.2/930-eabi_fixes.patch b/toolchain/gcc/patches/4.2.2/930-eabi_fixes.patch
new file mode 100644 (file)
index 0000000..52b5689
--- /dev/null
@@ -0,0 +1,36 @@
+Index: gcc-4.2.0/gcc/config.gcc
+===================================================================
+--- gcc-4.2.0.orig/gcc/config.gcc      2008-02-13 00:19:06.507477329 +0100
++++ gcc-4.2.0/gcc/config.gcc   2008-02-13 00:19:42.239640606 +0100
+@@ -701,7 +701,7 @@
+       extra_parts=""
+       use_collect2=yes
+       ;;
+-arm*-*-linux*)                        # ARM GNU/Linux with ELF
++arm*-linux*)                  # ARM GNU/Linux with ELF
+       tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+       tmake_file="${tmake_file} t-linux arm/t-arm"
+       case ${target} in
+@@ -710,7 +710,7 @@
+               ;;
+       esac
+       case ${target} in
+-      arm*-*-linux-*eabi)
++      arm*-linux-*eabi)
+           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
+Index: gcc-4.2.0/gcc/config/arm/linux-eabi.h
+===================================================================
+--- gcc-4.2.0.orig/gcc/config/arm/linux-eabi.h 2008-02-13 00:18:31.343062422 +0100
++++ gcc-4.2.0/gcc/config/arm/linux-eabi.h      2008-02-13 00:19:11.825120518 +0100
+@@ -48,7 +48,8 @@
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
++#define SUBTARGET_EXTRA_LINK_SPEC \
++      " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} "
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+    GNU/Linux binaries on an EABI system.  */
diff --git a/toolchain/gcc/patches/4.2.3/930-eabi_fixes.patch b/toolchain/gcc/patches/4.2.3/930-eabi_fixes.patch
new file mode 100644 (file)
index 0000000..52b5689
--- /dev/null
@@ -0,0 +1,36 @@
+Index: gcc-4.2.0/gcc/config.gcc
+===================================================================
+--- gcc-4.2.0.orig/gcc/config.gcc      2008-02-13 00:19:06.507477329 +0100
++++ gcc-4.2.0/gcc/config.gcc   2008-02-13 00:19:42.239640606 +0100
+@@ -701,7 +701,7 @@
+       extra_parts=""
+       use_collect2=yes
+       ;;
+-arm*-*-linux*)                        # ARM GNU/Linux with ELF
++arm*-linux*)                  # ARM GNU/Linux with ELF
+       tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+       tmake_file="${tmake_file} t-linux arm/t-arm"
+       case ${target} in
+@@ -710,7 +710,7 @@
+               ;;
+       esac
+       case ${target} in
+-      arm*-*-linux-*eabi)
++      arm*-linux-*eabi)
+           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
+Index: gcc-4.2.0/gcc/config/arm/linux-eabi.h
+===================================================================
+--- gcc-4.2.0.orig/gcc/config/arm/linux-eabi.h 2008-02-13 00:18:31.343062422 +0100
++++ gcc-4.2.0/gcc/config/arm/linux-eabi.h      2008-02-13 00:19:11.825120518 +0100
+@@ -48,7 +48,8 @@
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
++#define SUBTARGET_EXTRA_LINK_SPEC \
++      " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} "
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+    GNU/Linux binaries on an EABI system.  */