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 By Lennert Buytenhek <buytenh@wantstofly.org>
2 Adds support for arm*b-linux* big-endian ARM targets
4 See http://gcc.gnu.org/PR16350
6 --- gcc-4.2.0/gcc/config/arm/linux-elf.h
7 +++ gcc-4.2.0/gcc/config/arm/linux-elf.h
10 #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
13 + * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
14 + * (big endian) configurations.
16 +#if TARGET_BIG_ENDIAN_DEFAULT
17 +#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
18 +#define TARGET_ENDIAN_OPTION "mbig-endian"
19 +#define TARGET_LINKER_EMULATION "armelfb_linux"
21 +#define TARGET_ENDIAN_DEFAULT 0
22 +#define TARGET_ENDIAN_OPTION "mlittle-endian"
23 +#define TARGET_LINKER_EMULATION "armelf_linux"
26 #undef TARGET_DEFAULT_FLOAT_ABI
27 #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
30 -#define TARGET_DEFAULT (0)
31 +#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
33 #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
35 -#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
36 +#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
38 #undef MULTILIB_DEFAULTS
39 #define MULTILIB_DEFAULTS \
40 - { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
41 + { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
43 /* Now we define the strings used to build the spec file. */
46 %{rdynamic:-export-dynamic} \
47 %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \
49 - %{mbig-endian:-EB}" \
50 + %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
51 SUBTARGET_EXTRA_LINK_SPEC
54 --- gcc-4.2.0/gcc/config.gcc.orig 2006-09-22 14:53:41.000000000 +0200
55 +++ gcc-4.2.0/gcc/config.gcc 2006-09-25 10:45:21.000000000 +0200
57 tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
58 tmake_file="${tmake_file} t-linux arm/t-arm"
61 + tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
66 tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
67 tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"