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)
2 elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
4 when building glibc-2.3.3 on cygwin
7 http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
8 Basically, make glibc use .oST as suffix for 'object static'
9 instead of .oS, since cygwin has trouble distinguishing .os from .oS
10 (Original patch had .on, but .oST is more mnemonic for 'object static')
12 glibc-linuxthreads-2.3.3 also requires a patch, see
13 ../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
15 [ rediffed against glibc-2.3.5 ]
17 diff -aur glibc-2.3.5/linuxthreads/Makefile glibc-2.3.5-cygwin/linuxthreads/Makefile
18 --- glibc-2.3.5/linuxthreads/Makefile 2005-02-16 12:26:38.000000000 +0100
19 +++ glibc-2.3.5-cygwin/linuxthreads/Makefile 2005-05-11 08:32:50.453125000 +0200
21 install: $(inst_libdir)/libpthread.so
22 $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
23 $(objpfx)libpthread.so$(libpthread.so-version) \
24 - $(inst_libdir)/$(patsubst %,$(libtype.oS),\
25 + $(inst_libdir)/$(patsubst %,$(libtype.oST),\
26 $(libprefix)pthread) \
28 (echo '/* GNU ld script';\
30 echo ' the static library, so try that secondarily. */';\
32 echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
33 - '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
34 + '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\