patches/gcc/4.2.4/241-arm-bigendian2.patch
author Johannes Stezenbach <js@sig21.net>
Thu Jul 29 19:30:37 2010 +0200 (2010-07-29)
branch1.7
changeset 2047 ace1d90c9b15
permissions -rw-r--r--
scripts: remove . from $PATH

Add CT_SanitizePath function which removes entries referring to ., /tmp
and non-existing directories from $PATH, and call it early in the
build script.

If . is in PATH, gcc-4.4.4 build breaks:

[ALL ] checking what assembler to use...
/tmp/build/targets/arm-unknown-linux-uclibcgnueabi/build/gcc-core-static/arm-unknown-linux-uclibcgnueabi/bin/as
...
[ALL ] config.status: creating as

i.e. "as" is supposed to be the arm-unknown-linux-uclibcgnueabi cross assembler,
but config.status creates a local "as" script which is calling the
host assembler.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
[Yann E. MORIN: style fixes + explanations]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 20dd8cef1c8adff0aa3e78ae6d7acfbc45ed5a83)
     1 Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote:
     2 
     3 I tried to use crosstool-ng to generate a toolchain for Linux on big
     4 endian arm with recent versions of gcc, glibc, etc... but had a few
     5 problems.
     6 
     7 It appears that the gcc patch (for gcc 4.2.x)
     8 for big-endian arm (240-arm-bigendian.patch) lacks the change attached
     9 to this mail as 240-arm-bigendian2.patch.
    10 
    11 --- gcc-4.2.4/gcc/config/arm/bpabi.h~	2007-09-01 17:28:30.000000000 +0200
    12 +++ gcc-4.2.4/gcc/config/arm/bpabi.h	2009-01-05 19:19:10.000000000 +0100
    13 @@ -32,9 +32,19 @@
    14  #undef FPUTYPE_DEFAULT
    15  #define FPUTYPE_DEFAULT FPUTYPE_VFP
    16  
    17 +/*
    18 + * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
    19 + * (big endian) configurations.
    20 + */
    21 +#if TARGET_BIG_ENDIAN_DEFAULT
    22 +#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
    23 +#else
    24 +#define TARGET_ENDIAN_DEFAULT 0
    25 +#endif
    26 +
    27  /* EABI targets should enable interworking by default.  */
    28  #undef TARGET_DEFAULT
    29 -#define TARGET_DEFAULT MASK_INTERWORK
    30 +#define TARGET_DEFAULT (MASK_INTERWORK | TARGET_ENDIAN_DEFAULT)
    31  
    32  /* The ARM BPABI functions return a boolean; they use no special
    33     calling convention.  */