patches/binutils/2.17/210-i386-no-divide-comment.patch
author Johannes Stezenbach <js@sig21.net>
Thu Jul 29 19:47:16 2010 +0200 (2010-07-29)
changeset 2045 fdaa6c7f6dea
permissions -rw-r--r--
cc/gcc: add option to compile against static libstdc++, for gcc-4.4 and newer

Idea and know-how taken from CodeSourcery build script.

Normal build:
$ ldd arm-unknown-linux-uclibcgnueabi-gcc
linux-gate.so.1 => (0xb77f3000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb76e8000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb75a1000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb757a000)
/lib/ld-linux.so.2 (0xb77f4000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb755c000)

CC_STATIC_LIBSTDCXX=y:
$ ldd arm-unknown-linux-uclibcgnueabi-gcc
linux-gate.so.1 => (0xb7843000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb76e6000)
/lib/ld-linux.so.2 (0xb7844000)

I made CC_STATIC_LIBSTDCXX default=y since I think
it is always desirable.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
yann@866
     1
diff -durN binutils-2.17.orig/gas/config/tc-i386.c binutils-2.17/gas/config/tc-i386.c
yann@866
     2
--- binutils-2.17.orig/gas/config/tc-i386.c	2006-04-07 08:40:57.000000000 +0200
yann@866
     3
+++ binutils-2.17/gas/config/tc-i386.c	2008-09-22 09:06:07.000000000 +0200
yann@866
     4
@@ -196,24 +196,10 @@
yann@866
     5
 #endif
yann@866
     6
 	;
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_GNU)				\
yann@866
    11
-	 && !defined (TE_LINUX)				\
yann@866
    12
- 	 && !defined (TE_NETWARE)			\
yann@866
    13
-	 && !defined (TE_FreeBSD)			\
yann@866
    14
-	 && !defined (TE_NetBSD)))
yann@866
    15
 /* This array holds the chars that always start a comment.  If the
yann@866
    16
-   pre-processor is disabled, these aren't very useful.  The option
yann@866
    17
-   --divide will remove '/' from this list.  */
yann@866
    18
-const char *i386_comment_chars = "#/";
yann@866
    19
-#define SVR4_COMMENT_CHARS 1
yann@866
    20
-#define PREFIX_SEPARATOR '\\'
yann@866
    21
-
yann@866
    22
-#else
yann@866
    23
+   pre-processor is disabled, these aren't very useful.  */
yann@866
    24
 const char *i386_comment_chars = "#";
yann@866
    25
 #define PREFIX_SEPARATOR '/'
yann@866
    26
-#endif
yann@866
    27
 
yann@866
    28
 /* This array holds the chars that only start a comment at the beginning of
yann@866
    29
    a line.  If the line seems to have the form '# 123 filename'
yann@866
    30
@@ -5486,20 +5472,6 @@
yann@866
    31
       break;
yann@866
    32
 
yann@866
    33
     case OPTION_DIVIDE:
yann@866
    34
-#ifdef SVR4_COMMENT_CHARS
yann@866
    35
-      {
yann@866
    36
-	char *n, *t;
yann@866
    37
-	const char *s;
yann@866
    38
-
yann@866
    39
-	n = (char *) xmalloc (strlen (i386_comment_chars) + 1);
yann@866
    40
-	t = n;
yann@866
    41
-	for (s = i386_comment_chars; *s != '\0'; s++)
yann@866
    42
-	  if (*s != '/')
yann@866
    43
-	    *t++ = *s;
yann@866
    44
-	*t = '\0';
yann@866
    45
-	i386_comment_chars = n;
yann@866
    46
-      }
yann@866
    47
-#endif
yann@866
    48
       break;
yann@866
    49
 
yann@866
    50
     default:
yann@866
    51
@@ -5525,13 +5497,8 @@
yann@866
    52
   fprintf (stream, _("\
yann@866
    53
   -s                      ignored\n"));
yann@866
    54
 #endif
yann@866
    55
-#ifdef SVR4_COMMENT_CHARS
yann@866
    56
-  fprintf (stream, _("\
yann@866
    57
-  --divide                do not treat `/' as a comment character\n"));
yann@866
    58
-#else
yann@866
    59
   fprintf (stream, _("\
yann@866
    60
   --divide                ignored\n"));
yann@866
    61
-#endif
yann@866
    62
 }
yann@866
    63
 
yann@866
    64
 #if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \