]> git.pld-linux.org Git - packages/binutils.git/blobdiff - binutils-gasp.patch
- rel 4
[packages/binutils.git] / binutils-gasp.patch
index 83a3102a1f470e94b4e4ea544eb47fa2056022f5..f38585062d4b6293a1e2081ed0bee4e32a4e9894 100644 (file)
@@ -1,16 +1,15 @@
-diff -Nur binutils-2.13.90.0.18.orig/gas/Makefile.am binutils-2.13.90.0.18/gas/Makefile.am
---- binutils-2.13.90.0.18.orig/gas/Makefile.am Sun Feb  2 03:21:17 2003
-+++ binutils-2.13.90.0.18/gas/Makefile.am      Sun Feb  2 12:25:10 2003
-@@ -197,7 +197,7 @@
+--- binutils-2.17.50.0.13/gas/Makefile.am.orig 2007-03-16 16:48:29.000000000 +0100
++++ binutils-2.17.50.0.13/gas/Makefile.am      2007-03-16 20:26:20.200480821 +0100
+@@ -199,7 +199,7 @@
        symbols.c \
        write.c
  
--CFILES = $(GAS_CFILES) itbl-ops.c
-+CFILES = $(GAS_CFILES) gasp.c itbl-ops.c
+-CFILES = $(GAS_CFILES) itbl-ops.c cgen.c
++CFILES = $(GAS_CFILES) gasp.c itbl-ops.c cgen.c
  
  HFILES = \
        as.h \
-@@ -452,7 +452,8 @@
+@@ -455,7 +455,8 @@
  
  # Note: GASP is now deprecated and has been removed.  It is still
  # available in the CVS archive or older binutils releases if it is needed.
@@ -20,41 +19,40 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/Makefile.am binutils-2.13.90.0.18/gas/M
  noinst_SCRIPTS = $(GDBINIT)
  EXTRA_SCRIPTS = .gdbinit
  
-@@ -515,6 +516,10 @@
+@@ -517,6 +518,10 @@
        as.h asintl.h bignum.h bit_fix.h config.h emul.h expr.h flonum.h \
        frags.h hash.h listing.h obj.h read.h symbols.h tc.h write.h
  
 +gasp_new_SOURCES = gasp.c macro.c sb.c hash.c
