zlsiial@uts.mcc.ac.uk (A.V. Le Blanc) (02/03/91)
I have now got gas 1.38.1 to work on hp9000/300's under HPUX 7.0.
The following unified diffs file (processed by patch 2.0.12u3)
contains the alterations -- trivial but a pain to have to
find out. Note that this assumes that a working malloc.o
is in the file ../malloc/$(CC)/malloc.o, where CC may be
cc, gcc, or, as here, ggcc (GNU cc using gas), and that
the latest release of binutils/hp-include can be accessed
as ../binutils/hp-include.
A. V. Le Blanc
ZLSIIAL@UK.AC.MCC.CMS
diff -ru2N gas-1.38/Makefile gas-hp/Makefile
--- gas-1.38/Makefile Thu Oct 18 21:26:42 1990
+++ gas-hp/Makefile Sun Feb 3 12:54:10 1991
@@ -22,10 +22,11 @@
BINDIR = /usr/local/bin
-#CC=gcc
+CC=ggcc
# If you are on a BSD system, un-comment the next two lines, and comment out
# the lines for SystemV and HPUX below
-G0 = -g -I. #-O -Wall
+G0 = -O -I. -I../binutils/hp-include -DUSG -Da_info=a_magic
LDFLAGS = $(CFLAGS)
+LOADLIBES = malloc.o
#
# To compile gas on a System Five machine, comment out the two lines above
@@ -122,5 +123,5 @@
G1 = # -DUSE_SYSTEM_HDR
-G2 = # -DUSE_HP_HDR
+G2 = -DUSE_HP_HDR
G3 = # -DSUN_ASM_SYNTAX
@@ -258,5 +259,5 @@
$(CC) $(CFLAGS) $(OPTIONS) -c m68k.c
-a68: $a $y
+a68: $a $y malloc.o
$(CC) -o a68 $(LDFLAGS) $a $y $(LOADLIBES)
@@ -318,4 +319,5 @@
clean:
rm -f a avax a68 a386 a32k asparc $a $v $w $x $y $z a core gmon.out bugs a.out
+ rm -f malloc.o m68k.h
install: a
@@ -342,5 +344,6 @@
#gdb-symbols.o: a.out.gnu.h as.h struc-symbol.h
hash.o: hash.h
-input-file.o: input-file.h
+input-file.o: input-file.c input-file.h
+ $(CC) $(CFLAGS) -DVMS -c input-file.c
input-scrub.o: as.h input-file.h read.h
messages.o: as.h
@@ -355,2 +358,6 @@
flonum.h: bignum.h
+malloc.o:
+ ln -s ../malloc/$(CC)/malloc.o .
+m68k.h: m-hpux.h
+ ln -s m-hpux.h m68k.h
diff -ru2N gas-1.38/struc-symbol.h gas-hp/struc-symbol.h
--- gas-1.38/struc-symbol.h Fri Jul 6 19:43:12 1990
+++ gas-hp/struc-symbol.h Sun Feb 3 12:46:22 1991
@@ -18,6 +18,8 @@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-#ifndef VMS
+#if !defined(VMS) && !defined(hpux)
#include "a.out.gnu.h" /* Needed to define struct nlist. Sigh. */
+#elif defined(hpux)
+#include "a.out.h"
#else
#include "a_out.h"
diff -ru2N gas-1.38/xmalloc.c gas-hp/xmalloc.c
--- gas-1.38/xmalloc.c Wed Mar 1 22:48:34 1989
+++ gas-hp/xmalloc.c Sun Feb 3 12:31:00 1991
@@ -41,5 +41,7 @@
*/
#ifdef USG
+#ifndef hpux
#include <malloc.h>
+#endif
#endif
diff -ru2N gas-1.38/xrealloc.c gas-hp/xrealloc.c
--- gas-1.38/xrealloc.c Wed Mar 1 22:48:33 1989
+++ gas-hp/xrealloc.c Sun Feb 3 12:31:41 1991
@@ -43,5 +43,7 @@
#ifdef USG
+#ifndef hpux
#include <malloc.h>
+#endif
#endif