patches/binutils/2.18/120-i386-no-divide-comment.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Jan 05 23:02:43 2009 +0000 (2009-01-05)
changeset 1126 1ab3d2e08c8b
permissions -rw-r--r--
Split CT_ExtractAndPatch in two: CT_Extract and CT_Patch:
- it is unworkable to have CT_ExtactAndPAtch cope with all those silly glibc addons:
- they can have 'short' (as 'ports') or 'long' (as glibc-ports-2.7) names
- patches are against eithe the short or long name, but non-uniformly use one or the other
- it is the reposibility of the component (glibc in this case) to handle corner cases such as those
- update all components to use the new functions

/trunk/scripts/build/tools/000-template.sh | 3 2 1 0 +-
/trunk/scripts/build/tools/100-libelf.sh | 3 2 1 0 +-
/trunk/scripts/build/tools/200-sstrip.sh | 3 2 1 0 +-
/trunk/scripts/build/kernel/linux.sh | 3 2 1 0 +-
/trunk/scripts/build/binutils.sh | 3 2 1 0 +-
/trunk/scripts/build/cc/gcc.sh | 3 2 1 0 +-
/trunk/scripts/build/debug/000-template.sh | 3 2 1 0 +-
/trunk/scripts/build/debug/100-dmalloc.sh | 3 2 1 0 +-
/trunk/scripts/build/debug/400-ltrace.sh | 3 2 1 0 +-
/trunk/scripts/build/debug/300-gdb.sh | 9 6 3 0 +++--
/trunk/scripts/build/debug/500-strace.sh | 7 3 4 0 ++--
/trunk/scripts/build/debug/200-duma.sh | 19 8 11 0 ++++------
/trunk/scripts/build/libc/glibc.sh | 14 12 2 0 ++++++-
/trunk/scripts/build/libc/uClibc.sh | 13 9 4 0 +++++--
/trunk/scripts/build/libc/eglibc.sh | 14 12 2 0 ++++++-
/trunk/scripts/build/gmp.sh | 3 2 1 0 +-
/trunk/scripts/build/mpfr.sh | 3 2 1 0 +-
/trunk/scripts/functions | 68 36 32 0 +++++++++++++++++++-----------------
18 files changed, 108 insertions(+), 69 deletions(-)
yann@866
     1
diff -durN binutils-2.18.orig/gas/config/tc-i386.c binutils-2.18/gas/config/tc-i386.c
yann@866
     2
--- binutils-2.18.orig/gas/config/tc-i386.c	2007-08-24 16:01:22.000000000 +0200
yann@866
     3
+++ binutils-2.18/gas/config/tc-i386.c	2008-09-22 08:11:42.000000000 +0200
yann@866
     4
@@ -180,24 +180,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
@@ -6061,20 +6047,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
     case OPTION_MARCH:
yann@866
    51
@@ -6142,13 +6114,8 @@
yann@866
    52
   fprintf (stream, _("\
yann@866
    53
   --32/--64               generate 32bit/64bit code\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
   fprintf (stream, _("\
yann@866
    63
   -march=CPU/-mtune=CPU   generate code/optimize for CPU, where CPU is one of:\n\
yann@866
    64
                            i386, i486, pentium, pentiumpro, pentium4, nocona,\n\