-+gasp_new_LDADD = ../libiberty/libiberty.a $(INTLLIBS)
-+gasp_new_DEPENDENCIES = ../libiberty/libiberty.a $(INTLDEPS)
-+
- EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
-           echo $${rootme}/../expect/expect ; \
-           else echo expect ; fi`
-@@ -2416,6 +2421,8 @@
  $(INCDIR)/obstack.h subsegs.h struc-symbol.h
- write.o: write.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \
-   output-file.h dwarf2dbg.h
-+gasp.o: gasp.c $(INCDIR)/getopt.h $(INCDIR)/safe-ctype.h \
-+  sb.h macro.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
- itbl-ops.o: itbl-ops.c itbl-ops.h $(INCDIR)/symcat.h
- e-crisaout.o: $(srcdir)/config/e-crisaout.c $(INCDIR)/symcat.h \
-   emul-target.h
-diff -Nur binutils-2.13.90.0.18.orig/gas/doc/Makefile.am binutils-2.13.90.0.18/gas/doc/Makefile.am
---- binutils-2.13.90.0.18.orig/gas/doc/Makefile.am     Sun Feb  2 03:21:17 2003
-+++ binutils-2.13.90.0.18/gas/doc/Makefile.am  Sun Feb  2 12:35:43 2003
++gasp_new_LDADD = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL)
++gasp_new_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL_DEP)
++
+ EXPECT = expect
+ RUNTEST = runtest
+ RUNTESTFLAGS=
+@@ -682,6 +682,9 @@
itbl-lex.o: itbl-lex.c itbl-parse.h $(srcdir)/itbl-lex.h
+       $(COMPILE) -c $< $(NO_WERROR)
++gasp.o:gasp.c $(INCDIR)/getopt.h $(INCDIR)/safe-ctype.h \
++      sb.h macro.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
++
+ # Disable -Werror, if it has been enabled, since old versions of bison/
+ # yacc will produce working code which contain compile time warnings.
+ itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h $(srcdir)/itbl-lex.h
+--- binutils-2.17.50.0.13/gas/doc/Makefile.am.orig     2007-03-16 16:48:29.000000000 +0100
++++ binutils-2.17.50.0.13/gas/doc/Makefile.am  2007-03-16 20:27:05.810679469 +0100
 @@ -15,7 +15,7 @@
  
  man_MANS = as.1
  
 -info_TEXINFOS = as.texinfo 
 +info_TEXINFOS = as.texinfo gasp.texinfo
+ as_TEXINFOS = asconfig.texi $(CPU_DOCS)
  
- asconfig.texi: $(CONFIG).texi
-       rm -f asconfig.texi
-diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/gas/doc/gasp.texinfo
---- binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo     Thu Jan  1 01:00:00 1970
-+++ binutils-2.14.90.0.7/gas/doc/gasp.texinfo  Wed Oct 30 05:09:13 2002
+ AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
+--- binutils-2.16.91.0.2.org/gas/doc/gasp.texinfo      1970-01-01 00:00:00.000000000 +0000
++++ binutils-2.16.91.0.2/gas/doc/gasp.texinfo  2005-07-21 18:31:04.000000000 +0000
 @@ -0,0 +1,1456 @@
 +\input texinfo               @c             -*- Texinfo -*-
 +@setfilename gasp.info
@@ -1512,9 +1510,9 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
 +
 +@contents
 +@bye
---- binutils-2.16.90.0.2/gas/gasp.c.orig       1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.16.90.0.2/gas/gasp.c    2005-05-02 15:44:26.244061608 +0200
-@@ -0,0 +1,3938 @@
+--- binutils-2.17.50.0.2/gas/gasp.c.orig       1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.17.50.0.2/gas/gasp.c    2006-06-07 11:22:13.774440000 +0200
+@@ -0,0 +1,3999 @@
 +/* gasp.c - Gnu assembler preprocessor main program.
 +   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
 +   Free Software Foundation, Inc.
@@ -1563,7 +1561,7 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
 +*/
 +
 +#include "config.h"
-+#include "bin-bugs.h"
++#include "bfdver.h"
 +
 +#include <assert.h>
 +#include <stdio.h>
@@ -5365,6 +5363,25 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
 +    }
 +}
 +
++/* Like as_bad but the file name and line number are passed in.
++   Unfortunately, we have to repeat the function in order to handle
++   the varargs correctly and portably.  */
++
++void
++as_warn_where (char *file, unsigned int line, const char *format, ...)
++{
++  va_list args;
++  char buffer[2000];
++
++  if (1 /*!flag_no_warnings*/)
++    {
++      va_start (args, format);
++      vsprintf (buffer, format, args);
++      va_end (args);
++      as_warn_internal (file, line, buffer);
++    }
++}
++
 +/* Nonzero if we've hit a 'bad error', and should not write an obj file,
 +   and exit with a nonzero error code.  */
 +
@@ -5385,6 +5402,29 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
 +  (void) putc ('\n', stderr);
 +}
 +
++/* Send to stderr a string as a warning, and locate warning in input
++   file(s).  Please us when there is no recovery, but we want to
++   continue processing but not produce an object file.
++   Please explain in string (which may have '\n's) what recovery was
++   done.  */
++
++void
++as_bad (const char *format, ...)
++{
++  va_list args;
++  char buffer[2000];
++
++  va_start (args, format);
++  vsprintf (buffer, format, args);
++  va_end (args);
++
++  as_bad_internal ((char *) NULL, 0, buffer);
++}
++
++/* Like as_bad but the file name and line number are passed in.
++   Unfortunately, we have to repeat the function in order to handle
++   the varargs correctly and portably.  */
++
 +void
 +as_bad_where (char *file, unsigned int line, const char *format, ...)
 +{
@@ -5398,6 +5438,22 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
 +  as_bad_internal (file, line, buffer);
 +}
 +
++/* Indicate assertion failure.
++   Arguments: Filename, line number, optional function name.  */
++
++void
++as_assert (const char *file, int line, const char *fn)
++{
++  fprintf (stderr, _("Internal error!\n"));
++  if (fn)
++    fprintf (stderr, _("Assertion failure in %s at %s line %d.\n"),
++           fn, file, line);
++  else
++    fprintf (stderr, _("Assertion failure at %s line %d.\n"), file, line);
++  fprintf (stderr, _("Please report this bug.\n"));
++  xexit (EXIT_FAILURE);
++}
++
 +#ifndef LEX_AT
 +/* The m88k unfortunately uses @ as a label beginner.  */
 +#define LEX_AT 0
@@ -5453,20 +5509,12 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
 +  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
 +  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
 +};
---- binutils-2.16.90.0.2/gas/macro.c.orig      2005-04-29 19:50:28.000000000 +0200
-+++ binutils-2.16.90.0.2/gas/macro.c   2005-05-02 11:05:17.656233976 +0200
-@@ -75,8 +75,8 @@
- static int get_apost_token (int, sb *, sb *, int);
- static int sub_actual (int, sb *, sb *, struct hash_control *, int, sb *, int);
- static const char *macro_expand_body
--  (sb *, sb *, formal_entry *, struct hash_control *, const macro_entry *);
--static const char *macro_expand (int, sb *, macro_entry *, sb *);
-+  (sb *, sb *, formal_entry *, struct hash_control *, const macro_entry *, int);
-+static const char *macro_expand (int, sb *, macro_entry *, sb *, int);
- static void free_macro(macro_entry *);
- #define ISWHITE(x) ((x) == ' ' || (x) == '\t')
-@@ -711,7 +711,7 @@
++
++/* just a stub to satisfy unused function in sb.o */
++int do_scrub_chars (int (*get) (char*, int), char *tostart, int tolen) {}
+--- binutils-2.16.91.0.2.org/gas/macro.c       2005-05-10 22:46:44.000000000 +0000
++++ binutils-2.16.91.0.2/gas/macro.c   2005-07-21 18:31:04.000000000 +0000
+@@ -754,7 +754,7 @@
  
  static const char *
  macro_expand_body (sb *in, sb *out, formal_entry *formals,
@@ -5475,7 +5523,7 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
  {
    sb t;
    int src = 0, inquote = 0, macro_line = 0;
-@@ -743,7 +743,14 @@
+@@ -786,7 +786,14 @@
        else if (in->ptr[src] == '\\')
        {
          src++;
@@ -5491,7 +5539,7 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
            {
              /* Sub in till the next ')' literally.  */
              src++;
-@@ -824,7 +831,7 @@
+@@ -867,7 +874,7 @@
          else
            {
              src = sb_skip_white (src + 5, in);
@@ -5499,8 +5547,8 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
 +            while (in->ptr[src] != '\n' && in->ptr[src] != comment_char)
                {
                  const char *name;
-                 formal_entry *f;
-@@ -865,6 +872,17 @@
+                 formal_entry *f = new_formal ();
+@@ -903,6 +910,17 @@
                }
            }
        }
@@ -5518,7 +5566,7 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
        else if (in->ptr[src] == '"'
               || (macro_mri && in->ptr[src] == '\''))
        {
-@@ -949,7 +967,7 @@
+@@ -984,7 +1002,7 @@
     body.  */
  
  static const char *
@@ -5527,7 +5575,7 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
  {
    sb t;
    formal_entry *ptr;
-@@ -999,7 +1017,7 @@
+@@ -1029,7 +1047,7 @@
  
    /* Peel off the actuals and store them away in the hash tables' actuals.  */
    idx = sb_skip_white (idx, in);
@@ -5536,16 +5584,16 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
      {
        int scan;
  
-@@ -1101,7 +1119,7 @@
-       sb_add_string (&ptr->actual, buffer);
-     }
+@@ -1156,7 +1174,7 @@
+         sb_add_string (&ptr->actual, buffer);
+       }
  
--  err = macro_expand_body (&m->sub, out, m->formals, m->formal_hash, m);
-+  err = macro_expand_body (&m->sub, out, m->formals, m->formal_hash, m, comment_char);
+-      err = macro_expand_body (&m->sub, out, m->formals, m->formal_hash, m);
++      err = macro_expand_body (&m->sub, out, m->formals, m->formal_hash, m, comment_char);
+     }
  
    /* Discard any unnamed formal arguments.  */
-   if (macro_mri)
-@@ -1136,7 +1154,7 @@
+@@ -1189,7 +1207,7 @@
     *EXPAND.  Return 1 if a macro is found, 0 otherwise.  */
  
  int
@@ -5554,7 +5602,7 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
             const char **error, macro_entry **info)
  {
    const char *s;
-@@ -1171,7 +1189,7 @@
+@@ -1224,7 +1242,7 @@
      sb_add_char (&line_sb, *s++);
  
    sb_new (expand);
@@ -5563,7 +5611,7 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
  
    sb_kill (&line_sb);
  
-@@ -1235,7 +1253,7 @@
+@@ -1285,7 +1303,7 @@
     success, or an error message otherwise.  */
  
  const char *
@@ -5572,7 +5620,7 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
  {
    sb sub;
    formal_entry f;
-@@ -1267,16 +1285,16 @@
+@@ -1318,10 +1336,10 @@
    sb_reset (out);
  
    idx = sb_skip_comma (idx, in);
@@ -5585,34 +5633,36 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
      }
    else
      {
-       if (irpc && in->ptr[idx] == '"')
-       ++idx;
+@@ -1333,7 +1351,7 @@
+         ++idx;
+       }
 -      while (idx < in->len)
 +      while (idx < in->len && in->ptr[idx] != comment_char)
        {
          if (!irpc)
-           idx = get_any_string (idx, in, &f.actual, 1, 0);
-@@ -1287,7 +1305,7 @@
-                 int nxt;
+           idx = get_any_string (idx, in, &f.actual);
+@@ -1347,7 +1365,7 @@
+                   in_quotes = ! in_quotes;
+         
                  nxt = sb_skip_white (idx + 1, in);
 -                if (nxt >= in->len)
 +                if (nxt >= in->len || in->ptr[nxt] == comment_char)
                    {
                      idx = nxt;
                      break;
-@@ -1297,7 +1315,7 @@
-             sb_add_char (&f.actual, in->ptr[idx]);
+@@ -1358,7 +1376,7 @@
              ++idx;
            }
 -        err = macro_expand_body (&sub, out, &f, h, 0);
 +        err = macro_expand_body (&sub, out, &f, h, 0, comment_char);
          if (err != NULL)
            break;
          if (!irpc)
---- binutils-2.16.90.0.2/gas/macro.h.orig      2005-04-29 19:50:28.000000000 +0200
-+++ binutils-2.16.90.0.2/gas/macro.h   2005-05-02 11:06:23.979151360 +0200
-@@ -80,8 +80,8 @@
+--- binutils-2.16.91.0.2.org/gas/macro.h       2005-05-10 22:46:44.000000000 +0000
++++ binutils-2.16.91.0.2/gas/macro.h   2005-07-21 18:31:04.000000000 +0000
+@@ -90,8 +90,8 @@
  extern void macro_mri_mode (int);
  extern const char *define_macro
    (int, sb *, sb *, int (*) (sb *), char *, unsigned int, const char **);
@@ -5623,9 +5673,9 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
 +extern const char *expand_irp (int, int, sb *, sb *, int (*) (sb *), int);
  
  #endif
---- binutils-2.16.90.0.2/gas/read.c.orig       2005-04-29 19:50:28.000000000 +0200
-+++ binutils-2.16.90.0.2/gas/read.c    2005-05-02 11:06:53.579651400 +0200
-@@ -550,7 +550,7 @@
+--- binutils-2.16.91.0.2.org/gas/read.c        2005-06-22 20:53:34.000000000 +0000
++++ binutils-2.16.91.0.2/gas/read.c    2005-07-21 18:31:04.000000000 +0000
+@@ -555,7 +555,7 @@
    const char *err;
    macro_entry *macro;
  
@@ -5634,41 +5684,12 @@ diff -Nur binutils-2.14.90.0.7.orig/gas/doc/gasp.texinfo binutils-2.14.90.0.7/ga
      {
        if (err != NULL)
        as_bad ("%s", err);
-@@ -1978,7 +1978,7 @@
+@@ -1958,7 +1958,7 @@
  
    sb_new (&out);
  
--  err = expand_irp (irpc, 0, &s, &out, get_line_sb);
-+  err = expand_irp (irpc, 0, &s, &out, get_line_sb, '\0');
+-  err = expand_irp (irpc, 0, &s, &out, get_non_macro_line_sb);
++  err = expand_irp (irpc, 0, &s, &out, get_non_macro_line_sb, '\0');
    if (err != NULL)
      as_bad_where (file, line, "%s", err);
  
---- binutils-2.16.90.0.2/gas/sb.h.orig 2005-04-29 19:50:28.000000000 +0200
-+++ binutils-2.16.90.0.2/gas/sb.h      2005-05-02 15:10:35.689752784 +0200
-@@ -82,6 +82,7 @@
- extern void sb_reset (sb *);
- extern void sb_add_char (sb *, int);
- extern void sb_add_string (sb *, const char *);
-+extern void sb_add_buffer (sb *, const char *, int);
- extern char *sb_terminate (sb *);
- extern int sb_skip_white (int, sb *);
- extern int sb_skip_comma (int, sb *);
---- binutils-2.16.90.0.2/gas/sb.c.orig 2005-04-29 19:50:28.000000000 +0200
-+++ binutils-2.16.90.0.2/gas/sb.c      2005-05-02 15:10:16.240709488 +0200
-@@ -165,6 +165,16 @@
-   ptr->len += len;
- }
-+/* add string at s of length len to sb at ptr */
-+
-+void
-+sb_add_buffer (sb *ptr, const char *s, int len)
-+{
-+  sb_check (ptr, len);
-+  memcpy (ptr->ptr + ptr->len, s, len);
-+  ptr->len += len;
-+}
-+
- /* like sb_name, but don't include the null byte in the string.  */
- char *
This page took 0.752782 seconds and 4 git commands to generate.