From 378536737534d2a8710807f1e5fbed43d372e6a4 Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Sun, 23 Jan 1994 00:31:14 +0000 Subject: [PATCH] Minor MPW compatibility tweaks. --- binutils/ChangeLog | 8 ++++++++ binutils/Makefile.in | 22 +++++++++++++++------- binutils/ar.c | 6 +++--- binutils/objdump.c | 9 +++++---- 4 files changed, 31 insertions(+), 14 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 9a323fedc6..cecd866931 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,11 @@ +Sat Jan 22 16:20:46 1994 Stan Shebs (shebs@andros.cygnus.com) + + * Makefile.in (MALLOC): Set to emptiness by default. + (ALL_CFLAGS): Add and use. + (arparse.h): Make it depend on arparse.y. + * ar.c (libbfd.h): Don't require to be in ../bfd. + * objdump.c (comp): Rename to compare_symbols. + Fri Jan 21 20:22:30 1994 David J. Mackenzie (djm@thepub.cygnus.com) * objdump.c (list_matching_formats): If the file format is ambiguous, diff --git a/binutils/Makefile.in b/binutils/Makefile.in index 2cafb4b42e..9e1d26c1cb 100644 --- a/binutils/Makefile.in +++ b/binutils/Makefile.in @@ -1,5 +1,5 @@ # Makefile for GNU binary-file utilities -# Copyright (C) 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. # This file is part of GNU binutils. @@ -79,7 +79,7 @@ version=`./../gcc/gcc -dumpversion` # Where to find texinfo.tex to format docn with TeX TEXIDIR = $(srcdir)/../texinfo -MANPAGES= ar nm objdump ranlib size strings strip c++filt objcopy +MANPAGES= ar nm objdump ranlib size strings strip c++filt objcopy nlmconv #CC=gcc -Wall # these two are almost the same program @@ -115,8 +115,10 @@ INCLUDES = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) #### host and target dependant Makefile fragments come in here. ### +ALL_CFLAGS = $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS) + .c.o: - $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS) $< + $(CC) -c $(ALL_CFLAGS) $< # ## Random definitions @@ -130,6 +132,8 @@ INCLUDES = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) # fail unnecessarily. I've also seen some Unix malloc's fail, even when # there is enough memory. So use the new GNU malloc. # MALLOC = gmalloc.o +# Use this if the system malloc is good enough. +MALLOC = # Use the GNU getopt unless you have problems with it. # The IRIS version could probably benefit from being assembled with @@ -232,7 +236,7 @@ cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h demangle.o $(DEMANGLER_PROG): cplus-dem.o $(LIBIBERTY) underscore.o version.o $(CC) $(CFLAGS) $(LDFLAGS) -o $(DEMANGLER_PROG) cplus-dem.o $(LIBIBERTY) $(EXTRALIBS) underscore.o version.o -arparse.c: arparse.y +arparse.h arparse.c: arparse.y $(BISON) $(BISONFLAGS) $(srcdir)/arparse.y -mv y.tab.c arparse.c -mv y.tab.h arparse.h @@ -271,6 +275,10 @@ nlmheader.c: nlmheader.y rm -f nlmheader.c -mv y.tab.c nlmheader.c +nlmconv.o: nlmconv.c + ldname=`t='$(program_transform_name)'; echo ld | sed -e "" $$t`; \ + $(CC) -c -DLD_NAME="\"$${ldname}\"" $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS) $(srcdir)/nlmconv.c + $(NLMCONV_PROG): nlmconv.o nlmheader.o $(ADDL_LIBS) $(BFD) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ nlmconv.o nlmheader.o $(ADDL_LIBS) $(EXTRALIBS) @@ -282,7 +290,7 @@ $(NLMCONV_PROG): nlmconv.o nlmheader.o $(ADDL_LIBS) $(BFD) bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ - $(INCDIR)/fopen-same.h + $(INCDIR)/fopen-same.h bucomm.h filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ $(INCDIR)/fopen-same.h @@ -319,8 +327,8 @@ is-ranlib.o: is-ranlib.c not-strip.o: not-strip.c nlmheader.o: nlmheader.c nlmconv.h $(INCDIR)/nlm/common.h \ $(INCDIR)/nlm/internal.h -nlmconv.o: nlmconv.c nlmconv.h $(INCDIR)/nlm/common.h \ - $(INCDIR)/nlm/internal.h $(BFDDIR)/libnlm.h bucomm.h +nlmconv.o: $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ + $(BFDDIR)/libnlm.h bucomm.h stage1: force - mkdir stage1 diff --git a/binutils/ar.c b/binutils/ar.c index 5b5df6114c..ec6b50884a 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -1,5 +1,5 @@ /* ar.c - Archive modify and extract. - Copyright 1991, 1992 Free Software Foundation, Inc. + Copyright 1991, 1992, 1994 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -28,7 +28,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "sysdep.h" #include "bucomm.h" #include "aout/ar.h" -#include "../bfd/libbfd.h" +#include "libbfd.h" #include "arsup.h" #include #ifdef POSIX_UTIME @@ -334,7 +334,7 @@ main(argc, argv) mri_mode = 1; break; default: - fprintf(stderr, "%s: illegal option -- %c", program_name, c); + fprintf(stderr, "%s: illegal option -- %c\n", program_name, c); usage (); } } diff --git a/binutils/objdump.c b/binutils/objdump.c index 5da041cdca..9214f0634a 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -1,5 +1,5 @@ /* objdump.c -- dump information about an object file. - Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -219,9 +219,10 @@ int remove_useless_symbols (syms, count) } -/* Sort symbols into value order */ +/* Sort symbols into value order. */ + static int -comp (ap, bp) +compare_symbols (ap, bp) PTR ap; PTR bp; { @@ -431,7 +432,7 @@ disassemble_data (abfd) symcount = remove_useless_symbols (syms, symcount); /* Sort the symbols into section and symbol order */ - (void) qsort (syms, symcount, sizeof (asymbol *), comp); + (void) qsort (syms, symcount, sizeof (asymbol *), compare_symbols); if (machine != (char *) NULL) { -- 2.34.1