]> git.pld-linux.org Git - packages/crossppc-binutils.git/blobdiff - binutils-gasp.patch
- sed -e "s/sparc/ppc/g" -e "s/SPARC/PPC/g" from crosssparc-binutils
[packages/crossppc-binutils.git] / binutils-gasp.patch
index 7a477eddba0e2df65183adac3fd2cca524e0b118..4d7b022f9492a9525c037261cdbedde7c216ce38 100644 (file)
@@ -36,89 +36,6 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/Makefile.am binutils-2.13.90.0.18/gas/M
  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/Makefile.in binutils-2.13.90.0.18/gas/Makefile.in
---- binutils-2.13.90.0.18.orig/gas/Makefile.in Sun Feb  2 03:21:17 2003
-+++ binutils-2.13.90.0.18/gas/Makefile.in      Sun Feb  2 12:29:17 2003
-@@ -313,7 +313,7 @@
-       write.c
--CFILES = $(GAS_CFILES) itbl-ops.c
-+CFILES = $(GAS_CFILES) gasp.c itbl-ops.c
- HFILES = \
-       as.h \
-@@ -575,7 +575,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.
--noinst_PROGRAMS = as-new
-+# ...and it is needed for few packages in distribution.
-+noinst_PROGRAMS = as-new gasp-new
- noinst_SCRIPTS = $(GDBINIT)
- EXTRA_SCRIPTS = .gdbinit
-@@ -624,6 +625,10 @@
-       $(extra_objects) $(GASLIBS) $(INTLDEPS)
-+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`
-@@ -2431,7 +2436,7 @@
- mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
- CONFIG_HEADER = config.h
- CONFIG_CLEAN_FILES =  ${GDBINIT}
--noinst_PROGRAMS =  as-new$(EXEEXT)
-+noinst_PROGRAMS =  as-new$(EXEEXT) gasp-new$(EXEEXT)
- PROGRAMS =  $(noinst_PROGRAMS)
-@@ -2439,6 +2444,9 @@
- CPPFLAGS = @CPPFLAGS@
- LDFLAGS = @LDFLAGS@
- LIBS = @LIBS@
-+gasp_new_OBJECTS =  gasp.$(OBJEXT) macro.$(OBJEXT) sb.$(OBJEXT) \
-+hash.$(OBJEXT)
-+gasp_new_LDFLAGS =
- itbl_test_OBJECTS =  itbl-parse.$(OBJEXT) itbl-lex.$(OBJEXT)
- itbl_test_DEPENDENCIES =  itbl-tops.o itbl-test.o \
- ../libiberty/libiberty.a
-@@ -2472,8 +2480,8 @@
- TAR = tar
- GZIP_ENV = --best
--SOURCES = $(itbl_test_SOURCES) $(as_new_SOURCES) $(EXTRA_as_new_SOURCES)
--OBJECTS = $(itbl_test_OBJECTS) $(as_new_OBJECTS)
-+SOURCES = $(gasp_new_SOURCES) $(itbl_test_SOURCES) $(as_new_SOURCES) $(EXTRA_as_new_SOURCES)
-+OBJECTS = $(gasp_new_OBJECTS) $(itbl_test_OBJECTS) $(as_new_OBJECTS)
- all: all-redirect
- .SUFFIXES:
-@@ -2576,6 +2584,10 @@
- maintainer-clean-libtool:
-+gasp-new$(EXEEXT): $(gasp_new_OBJECTS) $(gasp_new_DEPENDENCIES)
-+      @rm -f gasp-new$(EXEEXT)
-+      $(LINK) $(gasp_new_LDFLAGS) $(gasp_new_OBJECTS) $(gasp_new_LDADD) $(LIBS)
-+      
- itbl-test$(EXEEXT): $(itbl_test_OBJECTS) $(itbl_test_DEPENDENCIES)
-       @rm -f itbl-test$(EXEEXT)
-       $(LINK) $(itbl_test_LDFLAGS) $(itbl_test_OBJECTS) $(itbl_test_LDADD) $(LIBS)
-@@ -3326,6 +3338,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 \
@@ -131,37 +48,13 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/doc/Makefile.am binutils-2.13.90.0.18/g
  man_MANS = as.1
  
 -info_TEXINFOS = as.texinfo 
-+info_TEXINFOS = as.texinfo gasp.texi
++info_TEXINFOS = as.texinfo gasp.texinfo
  
  asconfig.texi: $(CONFIG).texi
        rm -f asconfig.texi
-diff -Nur binutils-2.13.90.0.18.orig/gas/doc/Makefile.in binutils-2.13.90.0.18/gas/doc/Makefile.in
---- binutils-2.13.90.0.18.orig/gas/doc/Makefile.in     Sun Feb  2 03:21:17 2003
-+++ binutils-2.13.90.0.18/gas/doc/Makefile.in  Sun Feb  2 12:36:47 2003
-@@ -133,7 +133,7 @@
- man_MANS = as.1
--info_TEXINFOS = as.texinfo 
-+info_TEXINFOS = as.texinfo gasp.texi
- CPU_DOCS = \
-       c-a29k.texi \
-@@ -182,9 +182,9 @@
- CONFIG_CLEAN_FILES = 
- TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi`
- TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
--INFO_DEPS = as.info
-+INFO_DEPS = as.info gasp.info
- DVIS = as.dvi
--TEXINFOS = as.texinfo 
-+TEXINFOS = as.texinfo gasp.texi
- man1dir = $(mandir)/man1
- MANS = $(man_MANS)
-diff -Nur binutils-2.13.90.0.18.orig/gas/doc/gasp.texi binutils-2.13.90.0.18/gas/doc/gasp.texi
---- binutils-2.13.90.0.18.orig/gas/doc/gasp.texi       Thu Jan  1 01:00:00 1970
-+++ binutils-2.13.90.0.18/gas/doc/gasp.texi    Wed Oct 30 05:09:13 2002
+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
 @@ -0,0 +1,1456 @@
 +\input texinfo               @c             -*- Texinfo -*-
 +@setfilename gasp.info
