patches/binutils/2.17/210-i386-no-divide-comment.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Oct 27 18:42:26 2008 +0000 (2008-10-27)
changeset 1001 c8ac48ba1411
permissions -rw-r--r--
Enhance the make fragments:
- comment the different parts
- re-order the code so that it is homogeneous amogst fragments
- eye-candy in some existing comments

/trunk/tools/tools.mk | 17 15 2 0 +++++++++++++++--
/trunk/steps.mk | 38 26 12 0 ++++++++++++++++++++++++++------------
/trunk/samples/samples.mk | 41 28 13 0 ++++++++++++++++++++++++++++-------------
/trunk/config/config.mk | 2 1 1 0 +-
4 files changed, 70 insertions(+), 28 deletions(-)
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)) \