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 Debian patch courtesy of the Debian ltrace maintainer Juan Cespedes <cespedes@debian.org>
3 --- ltrace-0.5.3.orig/sysdeps/linux-gnu/breakpoint.c
4 +++ ltrace-0.5.3/sysdeps/linux-gnu/breakpoint.c
9 -static unsigned char break_insn[] = BREAKPOINT_VALUE;
11 #ifdef ARCH_HAVE_ENABLE_BREAKPOINT
12 extern void arch_enable_breakpoint(pid_t, Breakpoint *);
15 arch_enable_breakpoint(pid, sbp);
19 +static unsigned char break_insn[] = BREAKPOINT_VALUE;
22 enable_breakpoint(pid_t pid, Breakpoint *sbp) {
24 --- ltrace-0.5.3.orig/sysdeps/linux-gnu/arm/breakpoint.c
25 +++ ltrace-0.5.3/sysdeps/linux-gnu/arm/breakpoint.c
28 #include <sys/ptrace.h>
37 arch_enable_breakpoint(pid_t pid, Breakpoint *sbp) {
40 arch_disable_breakpoint(pid_t pid, const Breakpoint *sbp) {
42 - const unsigned char break_insn[] = BREAKPOINT_VALUE;
43 - const unsigned char thumb_break_insn[] = THUMB_BREAKPOINT_VALUE;
45 debug(1, "arch_disable_breakpoint(%d,%p)", pid, sbp->addr);
47 --- ltrace-0.5.3.orig/sysdeps/linux-gnu/ia64/plt.c
48 +++ ltrace-0.5.3/sysdeps/linux-gnu/ia64/plt.c
51 +#include <sys/ptrace.h>
54 /* A bundle is 128 bits */
55 --- ltrace-0.5.3.orig/sysdeps/linux-gnu/ia64/breakpoint.c
56 +++ ltrace-0.5.3/sysdeps/linux-gnu/ia64/breakpoint.c
59 #include <sys/ptrace.h>
68 extract_bit_field(char *bundle, int from, int len) {
69 --- ltrace-0.5.3.orig/sysdeps/linux-gnu/ia64/regs.c
70 +++ ltrace-0.5.3/sysdeps/linux-gnu/ia64/regs.c