@@ -2656,7 +2549,7 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/gasp.c binutils-2.13.90.0.18/gas/gasp.c
 +     sb *in;
 +{
 +  int online = 0;
-+  int more = 1;
++  int more = 1, ch = 0;
 +
 +  if (copysource)
 +    {
@@ -2667,7 +2560,7 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/gasp.c binutils-2.13.90.0.18/gas/gasp.c
 +
 +  while (1)
 +    {
-+      int ch = get ();
++      ch = get ();
 +
 +      while (ch == '\r')
 +      ch = get ();
@@ -2709,7 +2602,7 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/gasp.c binutils-2.13.90.0.18/gas/gasp.c
 +          {
 +            if (ch != EOF)
 +              unget (ch);
-+            break;
++            ch = '\n'; break;
 +          }
 +      }
 +      else
@@ -2719,7 +2612,7 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/gasp.c binutils-2.13.90.0.18/gas/gasp.c
 +      online++;
 +    }
 +
-+  return more;
++  return more ? ch : 0;
 +}
 +
 +/* Find a label from sb in and put it in out.  */
@@ -5384,35 +5277,29 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/gasp.c binutils-2.13.90.0.18/gas/gasp.c
 +  fprintf (stderr, _("\nPlease report this bug.\n"));
 +  exit (1);
 +}
-diff -Nur binutils-2.13.90.0.18.orig/gas/macro.c binutils-2.13.90.0.18/gas/macro.c
---- binutils-2.13.90.0.18.orig/gas/macro.c     Sun Feb  2 03:21:18 2003
-+++ binutils-2.13.90.0.18/gas/macro.c  Sun Feb  2 15:19:38 2003
-@@ -75,8 +75,8 @@
- static int sub_actual
-   PARAMS ((int, sb *, sb *, struct hash_control *, int, sb *, int));
+--- binutils-2.14.90.0.8/gas/macro.c.orig      Wed Jan 14 22:07:45 2004
++++ binutils-2.14.90.0.8/gas/macro.c   Thu Jan 15 10:46:06 2004
+@@ -74,8 +74,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
--  PARAMS ((sb *, sb *, formal_entry *, struct hash_control *, int));
--static const char *macro_expand PARAMS ((int, sb *, macro_entry *, sb *));
-+  PARAMS ((sb *, sb *, formal_entry *, struct hash_control *, int,int ));
-+static const char *macro_expand PARAMS ((int, sb *, macro_entry *, sb *, int));
+-  (sb *, sb *, formal_entry *, struct hash_control *, int);
+-static const char *macro_expand (int, sb *, macro_entry *, sb *);
++  (sb *, sb *, formal_entry *, struct hash_control *, int, int);
++static const char *macro_expand (int, sb *, macro_entry *, sb *, int);
  
  #define ISWHITE(x) ((x) == ' ' || (x) == '\t')
  
