summaryrefslogtreecommitdiff
path: root/toolchain/gcc
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-02-14 14:31:31 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-02-14 14:31:31 +0000
commit82572cf7677a78e48f719cf969fac725ca639bd2 (patch)
treecf4b86ddd7f32c1f891c0ef62b294649a74c5f24 /toolchain/gcc
parentebf4eb11e9a15e1d76a373c453dfd8f2752a4bd6 (diff)
downloadmtk-20170518-82572cf7677a78e48f719cf969fac725ca639bd2.zip
mtk-20170518-82572cf7677a78e48f719cf969fac725ca639bd2.tar.gz
mtk-20170518-82572cf7677a78e48f719cf969fac725ca639bd2.tar.bz2
revert ARM to oabi by default, add some eabi patches for fixing up the toolchain, which unfortunately break eabi userland, but are IMHO a necessary basis for further eabi fixes
SVN-Revision: 10458
Diffstat (limited to 'toolchain/gcc')
-rw-r--r--toolchain/gcc/Config.in9
-rw-r--r--toolchain/gcc/patches/4.1.2/930-eabi_fixes.patch36
-rw-r--r--toolchain/gcc/patches/4.2.0/930-eabi_fixes.patch36
-rw-r--r--toolchain/gcc/patches/4.2.1/930-eabi_fixes.patch36
-rw-r--r--toolchain/gcc/patches/4.2.2/930-eabi_fixes.patch36
-rw-r--r--toolchain/gcc/patches/4.2.3/930-eabi_fixes.patch36
6 files changed, 189 insertions, 0 deletions
diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index 0155713..13b5238 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -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
index 0000000..03814b9
--- /dev/null
+++ b/toolchain/gcc/patches/4.1.2/930-eabi_fixes.patch
@@ -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
index 0000000..52b5689
--- /dev/null
+++ b/toolchain/gcc/patches/4.2.0/930-eabi_fixes.patch
@@ -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
index 0000000..52b5689
--- /dev/null
+++ b/toolchain/gcc/patches/4.2.1/930-eabi_fixes.patch
@@ -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
index 0000000..52b5689
--- /dev/null
+++ b/toolchain/gcc/patches/4.2.2/930-eabi_fixes.patch
@@ -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
index 0000000..52b5689
--- /dev/null
+++ b/toolchain/gcc/patches/4.2.3/930-eabi_fixes.patch
@@ -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. */