patches/binutils/2.18a/120-i386-no-divide-comment.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jul 17 17:54:21 2011 +0200 (2011-07-17)
changeset 2888 dd71df95903a
parent 866 5fec4dba671e
permissions -rw-r--r--
cc/gcc: pass the companion libs prefix to cc_core

In case of canadian-cross, the companion libraries are not the same for
the core cc (they run on 'build') as they are for the final cc (they run
on 'host').

Prepare for this differentiation (coming later), while retaining the
current behavior (to use the same compblibs).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 diff -durN binutils-2.18.orig/gas/config/tc-i386.c binutils-2.18/gas/config/tc-i386.c
     2 --- binutils-2.18.orig/gas/config/tc-i386.c	2007-08-24 16:01:22.000000000 +0200
     3 +++ binutils-2.18/gas/config/tc-i386.c	2008-09-22 08:11:42.000000000 +0200
     4 @@ -180,24 +180,10 @@
     5  #endif
     6  	;
     7  
     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 '\\'
    21 -
    22 -#else
    23 +   pre-processor is disabled, these aren't very useful.  */
    24  const char *i386_comment_chars = "#";
    25  #define PREFIX_SEPARATOR '/'
    26 -#endif
    27  
    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 @@ -6061,20 +6047,6 @@
    31        break;
    32  
    33      case OPTION_DIVIDE:
    34 -#ifdef SVR4_COMMENT_CHARS
    35 -      {
    36 -	char *n, *t;
    37 -	const char *s;
    38 -
    39 -	n = (char *) xmalloc (strlen (i386_comment_chars) + 1);
    40 -	t = n;
    41 -	for (s = i386_comment_chars; *s != '\0'; s++)
    42 -	  if (*s != '/')
    43 -	    *t++ = *s;
    44 -	*t = '\0';
    45 -	i386_comment_chars = n;
    46 -      }
    47 -#endif
    48        break;
    49  
    50      case OPTION_MARCH:
    51 @@ -6142,13 +6114,8 @@
    52    fprintf (stream, _("\
    53    --32/--64               generate 32bit/64bit code\n"));
    54  #endif
    55 -#ifdef SVR4_COMMENT_CHARS
    56 -  fprintf (stream, _("\
    57 -  --divide                do not treat `/' as a comment character\n"));
    58 -#else
    59    fprintf (stream, _("\
    60    --divide                ignored\n"));
    61 -#endif
    62    fprintf (stream, _("\
    63    -march=CPU/-mtune=CPU   generate code/optimize for CPU, where CPU is one of:\n\
    64                             i386, i486, pentium, pentiumpro, pentium4, nocona,\n\