Subject: NetBSD updates for bcc (used for dosemu)
To: None <bde@zeta.org.au, port-i386@NetBSD.ORG>
From: John Kohl <jtk@atria.com>
List: port-i386
Date: 04/03/1995 10:25:42
Bruce (and port-i386),
Here are patches for bcc for NetBSD-current.
I'm not sure of a better way to do the POSIX_SOURCE makefile
stuff--maybe you could put it in comments and let the person doing the
compile adjust the Makefile.
==John
===================================================================
RCS file: as/RCS/Makefile,v
retrieving revision 1.1
diff -c -r1.1 as/Makefile
*** 1.1 1995/03/29 23:32:10
--- as/Makefile 1995/03/29 23:33:22
***************
*** 1,5 ****
! CFLAGS =-O
LDFLAGS =
OBJS =as.o assemble.o error.o express.o \
genbin.o genlist.o genobj.o gensym.o \
--- 1,6 ----
! CFLAGS =-O -D_POSIX_SOURCE
LDFLAGS =
+ VPATH=../ld
OBJS =as.o assemble.o error.o express.o \
genbin.o genlist.o genobj.o gensym.o \
===================================================================
RCS file: ld/RCS/Makefile,v
retrieving revision 1.1
diff -c -r1.1 ld/Makefile
*** 1.1 1995/03/29 23:34:40
--- ld/Makefile 1995/03/29 23:37:32
***************
*** 14,18 ****
--- 14,21 ----
ld.o: ld.c const.h config.h byteord.h type.h globvar.h
readobj.o: readobj.c const.h config.h byteord.h obj.h type.h globvar.h
table.o: table.c const.h config.h align.h obj.h type.h globvar.h
+
typeconv.o: typeconv.c const.h config.h type.h globvar.h
+ $(CC) $(CFLAGS) -D_POSIX_SOURCE -c typeconv.c
+
writebin.o: writebin.c const.h config.h obj.h type.h globvar.h
===================================================================
RCS file: ld/RCS/writebin.c,v
retrieving revision 1.1
diff -c -r1.1 ld/writebin.c
*** 1.1 1995/03/29 23:35:51
--- ld/writebin.c 1995/03/30 00:54:36
***************
*** 12,17 ****
--- 12,21 ----
#else
# ifdef BSD_A_OUT
# ifdef STANDARD_GNU_A_OUT
+ # ifdef __NetBSD__
+ # include <sys/cdefs.h>
+ # include <sys/types.h>
+ # endif
# include <a.out.h>
# define RELOC_INFO_SIZE 8 /* unportable bitfields - bcc doesn't pack */
# else
***************
*** 918,925 ****
--- 922,933 ----
#ifdef N_SET_MAGIC
N_SET_MAGIC(header, OMAGIC);
#else
+ #ifdef N_SETMAGIC
+ N_SETMAGIC(header,OMAGIC,MID_I386,0);
+ #else
*(unsigned short *) &header.a_magic = OMAGIC; /* XXX - works for 386BSD */
#endif
+ #endif
#else
header.a_magic[0] = A_MAGIC0;
header.a_magic[1] = A_MAGIC1;