diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2007-02-27 11:39:10 +0000 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2007-02-27 11:39:10 +0000 |
commit | 2c7858accb3d08d0dee3f0ae57c5505638359f31 (patch) | |
tree | a07c169d938ece6d90f6414803213031a87cd0cb /patches/gcc-4.1.2 | |
parent | f00dda498b35710a4badd292cf10e7134c4f9355 (diff) | |
download | OSELAS.Toolchain-2c7858accb3d08d0dee3f0ae57c5505638359f31.tar.gz OSELAS.Toolchain-2c7858accb3d08d0dee3f0ae57c5505638359f31.tar.xz |
git-svn-id: https://svn.pengutronix.de/svn/oselas/toolchain/trunks/OSELAS.Toolchain-trunk@2028 f8d472c7-5700-0410-ac5a-87979cec3adf
Diffstat (limited to 'patches/gcc-4.1.2')
-rw-r--r-- | patches/gcc-4.1.2/generic/arm-softfloat.diff | 56 | ||||
-rw-r--r-- | patches/gcc-4.1.2/generic/gcc-4.1.0-arm-bigendian.patch | 127 | ||||
-rw-r--r-- | patches/gcc-4.1.2/generic/gcc-4.1.1-pr28516.diff | 56 | ||||
-rw-r--r-- | patches/gcc-4.1.2/generic/gcc-4.1.1_gcc_c_incpath-no-host-includes.diff | 52 | ||||
-rw-r--r-- | patches/gcc-4.1.2/generic/series | 5 |
5 files changed, 296 insertions, 0 deletions
diff --git a/patches/gcc-4.1.2/generic/arm-softfloat.diff b/patches/gcc-4.1.2/generic/arm-softfloat.diff new file mode 100644 index 0000000..6cfa208 --- /dev/null +++ b/patches/gcc-4.1.2/generic/arm-softfloat.diff @@ -0,0 +1,56 @@ +# +# Submitted-By: Marc Kleine-Budde +# Committed-By: Robert Schwebel +# +# Error: +# +# no error +# +# Description: +# +# Link assembler softfloat functions into gcc. As the functions are +# there in that case anyway, don't add switches for float lib. +# +# State: +# +# upstream will not fix this because oabi is dead +# + +Index: gcc-4.1.1/gcc/config/arm/linux-elf.h +=================================================================== +--- gcc-4.1.1.orig/gcc/config/arm/linux-elf.h ++++ gcc-4.1.1/gcc/config/arm/linux-elf.h +@@ -54,7 +54,7 @@ + + #undef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" } ++ { "marm", TARGET_ENDIAN_OPTION, "msoft-float" "mhard-float", "mno-thumb-interwork" } + + /* Now we define the strings used to build the spec file. */ + #undef LIB_SPEC +@@ -63,7 +63,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2" + +Index: gcc-4.1.1/gcc/config/arm/t-linux +=================================================================== +--- gcc-4.1.1.orig/gcc/config/arm/t-linux ++++ gcc-4.1.1/gcc/config/arm/t-linux +@@ -4,7 +4,10 @@ TARGET_LIBGCC2_CFLAGS = -fomit-frame-poi + LIBGCC2_DEBUG_CFLAGS = -g0 + + LIB1ASMSRC = arm/lib1funcs.asm +-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx ++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ ++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ ++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ ++ _fixsfsi _fixunssfsi _floatdidf _floatdisf + + # MULTILIB_OPTIONS = mhard-float/msoft-float + # MULTILIB_DIRNAMES = hard-float soft-float diff --git a/patches/gcc-4.1.2/generic/gcc-4.1.0-arm-bigendian.patch b/patches/gcc-4.1.2/generic/gcc-4.1.0-arm-bigendian.patch new file mode 100644 index 0000000..0a94174 --- /dev/null +++ b/patches/gcc-4.1.2/generic/gcc-4.1.0-arm-bigendian.patch @@ -0,0 +1,127 @@ +By Lennert Buytenhek <buytenh@wantstofly.org> +Adds support for arm*b-linux* big-endian ARM targets + +See http://gcc.gnu.org/PR16350 + +Index: gcc-4.1.1/gcc/config/arm/linux-elf.h +=================================================================== +--- gcc-4.1.1.orig/gcc/config/arm/linux-elf.h ++++ gcc-4.1.1/gcc/config/arm/linux-elf.h +@@ -28,19 +28,33 @@ + #undef TARGET_VERSION + #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr); + ++/* ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* ++ * (big endian) configurations. ++ */ ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define TARGET_ENDIAN_DEFAULT MASK_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 ++ + #undef TARGET_DEFAULT_FLOAT_ABI + #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD + + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT (0) ++#define TARGET_DEFAULT (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", "mno-thumb-interwork" } ++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" } + + /* Now we define the strings used to build the spec file. */ + #undef LIB_SPEC +@@ -61,7 +75,7 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \ + -X \ +- %{mbig-endian:-EB}" \ ++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + + #undef LINK_SPEC +Index: gcc-4.1.1/gcc/config.gcc +=================================================================== +--- gcc-4.1.1.orig/gcc/config.gcc ++++ gcc-4.1.1/gcc/config.gcc +@@ -672,6 +672,11 @@ arm*-*-netbsd*) + ;; + 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-*) ++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ++ ;; ++ esac + tmake_file="${tmake_file} t-linux arm/t-arm" + case ${target} in + arm*-*-linux-gnueabi) +Index: gcc-4.1.1/gcc/config/arm/linux-eabi.h +=================================================================== +--- gcc-4.1.1.orig/gcc/config/arm/linux-eabi.h ++++ gcc-4.1.1/gcc/config/arm/linux-eabi.h +@@ -20,6 +20,17 @@ + the Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + ++/* ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* ++ * (big endian) configurations. ++ */ ++#undef TARGET_LINKER_EMULATION ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define TARGET_LINKER_EMULATION "armelfb_linux_eabi" ++#else ++#define TARGET_LINKER_EMULATION "armelf_linux_eabi" ++#endif ++ + /* On EABI GNU/Linux, we want both the BPABI builtins and the + GNU/Linux builtins. */ + #undef TARGET_OS_CPP_BUILTINS +@@ -48,7 +59,7 @@ + #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 " -m " TARGET_LINKER_EMULATION + + /* Use ld-linux.so.3 so that it will be possible to run "classic" + GNU/Linux binaries on an EABI system. */ +Index: gcc-4.1.1/gcc/config/arm/bpabi.h +=================================================================== +--- gcc-4.1.1.orig/gcc/config/arm/bpabi.h ++++ gcc-4.1.1/gcc/config/arm/bpabi.h +@@ -33,9 +33,19 @@ + #undef FPUTYPE_DEFAULT + #define FPUTYPE_DEFAULT FPUTYPE_VFP + ++/* ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* ++ * (big endian) configurations. ++ */ ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END ++#else ++#define TARGET_ENDIAN_DEFAULT 0 ++#endif ++ + /* EABI targets should enable interworking by default. */ + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT MASK_INTERWORK ++#define TARGET_DEFAULT (MASK_INTERWORK | TARGET_ENDIAN_DEFAULT) + + /* The ARM BPABI functions return a boolean; they use no special + calling convention. */ diff --git a/patches/gcc-4.1.2/generic/gcc-4.1.1-pr28516.diff b/patches/gcc-4.1.2/generic/gcc-4.1.1-pr28516.diff new file mode 100644 index 0000000..0201d0f --- /dev/null +++ b/patches/gcc-4.1.2/generic/gcc-4.1.1-pr28516.diff @@ -0,0 +1,56 @@ +# +# Submitted-By: Robert Schwebel, 2006-12-04 +# Committed-By: Robert Schwebel +# +# Description: +# +# See PR28516 for this fix. Note that, if this patch is applied, we also need +# http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-arm.c.diff?r1=1.292&r2=1.293&cvsroot=src +# +# State: +# +# fixed +# + + gcc/config/arm/arm.c | 9 +++++++++ + gcc/testsuite/gcc.dg/nested-func-5.c | 13 +++++++++++++ + 2 files changed, 22 insertions(+) + +Index: gcc/config/arm/arm.c +=================================================================== +--- gcc/config/arm/arm.c.orig ++++ gcc/config/arm/arm.c +@@ -15371,6 +15371,15 @@ arm_unwind_emit_set (FILE * asm_out_file + /* Move from sp to reg. */ + asm_fprintf (asm_out_file, "\t.movsp %r\n", REGNO (e0)); + } ++ else if (GET_CODE (e1) == PLUS ++ && GET_CODE (XEXP (e1, 0)) == REG ++ && REGNO (XEXP (e1, 0)) == SP_REGNUM ++ && GET_CODE (XEXP (e1, 1)) == CONST_INT) ++ { ++ /* Set reg to offset from sp. */ ++ asm_fprintf (asm_out_file, "\t.movsp %r, #%d\n", ++ REGNO (e0), (int)INTVAL(XEXP (e1, 1))); ++ } + else + abort (); + break; +Index: gcc/testsuite/gcc.dg/nested-func-5.c +=================================================================== +--- /dev/null ++++ gcc/testsuite/gcc.dg/nested-func-5.c +@@ -0,0 +1,13 @@ ++/* { dg-do compile } */ ++/* { dg-options "-fexceptions" } */ ++/* PR28516: ICE generating ARM unwind directives for nested functions. */ ++ ++void ex(int (*)(void)); ++void foo(int i) ++{ ++ int bar(void) ++ { ++ return i; ++ } ++ ex(bar); ++} diff --git a/patches/gcc-4.1.2/generic/gcc-4.1.1_gcc_c_incpath-no-host-includes.diff b/patches/gcc-4.1.2/generic/gcc-4.1.1_gcc_c_incpath-no-host-includes.diff new file mode 100644 index 0000000..73cf75b --- /dev/null +++ b/patches/gcc-4.1.2/generic/gcc-4.1.1_gcc_c_incpath-no-host-includes.diff @@ -0,0 +1,52 @@ +# +# Submitted-By: Marc Kleine-Budde, 2006-11-03 +# +# Error: +# +# No error :) +# With this patch gcc bails out if you include a host include path into the searchlist (-I) +# +# Description: +# +# inspired by: +# http://www.openembedded.org/repo/org.openembedded.dev/packages/gcc/gcc-4.1.1/zecke-no-host-includes.patch +# +Index: gcc-4.1.1/gcc/c-incpath.c +=================================================================== +--- gcc-4.1.1.orig/gcc/c-incpath.c ++++ gcc-4.1.1/gcc/c-incpath.c +@@ -350,6 +350,34 @@ add_path (char *path, int chain, int cxx + p->construct = 0; + p->user_supplied_p = user_supplied_p; + ++#ifdef CROSS_COMPILE ++ /* A common error when cross compiling is including ++ host headers. This code below will try to fail fast ++ for cross compiling. Currently we consider /usr/include, ++ /opt/include and /sw/include as harmful. */ ++ { ++ unsigned int i; ++ const char *bad_path[] = { ++ "/usr/include", ++ "/usr/local/include", ++ "/sw/include", ++ "/opt/include", ++ }; ++ ++ for (i = 0; i < sizeof(bad_path)/sizeof(bad_path[0]); i++) { ++ if( strstr(p->name, bad_path[i]) == p->name ) { ++ fprintf(stderr,_("\n" ++ "CROSS COMPILE Badness: %s in INCLUDEPATH: %s\n" ++ "\n"), ++ ++ bad_path[i], p->name); ++ ++ exit (FATAL_EXIT_CODE); ++ } ++ } ++ } ++#endif ++ + add_cpp_dir_path (p, chain); + } + diff --git a/patches/gcc-4.1.2/generic/series b/patches/gcc-4.1.2/generic/series new file mode 100644 index 0000000..e76f4c0 --- /dev/null +++ b/patches/gcc-4.1.2/generic/series @@ -0,0 +1,5 @@ +gcc-4.1.1_gcc_c_incpath-no-host-includes.diff + +gcc-4.1.0-arm-bigendian.patch +arm-softfloat.diff +gcc-4.1.1-pr28516.diff -p0 |