-@@ -653,11 +653,12 @@
- /* Expand the body of a macro.  */
+@@ -619,7 +619,7 @@
  
  static const char *
--macro_expand_body (in, out, formals, formal_hash, locals)
-+macro_expand_body (in, out, formals, formal_hash, comment_char, locals)
-      sb *in;
-      sb *out;
-      formal_entry *formals;
-      struct hash_control *formal_hash;
-+     int comment_char;
-      int locals;
+ macro_expand_body (sb *in, sb *out, formal_entry *formals,
+-                 struct hash_control *formal_hash, int locals)
++                 struct hash_control *formal_hash, int comment_char, int locals)
  {
    sb t;
-@@ -688,7 +689,14 @@
+   int src = 0;
+@@ -649,7 +649,14 @@
        else if (in->ptr[src] == '\\')
        {
          src++;
@@ -5428,7 +5315,7 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/macro.c binutils-2.13.90.0.18/gas/macro
            {
              /* Sub in till the next ')' literally.  */
              src++;
-@@ -771,7 +779,7 @@
+@@ -732,7 +739,7 @@
              formal_entry *f;
  
              src = sb_skip_white (src + 5, in);
@@ -5437,7 +5324,7 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/macro.c binutils-2.13.90.0.18/gas/macro
                {
                  static int loccnt;
                  char buf[20];
-@@ -798,6 +806,17 @@
+@@ -759,6 +766,17 @@
                }
            }
        }
@@ -5455,21 +5342,16 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/macro.c binutils-2.13.90.0.18/gas/macro
        else if (in->ptr[src] == '"'
               || (macro_mri && in->ptr[src] == '\''))
        {
-@@ -880,11 +899,12 @@
+@@ -841,7 +859,7 @@
     body.  */
  
  static const char *
--macro_expand (idx, in, m, out)
-+macro_expand (idx, in, m, out, comment_char)
-      int idx;
-      sb *in;
-      macro_entry *m;
-      sb *out;
-+     int comment_char;
+-macro_expand (int idx, sb *in, macro_entry *m, sb *out)
++macro_expand (int idx, sb *in, macro_entry *m, sb *out, int comment_char)
  {
    sb t;
    formal_entry *ptr;
-@@ -934,7 +954,7 @@
+@@ -891,7 +909,7 @@
  
    /* Peel off the actuals and store them away in the hash tables' actuals.  */
    idx = sb_skip_white (idx, in);
@@ -5478,7 +5360,7 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/macro.c binutils-2.13.90.0.18/gas/macro
      {
        int scan;
  
-@@ -1036,7 +1056,7 @@
+@@ -993,7 +1011,7 @@
        sb_add_string (&ptr->actual, buffer);
      }
  
@@ -5487,19 +5369,16 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/macro.c binutils-2.13.90.0.18/gas/macro
    if (err != NULL)
      return err;
  
-@@ -1072,9 +1092,10 @@
+@@ -1029,7 +1047,7 @@
     *EXPAND.  Return 1 if a macro is found, 0 otherwise.  */
  
  int
--check_macro (line, expand, error, info)
-+check_macro (line, expand, comment_char, error, info)
-      const char *line;
-      sb *expand;
-+     int comment_char;
-      const char **error;
-      macro_entry **info;
+-check_macro (const char *line, sb *expand,
++check_macro (const char *line, sb *expand, int comment_char,
+            const char **error, macro_entry **info)
  {
-@@ -1112,7 +1133,7 @@
+   const char *s;
+@@ -1066,7 +1084,7 @@
      sb_add_char (&line_sb, *s++);
  
    sb_new (expand);
@@ -5508,22 +5387,16 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/macro.c binutils-2.13.90.0.18/gas/macro
  
    sb_kill (&line_sb);
  
-@@ -1137,12 +1158,13 @@
+@@ -1090,7 +1108,7 @@
     success, or an error message otherwise.  */
  
  const char *
--expand_irp (irpc, idx, in, out, get_line)
-+expand_irp (irpc, idx, in, out, get_line, comment_char)
-      int irpc;
-      int idx;
-      sb *in;
-      sb *out;
-      int (*get_line) PARAMS ((sb *));
-+     int comment_char;
+-expand_irp (int irpc, int idx, sb *in, sb *out, int (*get_line) (sb *))
++expand_irp (int irpc, int idx, sb *in, sb *out, int (*get_line) (sb *), int comment_char)
  {
    const char *mn;
    sb sub;
-@@ -1180,10 +1202,10 @@
+@@ -1128,10 +1146,10 @@
    sb_reset (out);
  
    idx = sb_skip_comma (idx, in);
@@ -5536,7 +5409,7 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/macro.c binutils-2.13.90.0.18/gas/macro
        if (err != NULL)
        return err;
      }
-@@ -1191,7 +1213,7 @@
+@@ -1139,7 +1157,7 @@
      {
        if (irpc && in->ptr[idx] == '"')
        ++idx;
@@ -5545,7 +5418,7 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/macro.c binutils-2.13.90.0.18/gas/macro
        {
          if (!irpc)
            idx = get_any_string (idx, in, &f.actual, 1, 0);
-@@ -1202,7 +1224,7 @@
+@@ -1150,7 +1168,7 @@
                  int nxt;
  
                  nxt = sb_skip_white (idx + 1, in);
@@ -5554,7 +5427,7 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/macro.c binutils-2.13.90.0.18/gas/macro
                    {
                      idx = nxt;
                      break;
-@@ -1212,7 +1234,7 @@
+@@ -1160,7 +1178,7 @@
              sb_add_char (&f.actual, in->ptr[idx]);
              ++idx;
            }
@@ -5563,20 +5436,17 @@ diff -Nur binutils-2.13.90.0.18.orig/gas/macro.c binutils-2.13.90.0.18/gas/macro
          if (err != NULL)
            return err;
          if (!irpc)
-diff -Nur binutils-2.13.90.0.18.orig/gas/macro.h binutils-2.13.90.0.18/gas/macro.h
---- binutils-2.13.90.0.18.orig/gas/macro.h     Sun Feb  2 03:21:18 2003
-+++ binutils-2.13.90.0.18/gas/macro.h  Sun Feb  2 15:23:24 2003
-@@ -79,10 +79,10 @@
+--- binutils-2.14.90.0.8/gas/macro.h.orig      Wed Jan 14 22:07:45 2004
++++ binutils-2.14.90.0.8/gas/macro.h   Thu Jan 15 10:43:32 2004
+@@ -76,8 +76,8 @@
+ extern void macro_mri_mode (int);
  extern const char *define_macro
-   PARAMS ((int, sb *, sb *, int (*) PARAMS ((sb *)), const char **));
- extern int check_macro
--  PARAMS ((const char *, sb *, const char **, macro_entry **));
-+  PARAMS ((const char *, sb *, int, const char **, macro_entry **));
- extern void delete_macro
-   PARAMS ((const char *));
- extern const char *expand_irp
--  PARAMS ((int, int, sb *, sb *, int (*) PARAMS ((sb *))));
-+  PARAMS ((int, int, sb *, sb *, int (*) PARAMS ((sb *)), int));
+   (int, sb *, sb *, int (*) (sb *), const char **);
+-extern int check_macro (const char *, sb *, const char **, macro_entry **);
++extern int check_macro (const char *, sb *, int, const char **, macro_entry **);
+ extern void delete_macro (const char *);
+-extern const char *expand_irp (int, int, sb *, sb *, int (*) (sb *));
++extern const char *expand_irp (int, int, sb *, sb *, int (*) (sb *), int);
  
  #endif
 diff -Nur binutils-2.13.90.0.18.orig/gas/read.c binutils-2.13.90.0.18/gas/read.c
This page took 0.08166 seconds and 4 git commands to generate.