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 Fix memset on PowerPC 8xx, by Nye Liu:
2 http://sourceware.org/ml/crossgcc/2008-10/msg00067.html
5 I am working on a powerpc 860 toolchain, but I am having problems
6 convincing glibc to not emit code that uses the dcbz instruction (CPU15
7 dcbX bug). The source of the problem is sysdeps/powerpc/power3/memset.S
9 --- glibc-2.7/sysdeps/powerpc/powerpc32/memset.S 2007-03-26 13:09:07.000000000 -0700
10 +++ glibc-2.7/sysdeps/powerpc/powerpc32/memset.S.new 2008-10-23 20:28:52.000000000 -0700
12 clrrwi. rALIGN, rLEN, 5
13 mtcrf 0x01, rLEN /* 40th instruction from .align */
15 +#ifndef BROKEN_PPC_8xx_CPU15
16 /* Check if we can use the special case for clearing memory using dcbz.
17 This requires that we know the correct cache line size for this
18 processor. Getting the __cache_line_size may require establishing GOT
19 addressability, so branch out of line to set this up. */
20 beq cr1, L(checklinesize)
23 /* Store blocks of 32-bytes (256-bits) starting on a 32-byte boundary.
24 Can't assume that rCHR is zero or that the cache line size is either
26 add rMEMP, rMEMP, rALIGN
27 b L(medium_tail2) /* 72nd instruction from .align */
29 +#ifndef BROKEN_PPC_8xx_CPU15
32 /* Clear cache lines of memory in 128-byte chunks.
37 +#endif /* ! BROKEN_PPC_8xx_CPU15 */
45 +#ifndef BROKEN_PPC_8xx_CPU15
51 clrrwi. rALIGN, rLEN, 5
53 +#endif /* ! BROKEN_PPC_8xx_CPU15 */
56 libc_hidden_builtin_def (memset)