diff options
author | Eric Andersen <andersen@codepoet.org> | 2005-03-08 06:48:38 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2005-03-08 06:48:38 +0000 |
commit | a319b8a5988719ffa59d6fd5f850b715dd3207a9 (patch) | |
tree | c70b3ef83d766a2e1588352ce242c05b5b833f1d /toolchain/gcc/3.3.4 | |
parent | d9cdbbe9598cc6ab2326f0765c6033b4bf5fde46 (diff) | |
download | buildroot-novena-a319b8a5988719ffa59d6fd5f850b715dd3207a9.tar.gz buildroot-novena-a319b8a5988719ffa59d6fd5f850b715dd3207a9.zip |
Fixup gcc 3.3.3 and 3.3.4 builds with patches backported
from stuff I added to gcc-3.3.5
Diffstat (limited to 'toolchain/gcc/3.3.4')
-rw-r--r-- | toolchain/gcc/3.3.4/800-arm-bigendian.patch | 68 | ||||
-rw-r--r-- | toolchain/gcc/3.3.4/810-arm-bigendian-uclibc.patch | 25 | ||||
-rw-r--r-- | toolchain/gcc/3.3.4/820-no-mips-empic-relocs.patch | 59 |
3 files changed, 152 insertions, 0 deletions
diff --git a/toolchain/gcc/3.3.4/800-arm-bigendian.patch b/toolchain/gcc/3.3.4/800-arm-bigendian.patch new file mode 100644 index 000000000..79140ddf0 --- /dev/null +++ b/toolchain/gcc/3.3.4/800-arm-bigendian.patch @@ -0,0 +1,68 @@ +By Lennert Buytenhek <buytenh@wantstofly.org> +Adds support for arm*b-linux* big-endian ARM targets + +See http://gcc.gnu.org/PR16350 + +--- gcc-3.3.5-dist/gcc/config/arm/linux-elf.h ++++ gcc-3.3.5/gcc/config/arm/linux-elf.h +@@ -30,17 +30,34 @@ + /* Do not assume anything about header files. */ + #define NO_IMPLICIT_EXTERN_C + ++/* ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* ++ * (big endian) configurations. ++ */ ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END ++#define TARGET_ENDIAN_OPTION "mbig-endian" ++#define TARGET_LINKER_EMULATION "armelfb_linux" ++#else ++#define TARGET_ENDIAN_DEFAULT 0 ++#define TARGET_ENDIAN_OPTION "mlittle-endian" ++#define TARGET_LINKER_EMULATION "armelf_linux" ++#endif ++ + /* Default is to use APCS-32 mode. */ + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS) ++#define TARGET_DEFAULT \ ++ ( ARM_FLAG_APCS_32 | \ ++ ARM_FLAG_MMU_TRAPS | \ ++ TARGET_ENDIAN_DEFAULT ) + + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6 + +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p" ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p" + + #undef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" } ++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" } + + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__" + +@@ -100,7 +117,7 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \ + -X \ +- %{mbig-endian:-EB}" \ ++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + #endif + +--- gcc-3.3.5-dist/gcc/config.gcc ++++ gcc-3.3.5/gcc/config.gcc +@@ -710,6 +710,11 @@ + ;; + arm*-*-linux*) # ARM GNU/Linux with ELF + tm_file="dbxelf.h elfos.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h" ++ case $target in ++ arm*b-*) ++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines" ++ ;; ++ esac + tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + gnu_ld=yes diff --git a/toolchain/gcc/3.3.4/810-arm-bigendian-uclibc.patch b/toolchain/gcc/3.3.4/810-arm-bigendian-uclibc.patch new file mode 100644 index 000000000..7e14f341f --- /dev/null +++ b/toolchain/gcc/3.3.4/810-arm-bigendian-uclibc.patch @@ -0,0 +1,25 @@ +--- gcc-3.3.5-dist/gcc/config/arm/linux-elf.h ++++ gcc-3.3.5/gcc/config/arm/linux-elf.h +@@ -106,7 +106,7 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \ + -X \ +- %{mbig-endian:-EB}" \ ++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + #else + #define LINK_SPEC "%{h*} %{version:-v} \ +--- gcc-3.3.5-dist/gcc/config.gcc ++++ gcc-3.3.5/gcc/config.gcc +@@ -699,6 +699,11 @@ + ;; + arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc + tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h" ++ case $target in ++ arm*b-*) ++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines" ++ ;; ++ esac + tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + gnu_ld=yes diff --git a/toolchain/gcc/3.3.4/820-no-mips-empic-relocs.patch b/toolchain/gcc/3.3.4/820-no-mips-empic-relocs.patch new file mode 100644 index 000000000..d5c4c9cb5 --- /dev/null +++ b/toolchain/gcc/3.3.4/820-no-mips-empic-relocs.patch @@ -0,0 +1,59 @@ +From: cgd at broadcom dot com +To: gcc-patches at gcc dot gnu dot org +Cc: mark at codesourcery dot com +Date: 13 Jun 2004 22:51:30 -0700 +Subject: [trunk + 3.4-branch RFA] don't use empic relocs for mips-linuxeh + +This patch changes mips-linux to avoid using embedded-pic relocs for +its eh data. (Support for generating these for new code is removed in +current binutils srcs.) + +Relating to this, previously, mips-linux and mips64-linux would use +different representations for their EH data (even for mips64-linux o32 +abi), due to the mips64-linux n32/64 BFDs not supporting the +embedded-pic relocs. This was a bug. + +For more explanation, see the thread of the URL quoted in the comment +in linux.h. + + +Tested the same w/ sources of about a week ago for c/c++ for +mips-linux (native) before/after. Also verified .o compatibility +before/after just to be sure. + +I'd like this approved for the branch as well, so 3.4.1 will work +nicely w/ the next major binutils release. + + +thanks, + +chris + +2004-06-13 Chris Demetriou <cgd@broadcom.com> + + * config/mips/linux.h (ASM_PREFERRED_EH_DATA_FORMAT): Redefine + to return DW_EH_PE_absptr. + +Index: config/mips/linux.h +=================================================================== +RCS file: /cvs/gcc/gcc/gcc/config/mips/linux.h,v +retrieving revision 1.77 +diff -u -p -r1.77 linux.h +--- gcc/gcc/config/mips/linux.h 19 Feb 2004 22:07:51 -0000 1.77 ++++ gcc/gcc/config/mips/linux.h 14 Jun 2004 05:49:51 -0000 +@@ -170,10 +170,11 @@ Boston, MA 02111-1307, USA. */ + #undef FUNCTION_NAME_ALREADY_DECLARED + #define FUNCTION_NAME_ALREADY_DECLARED 1 + +-#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \ +- (flag_pic \ +- ? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4\ +- : DW_EH_PE_absptr) ++/* If possible, we should attempt to use GP-relative relocs for this ++ (see <a href="http://sources.redhat.com/ml/binutils/2004-05/msg00227.html">http://sources.redhat.com/ml/binutils/2004-05/msg00227.html</a>). ++ However, until that is implement, this just uses standard, absolute ++ references. */ ++#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) DW_EH_PE_absptr + + /* The glibc _mcount stub will save $v0 for us. Don't mess with saving + it, since ASM_OUTPUT_REG_PUSH/ASM_OUTPUT_REG_POP do not work in the |