patches/binutils/2.14/270-i386-no-divide-comment.patch
author Zoltan Devai <zdevai@gmail.com>
Wed Oct 28 12:03:38 2009 +0100 (2009-10-28)
branch1.5
changeset 1645 01d01185eb18
permissions -rw-r--r--
libc/uClibc: fix building on system with recent glibc

While trying to build a toolchain with ct-ng 1.5.0,
arm-unknown-linux-uclibcgnueabi target,
I get the following error:

[INFO ] Installing C library headers
[EXTRA] Copying sources to build dir
[EXTRA] Applying configuration
[EXTRA] Building headers
[EXTRA] Installing headers
[ERROR] extra/scripts/unifdef.c:209: error: conflicting types for 'getline'
[ERROR] make[2]: *** [extra/scripts/unifdef] Error 1
[ERROR] Build failed in step 'Installing C library headers'

The following patch solves the problem.
(It's a backport of this uClibc commit:
http://git.uclibc.org/uClibc/commit/?id=49e81cada73616864b9b31df0aeb6961c30f5a6e
)

[--SNIP from another mail--]
AFAIK this is a problem since glibc 2.10.
(transplanted from 1ba79f2126df8bd89120899a58f2d0bcc2e9c771)
yann@866
     1
diff -durN binutils-2.15.orig/gas/config/tc-i386.c binutils-2.15/gas/config/tc-i386.c
yann@866
     2
--- binutils-2.15.orig/gas/config/tc-i386.c	2004-05-17 21:36:09.000000000 +0200
yann@866
     3
+++ binutils-2.15/gas/config/tc-i386.c	2008-09-22 08:57:14.000000000 +0200
yann@866
     4
@@ -185,15 +185,10 @@
yann@866
     5
 const char extra_symbol_chars[] = "*%-([";
yann@866
     6
 #endif
yann@866
     7
 
yann@866
     8
-#if (defined (TE_I386AIX)				\
yann@866
     9
-     || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF))	\
yann@866
    10
-	 && !defined (TE_LINUX)				\
yann@866
    11
-	 && !defined (TE_FreeBSD)			\
yann@866
    12
-	 && !defined (TE_NetBSD)))
yann@866
    13
 /* This array holds the chars that always start a comment.  If the
yann@866
    14
    pre-processor is disabled, these aren't very useful.  */
yann@866
    15
-const char comment_chars[] = "#/";
yann@866
    16
-#define PREFIX_SEPARATOR '\\'
yann@866
    17
+const char comment_chars[] = "#";
yann@866
    18
+#define PREFIX_SEPARATOR '/'
yann@866
    19
 
yann@866
    20
 /* This array holds the chars that only start a comment at the beginning of
yann@866
    21
    a line.  If the line seems to have the form '# 123 filename'
yann@866
    22
@@ -203,16 +198,7 @@
yann@866
    23
    #NO_APP at the beginning of its output.
yann@866
    24
    Also note that comments started like this one will always work if
yann@866
    25
    '/' isn't otherwise defined.  */
yann@866
    26
-const char line_comment_chars[] = "#";
yann@866
    27
-
yann@866
    28
-#else
yann@866
    29
-/* Putting '/' here makes it impossible to use the divide operator.
yann@866
    30
-   However, we need it for compatibility with SVR4 systems.  */
yann@866
    31
-const char comment_chars[] = "#";
yann@866
    32
-#define PREFIX_SEPARATOR '/'
yann@866
    33
-
yann@866
    34
 const char line_comment_chars[] = "/#";
yann@866
    35
-#endif
yann@866
    36
 
yann@866
    37
 const char line_separator_chars[] = ";";
yann@866
    38