Bart De VOS pointed out that removing absolute paths from the libc linker scripts is plainly wrong.
It dates from dawn ages of the original crosstool code, and is not well explained. At that time, binutils might not understand the sysroot stuff, and it was necessary to remove absolute paths in that case.
/trunk/scripts/build/libc/glibc.sh | 14 2 12 0 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
1 diff -durN binutils-2.18.50.0.7.orig/gas/config/tc-i386.c binutils-2.18.50.0.7/gas/config/tc-i386.c
2 --- binutils-2.18.50.0.7.orig/gas/config/tc-i386.c 2008-05-04 16:28:10.000000000 +0200
3 +++ binutils-2.18.50.0.7/gas/config/tc-i386.c 2008-09-22 09:11:19.000000000 +0200
8 -#if (defined (TE_I386AIX) \
9 - || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
10 - && !defined (TE_GNU) \
11 - && !defined (TE_LINUX) \
12 - && !defined (TE_NETWARE) \
13 - && !defined (TE_FreeBSD) \
14 - && !defined (TE_NetBSD)))
15 /* This array holds the chars that always start a comment. If the
16 - pre-processor is disabled, these aren't very useful. The option
17 - --divide will remove '/' from this list. */
18 -const char *i386_comment_chars = "#/";
19 -#define SVR4_COMMENT_CHARS 1
20 -#define PREFIX_SEPARATOR '\\'
23 + pre-processor is disabled, these aren't very useful. */
24 const char *i386_comment_chars = "#";
25 #define PREFIX_SEPARATOR '/'
28 /* This array holds the chars that only start a comment at the beginning of
29 a line. If the line seems to have the form '# 123 filename'
30 @@ -7920,20 +7906,6 @@
34 -#ifdef SVR4_COMMENT_CHARS
39 - n = (char *) xmalloc (strlen (i386_comment_chars) + 1);
41 - for (s = i386_comment_chars; *s != '\0'; s++)
45 - i386_comment_chars = n;
51 @@ -8084,13 +8056,8 @@
53 --32/--64 generate 32bit/64bit code\n"));
55 -#ifdef SVR4_COMMENT_CHARS
56 - fprintf (stream, _("\
57 - --divide do not treat `/' as a comment character\n"));
60 --divide ignored\n"));
63 -march=CPU[,+EXTENSION...]\n\
64 generate code for CPU and EXTENSION, CPU is one of:\n\