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 Index: uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h
2 ===================================================================
3 --- uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h (revision 18898)
4 +++ uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h (working copy)
6 /* define if target supports IEEE signed zero floats */
7 #define __UCLIBC_HAVE_SIGNED_ZERO__
10 #define internal_function __attribute__ ((regparm (3), stdcall))
13 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
14 Index: uClibc/include/libc-symbols.h
15 ===================================================================
16 --- uClibc/include/libc-symbols.h (revision 18898)
17 +++ uClibc/include/libc-symbols.h (working copy)
19 #ifndef _LIBC_SYMBOLS_H
20 #define _LIBC_SYMBOLS_H 1
22 +/* This is defined for the compilation of all C library code. features.h
23 + tests this to avoid inclusion of stubs.h while compiling the library,
24 + before stubs.h has been generated. Some library code that is shared
25 + with other packages also tests this symbol to see if it is being
26 + compiled as part of the C library. We must define this before including
27 + config.h, because it makes some definitions conditional on whether libc
28 + itself is being compiled, or just some generator program. */
32 /* This file's macros are included implicitly in the compilation of every
33 file in the C library by -imacros.
37 #include <bits/uClibc_arch_features.h>
40 -/* This is defined for the compilation of all C library code. features.h
41 - tests this to avoid inclusion of stubs.h while compiling the library,
42 - before stubs.h has been generated. Some library code that is shared
43 - with other packages also tests this symbol to see if it is being
44 - compiled as part of the C library. We must define this before including
45 - config.h, because it makes some definitions conditional on whether libc
46 - itself is being compiled, or just some generator program. */
49 /* Enable declarations of GNU extensions, since we are compiling them. */