Can now compile hello program, it aborts at the first unimplemented system call
authorNick Downing <downing.nick@gmail.com>
Thu, 19 Jan 2017 12:45:35 +0000 (23:45 +1100)
committerNick Downing <downing.nick@gmail.com>
Thu, 19 Jan 2017 12:45:35 +0000 (23:45 +1100)
25 files changed:
.gitignore
lib/libstdc/Makefile
lib/libstdc/compat-4.1/Makefile
lib/libstdc/compat-sys5/Makefile
lib/libstdc/gen/Makefile
lib/libstdc/inet/Makefile
lib/libstdc/linux/Makefile
lib/libstdc/linux/csu/Makefile
lib/libstdc/linux/gen/Makefile [new file with mode: 0644]
lib/libstdc/linux/gen/abort.c [new file with mode: 0644]
lib/libstdc/linux/linuxlib [deleted file]
lib/libstdc/linux/sys/Makefile
lib/libstdc/linux/sys/write.c
lib/libstdc/mkpostpatch.sh
lib/libstdc/n.sh
lib/libstdc/net/Makefile
lib/libstdc/net/hosttable/Makefile
lib/libstdc/net/named/Makefile
lib/libstdc/ns/Makefile
lib/libstdc/post.patch
lib/libstdc/stdio/Makefile
lib/libstdc/sys/Makefile [new file with mode: 0644]
test/hello.c [new file with mode: 0644]
test/n.sh [new file with mode: 0755]
xify/xify.c

index 16f0dd2..63b210a 100644 (file)
@@ -4,6 +4,7 @@
 *.oldprotos
 *.protos
 *.protos.nocomm
+*.temp.c
 *.usedby
 *.uses
 cproto-4.6/Makefile
@@ -18,9 +19,22 @@ cproto-4.6/y.tab.c
 lib/libstdc.pre
 lib/libstdc.post
 lib/libstdc/*.temp
-lib/libstdc/xx*
+lib/libstdc/compat-4.1/compat-4.1lib
+lib/libstdc/compat-sys5/compat-sys5lib
+lib/libstdc/gen/genlib
+lib/libstdc/inet/inetlib
+lib/libstdc/linux/gen/genlib
+lib/libstdc/linux/linuxlib
+lib/libstdc/linux/sys/syslib
+lib/libstdc/net/named/hostlib
+lib/libstdc/net/netlib
+lib/libstdc/ns/nslib
 lib/libstdc/pre.patch.bak
 lib/libstdc/post.patch.bak
+lib/libstdc/stdio/stdiolib
+lib/libstdc/sys/syslib
+lib/libstdc/xx*
+test/hello
 xify/newline
 xify/nocomment
 xify/nostring
index 3952bf0..f39ce2d 100644 (file)
@@ -1,4 +1,4 @@
-ROOT=../..
+ROOT=${shell pwd}/../..
 DESTDIR=${ROOT}/cross
 #
 # Copyright (c) 1980 Regents of the University of California.
@@ -48,8 +48,7 @@ MACHINE=linux
 #vax
 DEFS=
 COMPAT=        compat-4.1 compat-sys5
-ALL=   ${MACHINE}
-#gen inet net ns stdio ${MACHINE} ${COMPAT}
+ALL=   gen inet net ns stdio sys ${COMPAT} ${MACHINE}
 TAGSFILE=tags
 
 #libc.a libc_p.a: ${MACHINE}/csu ${ALL} net/${HOSTLOOKUP}
@@ -79,10 +78,12 @@ ${MACHINE}/csu ${ALL} net/${HOSTLOOKUP}: FRC
 FRC:
 
 install: 
-       ${INSTALL} libc.a ${DESTDIR}/lib/libc.a
-       ranlib ${DESTDIR}/lib/libc.a
-       ${INSTALL} libc_p.a ${DESTDIR}/usr/lib/libc_p.a
-       ranlib ${DESTDIR}/usr/lib/libc_p.a
+#      ${INSTALL} libc.a ${DESTDIR}/lib/libc.a
+#      ranlib ${DESTDIR}/lib/libc.a
+#      ${INSTALL} libc_p.a ${DESTDIR}/usr/lib/libc_p.a
+#      ranlib ${DESTDIR}/usr/lib/libc_p.a
+       ${INSTALL} libc.a ${DESTDIR}/lib/libx_c.a
+       ranlib ${DESTDIR}/lib/libx_c.a
        cd ${MACHINE}/csu; make DESTDIR=${DESTDIR} install
 
 tags:
index 927aac7..91591f0 100644 (file)
@@ -1,3 +1,5 @@
+ROOT=../../..
+CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
 #
 # Copyright (c) 1980 Regents of the University of California.
 # All rights reserved.  The Berkeley software License Agreement
@@ -18,16 +20,19 @@ OBJS=       ${STD} ${TRASH}
 TAGSFILE=tags
 
 .c.o:
-       ${CC} -p ${CFLAGS} -c $*.c
-       -ld -X -r $*.o
-       mv a.out profiled/$*.o
-       ${CC} ${CFLAGS} -c $*.c
-       -ld -x -r $*.o
-       mv a.out $*.o
+#      ${CC} -p ${CFLAGS} -c $*.c
+#      -ld -X -r $*.o
+#      mv a.out profiled/$*.o
+#      ${CC} ${CFLAGS} -c $*.c
+#      -ld -x -r $*.o
+#      mv a.out $*.o
+       ${ROOT}/xify/xify.sh <$< >$*.temp.c
+       ${CC} -o $@ -c $*.temp.c
 
-compat-4.1lib compat-4.1lib_p: ${OBJS}
-       @echo "building profiled compat-4.1lib"
-       @cd profiled; ar cru ../compat-4.1lib_p ${OBJS}
+#compat-4.1lib compat-4.1lib_p: ${OBJS}
+compat-4.1lib: ${OBJS}
+#      @echo "building profiled compat-4.1lib"
+#      @cd profiled; ar cru ../compat-4.1lib_p ${OBJS}
        @echo "buiding normal compat-4.1lib"
        @ar cru compat-4.1lib ${OBJS}
 
@@ -38,7 +43,7 @@ tags:
        done
 
 clean:
-       rm -f compat-4.1lib compat-4.1lib_p *.o profiled/*.o tags Makefile.bak
+       rm -f compat-4.1lib compat-4.1lib_p *.temp.c *.o profiled/*.o tags Makefile.bak
 
 depend:
        for i in ${SRCS}; do \
@@ -59,4 +64,3 @@ depend:
 
 # DO NOT DELETE THIS LINE -- make depend uses it
 
-
index 4aa6b25..d569651 100644 (file)
@@ -1,3 +1,5 @@
+ROOT=../../..
+CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
 #      Makefile        1.5     85/09/05
 #
 CFLAGS=        -O ${DEFS}
@@ -10,16 +12,19 @@ OBJS=       getopt.o memccpy.o memchr.o memcmp.o memcpy.o memset.o \
 TAGSFILE=tags
 
 .c.o:
-       ${CC} -p ${CFLAGS} -c $*.c
-       -ld -X -r $*.o
-       mv a.out profiled/$*.o
-       ${CC} ${CFLAGS} -c $*.c
-       -ld -x -r $*.o
-       mv a.out $*.o
+#      ${CC} -p ${CFLAGS} -c $*.c
+#      -ld -X -r $*.o
+#      mv a.out profiled/$*.o
+#      ${CC} ${CFLAGS} -c $*.c
+#      -ld -x -r $*.o
+#      mv a.out $*.o
+       ${ROOT}/xify/xify.sh <$< >$*.temp.c
+       ${CC} -o $@ -c $*.temp.c
 
-compat-sys5lib compat-sys5lib_p: ${OBJS}
-       @echo "building profiled compat-sys5lib"
-       @cd profiled; ar cru ../compat-sys5lib_p ${OBJS}
+#compat-sys5lib compat-sys5lib_p: ${OBJS}
+compat-sys5lib: ${OBJS}
+#      @echo "building profiled compat-sys5lib"
+#      @cd profiled; ar cru ../compat-sys5lib_p ${OBJS}
        @echo "buiding normal compat-sys5lib"
        @ar cru compat-sys5lib ${OBJS}
 
@@ -30,7 +35,7 @@ tags:
        done
 
 clean:
-       rm -f compat-sys5lib compat-sys5lib_p *.o profiled/*.o Makefile.bak
+       rm -f compat-sys5lib compat-sys5lib_p *.temp.c *.o profiled/*.o Makefile.bak
 
 depend:
        for i in ${SRCS}; do \
@@ -51,22 +56,3 @@ depend:
 
 # DO NOT DELETE THIS LINE -- make depend uses it
 
-getopt.o: getopt.c /usr/include/stdio.h
-memccpy.o: memccpy.c
-memchr.o: memchr.c
-memcmp.o: memcmp.c
-memcpy.o: memcpy.c
-memset.o: memset.c
-strcatn.o: strcatn.c
-strchr.o: strchr.c
-strcmpn.o: strcmpn.c
-strcpyn.o: strcpyn.c
-strcspn.o: strcspn.c
-strpbrk.o: strpbrk.c
-strrchr.o: strrchr.c
-strspn.o: strspn.c
-strtok.o: strtok.c
-tmpnam.o: tmpnam.c
-# DEPENDENCIES MUST END AT END OF FILE
-# IF YOU PUT STUFF HERE IT WILL GO AWAY
-# see make depend above
index 37273f7..41b4c29 100644 (file)
@@ -1,3 +1,5 @@
+ROOT=../../..
+CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
 #
 # Copyright (c) 1980 Regents of the University of California.
 # All rights reserved.  The Berkeley software License Agreement
@@ -5,66 +7,59 @@
 #
 #      @(#)Makefile    5.7 (Berkeley) 3/26/86
 #
-# Several routines have been rewritten in assembly language for the VAX.
-# If you are not running on a VAX, you should use the original C sources
-# which are included in this directory. Regretably we do not have a C
-# version of the bstring(3) routines.
-#
-#ifndef vax
-#SRCS= ${STDSRC} ${VAXSRC}
-#OBJS= ${STDOBJ} ${VAXOBJ}
-#else
-SRCS=  ${STDSRC}
-OBJS=  ${STDOBJ}
-#endif not vax
 
-CFLAGS=        -O ${DEFS}
-STDSRC=        abort.c alarm.c atoi.c atol.c calloc.c closedir.c crypt.c \
-       ctime.c ctype_.c errlst.c execvp.c fakcu.c fstab.c gcvt.c getenv.c \
+SRCS=  abort.c abs.c alarm.c atof.c atoi.c atol.c bcmp.c bcopy.c bzero.c \
+       calloc.c closedir.c crypt.c ctime.c ctype_.c disktab.c ecvt.c \
+       errlst.c execvp.c fakcu.c ffs.c frexp.c fstab.c gcvt.c getenv.c \
        getgrent.c getgrgid.c getgrnam.c getlogin.c getpass.c getpwent.c \
-       getpwnamuid.c getttyent.c getttynam.c getusershell.c getwd.c \
-       initgroups.c isatty.c malloc.c mkstemp.c mktemp.c ndbm.c nlist.c \
-       opendir.c perror.c popen.c psignal.c qsort.c random.c readdir.c \
-       regex.c scandir.c seekdir.c setgid.c setegid.c setrgid.c setuid.c \
-       seteuid.c setruid.c siglist.c signal.c siginterrupt.c sleep.c \
-       swab.c syslog.c system.c telldir.c time.c timezone.c ttyname.c \
-       ttyslot.c ualarm.c usleep.c valloc.c
-VAXSRC=        index.c rindex.c strcat.c strcmp.c strcpy.c strlen.c \
-       strncat.c strncmp.c strncpy.c
-STDOBJ=        abort.o alarm.o atoi.o atol.o calloc.o closedir.o crypt.o \
-       ctime.o ctype_.o errlst.o execvp.o fakcu.o fstab.o gcvt.o getenv.o \
+       getpwnamuid.c getttyent.c getttynam.c getusershell.c getwd.c index.c \
+       initgroups.c insque.c ldexp.c malloc.c mkstemp.c mktemp.c modf.c \
+       ndbm.c nlist.c opendir.c perror.c psignal.c qsort.c random.c \
+       readdir.c regex.c remque.c rindex.c scandir.c seekdir.c setegid.c \
+       seteuid.c setgid.c _setjmp.c setjmp.c setjmperr.c setrgid.c setruid.c \
+       setuid.c siginterrupt.c siglist.c signal.c sleep.c strcat.c strcmp.c \
+       strcpy.c strlen.c strncat.c strncmp.c strncpy.c swab.c syslog.c \
+       system.c telldir.c time.c timezone.c ttyname.c ttyslot.c ualarm.c \
+       usleep.c valloc.c
+OBJS=  abort.o abs.o alarm.o atof.o atoi.o atol.o bcmp.o bcopy.o bzero.o \
+       calloc.o closedir.o crypt.o ctime.o ctype_.o disktab.o ecvt.o \
+       errlst.o execvp.o fakcu.o ffs.o frexp.o fstab.o gcvt.o getenv.o \
        getgrent.o getgrgid.o getgrnam.o getlogin.o getpass.o getpwent.o \
-       getpwnamuid.o getttyent.o getttynam.o getusershell.o getwd.o \
-       initgroups.o isatty.o malloc.o mkstemp.o mktemp.o ndbm.o nlist.o \
-       opendir.o perror.o popen.o psignal.o qsort.o random.o readdir.o \
-       regex.o scandir.o seekdir.o setgid.o setegid.o setrgid.o setuid.o \
-       seteuid.o setruid.o siglist.o signal.o siginterrupt.o sleep.o \
-       swab.o syslog.o system.o telldir.o time.o timezone.o ttyname.o \
-       ttyslot.o ualarm.o usleep.o valloc.o
-VAXOBJ=        index.o rindex.o strcat.o strcmp.o strcpy.o strlen.o \
-       strncat.o strncmp.o strncpy.o
+       getpwnamuid.o getttyent.o getttynam.o getusershell.o getwd.o index.o \
+       initgroups.o insque.o ldexp.o malloc.o mkstemp.o mktemp.o modf.o \
+       ndbm.o nlist.o opendir.o perror.o psignal.o qsort.o random.o \
+       readdir.o regex.o remque.o rindex.o scandir.o seekdir.o setegid.o \
+       seteuid.o setgid.o _setjmp.o setjmp.o setjmperr.o setrgid.o setruid.o \
+       setuid.o siginterrupt.o siglist.o signal.o sleep.o strcat.o strcmp.o \
+       strcpy.o strlen.o strncat.o strncmp.o strncpy.o swab.o syslog.o \
+       system.o telldir.o time.o timezone.o ttyname.o ttyslot.o ualarm.o \
+       usleep.o valloc.o
+CFLAGS=        -O ${DEFS}
 TAGSFILE=tags
 
 .c.o:
-       ${CC} -p ${CFLAGS} -c $*.c
-       -ld -X -r $*.o
-       mv a.out profiled/$*.o
-       ${CC} ${CFLAGS} -c $*.c
-       -ld -x -r $*.o
-       mv a.out $*.o
+#      ${CC} -p ${CFLAGS} -c $*.c
+#      -ld -X -r $*.o
+#      mv a.out profiled/$*.o
+#      ${CC} ${CFLAGS} -c $*.c
+#      -ld -x -r $*.o
+#      mv a.out $*.o
+       ${ROOT}/xify/xify.sh <$< >$*.temp.c
+       ${CC} -o $@ -c $*.temp.c
 
 genlib genlib_p: ${OBJS}
-       @echo "building profiled genlib"
-       @cd profiled; ar cru ../genlib_p ${OBJS}
+genlib: ${OBJS}
+#      @echo "building profiled genlib"
+#      @cd profiled; ar cru ../genlib_p ${OBJS}
        @echo "buiding normal genlib"
        @ar cru genlib ${OBJS}
 
-errlst.o: errlst.c
-       cc -S ${DEFS} errlst.c
-       ed - <:errfix errlst.s
-       as -o errlst.o errlst.s
-       cp errlst.o profiled/errlst.o
-       rm errlst.s
+#errlst.o: errlst.c
+#      cc -S ${DEFS} errlst.c
+#      ed - <:errfix errlst.s
+#      as -o errlst.o errlst.s
+#      cp errlst.o profiled/errlst.o
+#      rm errlst.s
 
 tags:
        cwd=`pwd`; \
@@ -73,7 +68,7 @@ tags:
        done
 
 clean:
-       rm -f genlib genlib_p *.o profiled/*.o tags Makefile.bak
+       rm -f genlib genlib_p *.temp.c *.o profiled/*.o tags Makefile.bak
 
 depend:
        for i in ${SRCS}; do \
@@ -94,106 +89,3 @@ depend:
 
 # DO NOT DELETE THIS LINE -- make depend uses it
 
-abort.o: abort.c /usr/include/signal.h
-alarm.o: alarm.c /usr/include/sys/time.h /usr/include/time.h
-atoi.o: atoi.c
-atol.o: atol.c
-calloc.o: calloc.c
-closedir.o: closedir.c /usr/include/sys/param.h
-closedir.o: /usr/include/machine/machparam.h /usr/include/signal.h
-closedir.o: /usr/include/sys/types.h /usr/include/sys/dir.h
-crypt.o: crypt.c
-ctime.o: ctime.c /usr/include/sys/time.h /usr/include/time.h
-ctime.o: /usr/include/sys/types.h /usr/include/sys/timeb.h
-ctype_.o: ctype_.c /usr/include/ctype.h
-errlst.o: errlst.c
-execvp.o: execvp.c /usr/include/errno.h
-fakcu.o: fakcu.c
-fstab.o: fstab.c /usr/include/fstab.h /usr/include/stdio.h /usr/include/ctype.h
-gcvt.o: gcvt.c
-getenv.o: getenv.c
-getgrent.o: getgrent.c /usr/include/stdio.h /usr/include/grp.h
-getgrgid.o: getgrgid.c /usr/include/grp.h
-getgrnam.o: getgrnam.c /usr/include/grp.h
-getlogin.o: getlogin.c /usr/include/utmp.h
-getpass.o: getpass.c /usr/include/stdio.h /usr/include/signal.h
-getpass.o: /usr/include/sgtty.h /usr/include/sys/ioctl.h
-getpass.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h
-getpwent.o: getpwent.c /usr/include/stdio.h /usr/include/pwd.h
-getpwent.o: /usr/include/ndbm.h
-getpwnamuid.o: getpwnamuid.c /usr/include/stdio.h /usr/include/pwd.h
-getpwnamuid.o: /usr/include/ndbm.h /usr/include/sys/file.h
-getttyent.o: getttyent.c /usr/include/stdio.h /usr/include/strings.h
-getttyent.o: /usr/include/ttyent.h
-getttynam.o: getttynam.c /usr/include/ttyent.h
-getusershell.o: getusershell.c /usr/include/sys/param.h
-getusershell.o: /usr/include/machine/machparam.h /usr/include/signal.h
-getusershell.o: /usr/include/sys/types.h /usr/include/sys/file.h
-getusershell.o: /usr/include/sys/stat.h /usr/include/ctype.h
-getusershell.o: /usr/include/stdio.h
-getwd.o: getwd.c /usr/include/sys/param.h /usr/include/machine/machparam.h
-getwd.o: /usr/include/signal.h /usr/include/sys/types.h /usr/include/sys/stat.h
-getwd.o: /usr/include/sys/dir.h
-initgroups.o: initgroups.c /usr/include/stdio.h /usr/include/sys/param.h
-initgroups.o: /usr/include/machine/machparam.h /usr/include/signal.h
-initgroups.o: /usr/include/sys/types.h /usr/include/grp.h
-isatty.o: isatty.c /usr/include/sgtty.h /usr/include/sys/ioctl.h
-isatty.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h
-malloc.o: malloc.c /usr/include/sys/types.h
-mkstemp.o: mkstemp.c /usr/include/sys/file.h
-mktemp.o: mktemp.c
-ndbm.o: ndbm.c /usr/include/sys/types.h /usr/include/sys/stat.h
-ndbm.o: /usr/include/sys/file.h /usr/include/stdio.h /usr/include/errno.h
-ndbm.o: /usr/include/ndbm.h
-nlist.o: nlist.c /usr/include/sys/types.h /usr/include/a.out.h
-nlist.o: /usr/include/sys/exec.h /usr/include/stdio.h
-opendir.o: opendir.c /usr/include/sys/param.h /usr/include/machine/machparam.h
-opendir.o: /usr/include/signal.h /usr/include/sys/types.h
-opendir.o: /usr/include/sys/dir.h
-perror.o: perror.c /usr/include/sys/types.h /usr/include/sys/uio.h
-popen.o: popen.c /usr/include/stdio.h /usr/include/signal.h
-psignal.o: psignal.c /usr/include/signal.h
-qsort.o: qsort.c
-random.o: random.c /usr/include/stdio.h
-readdir.o: readdir.c /usr/include/sys/param.h /usr/include/machine/machparam.h
-readdir.o: /usr/include/signal.h /usr/include/sys/types.h
-readdir.o: /usr/include/sys/dir.h
-regex.o: regex.c
-scandir.o: scandir.c /usr/include/sys/types.h /usr/include/sys/stat.h
-scandir.o: /usr/include/sys/dir.h
-seekdir.o: seekdir.c /usr/include/sys/param.h /usr/include/machine/machparam.h
-seekdir.o: /usr/include/signal.h /usr/include/sys/types.h
-seekdir.o: /usr/include/sys/dir.h
-setgid.o: setgid.c
-setegid.o: setegid.c
-setrgid.o: setrgid.c
-setuid.o: setuid.c
-seteuid.o: seteuid.c
-setruid.o: setruid.c
-siglist.o: siglist.c /usr/include/signal.h
-signal.o: signal.c /usr/include/signal.h
-siginterrupt.o: siginterrupt.c /usr/include/signal.h
-sleep.o: sleep.c /usr/include/sys/time.h /usr/include/time.h
-sleep.o: /usr/include/signal.h
-swab.o: swab.c
-syslog.o: syslog.c /usr/include/sys/types.h /usr/include/sys/socket.h
-syslog.o: /usr/include/sys/file.h /usr/include/sys/signal.h
-syslog.o: /usr/include/sys/syslog.h /usr/include/netdb.h /usr/include/strings.h
-system.o: system.c /usr/include/signal.h
-telldir.o: telldir.c /usr/include/sys/param.h /usr/include/machine/machparam.h
-telldir.o: /usr/include/signal.h /usr/include/sys/types.h
-telldir.o: /usr/include/sys/dir.h
-time.o: time.c /usr/include/sys/types.h /usr/include/sys/time.h
-time.o: /usr/include/time.h
-timezone.o: timezone.c
-ttyname.o: ttyname.c /usr/include/sys/param.h /usr/include/machine/machparam.h
-ttyname.o: /usr/include/signal.h /usr/include/sys/types.h
-ttyname.o: /usr/include/sys/dir.h /usr/include/sys/stat.h
-ttyslot.o: ttyslot.c /usr/include/ttyent.h
-ualarm.o: ualarm.c /usr/include/sys/time.h /usr/include/time.h
-usleep.o: usleep.c /usr/include/sys/time.h /usr/include/time.h
-usleep.o: /usr/include/signal.h
-valloc.o: valloc.c
-# DEPENDENCIES MUST END AT END OF FILE
-# IF YOU PUT STUFF HERE IT WILL GO AWAY
-# see make depend above
index 39feaf1..a8d8c4c 100644 (file)
@@ -1,3 +1,5 @@
+ROOT=../../..
+CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
 #
 # Copyright (c) 1980 Regents of the University of California.
 # All rights reserved.  The Berkeley software License Agreement
@@ -16,16 +18,19 @@ CFLAGS=     -O ${DEFS}
 TAGSFILE=tags
 
 .c.o:
-       ${CC} -p -c ${CFLAGS} $*.c
-       -ld -X -r $*.o
-       mv a.out profiled/$*.o
-       ${CC} ${CFLAGS} -c $*.c
-       -ld -x -r $*.o
-       mv a.out $*.o
+#      ${CC} -p -c ${CFLAGS} $*.c
+#      -ld -X -r $*.o
+#      mv a.out profiled/$*.o
+#      ${CC} ${CFLAGS} -c $*.c
+#      -ld -x -r $*.o
+#      mv a.out $*.o
+       ${ROOT}/xify/xify.sh <$< >$*.temp.c
+       ${CC} -o $@ -c $*.temp.c
 
-inetlib inetlib_p: ${OBJS}
-       @echo "building profiled inetlib"
-       @cd profiled; ar cru ../inetlib_p ${OBJS}
+#inetlib inetlib_p: ${OBJS}
+inetlib: ${OBJS}
+#      @echo "building profiled inetlib"
+#      @cd profiled; ar cru ../inetlib_p ${OBJS}
        @echo "building normal inetlib"
        @ar cru inetlib ${OBJS}
 
@@ -36,7 +41,7 @@ tags:
        done
 
 clean:
-       rm -f inetlib inetlib_p *.o profiled/*.o errs a.out core \
+       rm -f inetlib inetlib_p *.temp.c *.o profiled/*.o errs a.out core \
                tags Makefile.bak
 
 depend:
@@ -58,14 +63,3 @@ depend:
 
 # DO NOT DELETE THIS LINE -- make depend uses it
 
-inet_addr.o: inet_addr.c /usr/include/sys/types.h /usr/include/ctype.h
-inet_addr.o: /usr/include/netinet/in.h
-inet_network.o: inet_network.c /usr/include/sys/types.h /usr/include/ctype.h
-inet_netof.o: inet_netof.c /usr/include/sys/types.h /usr/include/netinet/in.h
-inet_ntoa.o: inet_ntoa.c /usr/include/sys/types.h /usr/include/netinet/in.h
-inet_lnaof.o: inet_lnaof.c /usr/include/sys/types.h /usr/include/netinet/in.h
-inet_makeaddr.o: inet_makeaddr.c /usr/include/sys/types.h
-inet_makeaddr.o: /usr/include/netinet/in.h
-# DEPENDENCIES MUST END AT END OF FILE
-# IF YOU PUT STUFF HERE IT WILL GO AWAY
-# see make depend above
index 5f981b7..f07afc7 100644 (file)
@@ -8,7 +8,7 @@
 # Machine dependent routines for linux hosted are located here
 #
 #COMPAT=       compat-4.1
-ALL=   sys
+ALL=   gen sys
 #gen net stdio sys ${COMPAT}
 TAGSFILE=tags
 
index 100f8f9..0aee91a 100644 (file)
@@ -19,10 +19,6 @@ OBJS=        crt0.o
 # mcrt0.o gcrt0.o mon.o gmon.o
 TAGSFILE=tags
 
-.c.o:
-       ${ROOT}/xify/xify.sh <$< >$*.temp.c
-       ${CC} -o $@ -c $*.temp.c
-
 all: ${OBJS}
 
 install: ${OBJS}
@@ -30,13 +26,15 @@ install: ${OBJS}
 #      mv mcrt0.o ${DESTDIR}/lib/mcrt0.o
 #      mv gcrt0.o ${DESTDIR}/usr/lib/gcrt0.o
 
-#crt0.o:       crt0.c
+crt0.o:        crt0.c
 #      cc -S ${DFLAGS} -DCRT0 crt0.c
 #      /lib/cpp crt0.s > x.s
 #      as -o x.o x.s
 #      ld -x -r -o crt0.o x.o
 #      rm -f x.s x.o crt0.s
-#
+       ${ROOT}/xify/xify.sh <$< >$*.temp.c
+       ${CC} -o $@ -c $*.temp.c
+
 #moncrt0.o: crt0.c
 #      cc -S ${DFLAGS} -DMCRT0 crt0.c
 #      /lib/cpp crt0.s > x.s
diff --git a/lib/libstdc/linux/gen/Makefile b/lib/libstdc/linux/gen/Makefile
new file mode 100644 (file)
index 0000000..080aab3
--- /dev/null
@@ -0,0 +1,55 @@
+ROOT=../../../..
+CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
+#
+# Copyright (c) 1980 Regents of the University of California.
+# All rights reserved.  The Berkeley software License Agreement
+# specifies the terms and conditions for redistribution.
+#
+#      @(#)Makefile    5.4 (Berkeley) 9/5/85
+#
+
+SRCS=  abort.c
+OBJS=  abort.o
+TAGSFILE=tags
+
+.c.o:
+#      /lib/cpp -E ${DEFS} -DPROF $*.c | ${AS} -o $*.o
+#      -ld -x -r $*.o
+#      mv a.out profiled/$*.o
+#      /lib/cpp -E ${DEFS} $*.c | ${AS} -o $*.o
+#      -ld -x -r $*.o
+#      mv a.out $*.o
+       ${ROOT}/xify/xify.sh <$< >$*.temp.c
+       ${CC} -o $@ -c $*.temp.c
+
+#genlib genlib_p: ${OBJS}
+genlib: ${OBJS}
+#      @echo "building profiled genlib_p"
+#      @cd profiled; ar cru ../genlib_p ${OBJS}
+       @echo "building normal genlib_p"
+       @ar cru genlib ${OBJS}
+
+tags:
+
+clean:
+       rm -f genlib genlib_p *.temp.c ${OBJS} profiled/*.o tags Makefile.bak
+
+depend:
+       for i in ${SRCS}; do \
+           cc -M ${DEFS} $$i | awk ' { if ($$1 != prev) \
+               { if (rec != "") print rec; rec = $$0; prev = $$1; } \
+               else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
+               else rec = rec " " $$2 } } \
+               END { print rec } ' >> makedep; done
+       echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
+       echo '$$r makedep' >>eddep
+       echo 'w' >>eddep
+       cp Makefile Makefile.bak
+       ed - Makefile < eddep
+       rm eddep makedep
+       echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
+       echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
+       echo '# see make depend above' >> Makefile
+
+# DO NOT DELETE THIS LINE -- make depend uses it
+
diff --git a/lib/libstdc/linux/gen/abort.c b/lib/libstdc/linux/gen/abort.c
new file mode 100644 (file)
index 0000000..4f91e17
--- /dev/null
@@ -0,0 +1,6 @@
+#include <nox_stdlib.h>
+#include <gen.h>
+
+int abort() {
+       nox_abort();
+}
diff --git a/lib/libstdc/linux/linuxlib b/lib/libstdc/linux/linuxlib
deleted file mode 100644 (file)
index 7dfb507..0000000
Binary files a/lib/libstdc/linux/linuxlib and /dev/null differ
index d814d43..6c94f63 100644 (file)
@@ -12,14 +12,13 @@ SRCS=       write.c
 OBJS=  write.o
 TAGSFILE=tags
 
-#.c.o:
+.c.o:
 #      /lib/cpp -E ${DEFS} -DPROF $*.c | ${AS} -o $*.o
 #      -ld -x -r $*.o
 #      mv a.out profiled/$*.o
 #      /lib/cpp -E ${DEFS} $*.c | ${AS} -o $*.o
 #      -ld -x -r $*.o
 #      mv a.out $*.o
-.c.o:
        ${ROOT}/xify/xify.sh <$< >$*.temp.c
        ${CC} -o $@ -c $*.temp.c
 
@@ -33,7 +32,7 @@ syslib: ${OBJS}
 tags:
 
 clean:
-       rm -f syslib syslib_p ${OBJS} profiled/*.o *.temp.c tags Makefile.bak
+       rm -f syslib syslib_p *.temp.c ${OBJS} profiled/*.o tags Makefile.bak
 
 depend:
        for i in ${SRCS}; do \
index 6ec8965..675b43c 100644 (file)
@@ -1,5 +1,4 @@
 #include <nox_unistd.h>
-
 #include <sys/errno.h>
 #include <sys/file.h>
 
index 20221c5..df376fe 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 rm -f ../libstdc.post/post.patch ../libstdc.post/post.patch.bak post.patch.bak
 mv post.patch ../post.patch.bak
-(cd ..; diff --unified --recursive --new-file --exclude=*.o --exclude=x libstdc.post libstdc >post.patch)
+(cd ..; diff --unified --recursive --new-file --exclude=[abcdefghijklmnopqrstuvwxyz] --exclude=*.a --exclude=*.o --exclude=*.[ch].nocomm --exclude=*.[ch].protos --exclude=*.[ch].protos.nocomm --exclude=*.temp.c --exclude=*.[ch].usedby --exclude=*.[ch].uses libstdc.post libstdc >post.patch)
 mv ../post.patch.bak ../post.patch .
 wc -l post.patch post.patch.bak
index e18cca2..4e55e5c 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-rm -rf *.c *.h *.o *.orig *.[ch].nocomm *.[ch].protos *.[ch].protos.nocomm *.temp.c *.[ch].usedby *.[ch].uses arpa compat-4.1 compat-sys5 csu gen inet linux machine net netimp netinet netns ns pascal protocols stdio sys vax vaxif vaxmba vaxuba xx*
+rm -rf *.c *.h *.a *.o *.[ch].nocomm *.[ch].protos *.[ch].protos.nocomm *.temp.c *.[ch].usedby *.[ch].uses arpa compat-4.1 compat-sys5 csu gen inet linux machine net netimp netinet netns ns pascal protocols stdio sys vax vaxif vaxmba vaxuba xx*
 
 find ../libc \( -name '*.[cs]' -o -name Makefile \) -print |\
 sed -e 's:^\.\./libc/::' |\
index 1ece853..fa9a60d 100644 (file)
@@ -1,3 +1,5 @@
+ROOT=../../..
+CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
 #
 # Copyright (c) 1983 Regents of the University of California.
 # All rights reserved.  The Berkeley software License Agreement
@@ -21,16 +23,19 @@ CFLAGS=     -O ${DEFS}
 TAGSFILE=tags
 
 .c.o:
-       ${CC} -p -c ${CFLAGS} $*.c
-       -ld -X -r $*.o
-       mv a.out profiled/$*.o
-       ${CC} ${CFLAGS} -c $*.c
-       -ld -x -r $*.o
-       mv a.out $*.o
+#      ${CC} -p -c ${CFLAGS} $*.c
+#      -ld -X -r $*.o
+#      mv a.out profiled/$*.o
+#      ${CC} ${CFLAGS} -c $*.c
+#      -ld -x -r $*.o
+#      mv a.out $*.o
+       ${ROOT}/xify/xify.sh <$< >$*.temp.c
+       ${CC} -o $@ -c $*.temp.c
 
-netlib netlib_p: ${OBJS}
-       @echo "building profiled netlib"
-       @cd profiled; ar cru ../netlib_p ${OBJS}
+#netlib netlib_p: ${OBJS}
+netlib: ${OBJS}
+#      @echo "building profiled netlib"
+#      @cd profiled; ar cru ../netlib_p ${OBJS}
        @echo "building normal netlib"
        @ar cru netlib ${OBJS}
 
@@ -41,7 +46,7 @@ tags:
        done
 
 clean:
-       rm -f *.o profiled/*.o errs a.out core netlib netlib_p \
+       rm -f *.temp.c *.o profiled/*.o errs a.out core netlib netlib_p \
                tags Makefile.bak
 
 depend:
@@ -63,54 +68,3 @@ depend:
 
 # DO NOT DELETE THIS LINE -- make depend uses it
 
-getnetbyaddr.o: getnetbyaddr.c /usr/include/netdb.h
-getnetent.o: getnetent.c /usr/include/stdio.h /usr/include/sys/types.h
-getnetent.o: /usr/include/sys/socket.h /usr/include/netdb.h
-getnetent.o: /usr/include/ctype.h
-getnetbyname.o: getnetbyname.c /usr/include/netdb.h
-getproto.o: getproto.c /usr/include/netdb.h
-getnetbyaddr.o: getnetbyaddr.c /usr/include/netdb.h
-getnetent.o: getnetent.c /usr/include/stdio.h /usr/include/sys/types.h
-getnetent.o: /usr/include/sys/socket.h /usr/include/netdb.h
-getnetent.o: /usr/include/ctype.h
-getnetbyname.o: getnetbyname.c /usr/include/netdb.h
-getproto.o: getproto.c /usr/include/netdb.h
-getprotoent.o: getprotoent.c /usr/include/stdio.h /usr/include/sys/types.h
-getprotoent.o: /usr/include/sys/socket.h /usr/include/netdb.h
-getprotoent.o: /usr/include/ctype.h
-getprotoname.o: getprotoname.c /usr/include/netdb.h
-getservent.o: getservent.c /usr/include/stdio.h /usr/include/sys/types.h
-getservent.o: /usr/include/sys/socket.h /usr/include/netdb.h
-getservent.o: /usr/include/ctype.h
-getservbyport.o: getservbyport.c /usr/include/netdb.h
-getservbyname.o: getservbyname.c /usr/include/netdb.h
-rcmd.o: rcmd.c /usr/include/stdio.h /usr/include/ctype.h /usr/include/pwd.h
-rcmd.o: /usr/include/sys/param.h /usr/include/machine/machparam.h
-rcmd.o: /usr/include/signal.h /usr/include/sys/types.h
-rcmd.o: /usr/include/sys/socket.h /usr/include/sys/stat.h
-rcmd.o: /usr/include/netinet/in.h /usr/include/netdb.h /usr/include/errno.h
-rexec.o: rexec.c /usr/include/sys/types.h /usr/include/sys/socket.h
-rexec.o: /usr/include/netinet/in.h /usr/include/stdio.h /usr/include/netdb.h
-rexec.o: /usr/include/errno.h
-ruserpass.o: ruserpass.c /usr/include/stdio.h /usr/include/utmp.h
-ruserpass.o: /usr/include/ctype.h /usr/include/sys/types.h
-ruserpass.o: /usr/include/sys/stat.h /usr/include/errno.h
-res_comp.o: res_comp.c /usr/include/sys/types.h /usr/include/stdio.h
-res_comp.o: /usr/include/arpa/nameser.h
-res_debug.o: res_debug.c /usr/include/sys/types.h /usr/include/netinet/in.h
-res_debug.o: /usr/include/stdio.h /usr/include/arpa/nameser.h
-res_init.o: res_init.c /usr/include/sys/types.h /usr/include/sys/socket.h
-res_init.o: /usr/include/netinet/in.h /usr/include/stdio.h
-res_init.o: /usr/include/arpa/nameser.h /usr/include/resolv.h
-res_mkquery.o: res_mkquery.c /usr/include/stdio.h /usr/include/sys/types.h
-res_mkquery.o: /usr/include/netinet/in.h /usr/include/arpa/nameser.h
-res_mkquery.o: /usr/include/resolv.h
-res_send.o: res_send.c /usr/include/sys/param.h
-res_send.o: /usr/include/machine/machparam.h /usr/include/signal.h
-res_send.o: /usr/include/sys/types.h /usr/include/sys/time.h
-res_send.o: /usr/include/time.h /usr/include/sys/socket.h
-res_send.o: /usr/include/netinet/in.h /usr/include/stdio.h /usr/include/errno.h
-res_send.o: /usr/include/arpa/nameser.h /usr/include/resolv.h
-# DEPENDENCIES MUST END AT END OF FILE
-# IF YOU PUT STUFF HERE IT WILL GO AWAY
-# see make depend above
index 60d43e3..e1eb01d 100644 (file)
@@ -1,3 +1,5 @@
+ROOT=../../../..
+CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
 
 #
 # Copyright (c) 1983 Regents of the University of California.
@@ -12,16 +14,18 @@ SRCS=       gethostnamadr.c gethostent.c
 CFLAGS=        -O ${DEFS}
 
 .c.o: 
-       ${CC} -p -c ${CFLAGS} $*.c
-       -ld -X -r $*.o
-       mv a.out profiled/$*.o
-       ${CC} ${CFLAGS} -c $*.c
-       -ld -x -r $*.o
-       mv a.out $*.o
+#      ${CC} -p -c ${CFLAGS} $*.c
+#      -ld -X -r $*.o
+#      mv a.out profiled/$*.o
+#      ${CC} ${CFLAGS} -c $*.c
+#      -ld -x -r $*.o
+#      mv a.out $*.o
+       ${ROOT}/xify/xify.sh <$< >$*.temp.c
+       ${CC} -o $@ -c $*.temp.c
 
 hostlib hostlib_p: ${OBJS} 
-       @echo "building profiled hostlib"
-       @cd profiled; ar cru ../hostlib_p ${OBJS}
+#      @echo "building profiled hostlib"
+#      @cd profiled; ar cru ../hostlib_p ${OBJS}
        @echo "building normal netlib"
        @ar cru hostlib ${OBJS}
        
@@ -32,7 +36,7 @@ tags:
        done
 
 clean:
-       rm -f *.o errs a.out core hostlib hostlib_p profiled/*.o \
+       rm -f *.temp.c *.o errs a.out core hostlib hostlib_p profiled/*.o \
                tags Makefile.bak
 
 depend:
@@ -54,11 +58,3 @@ depend:
 
 # DO NOT DELETE THIS LINE -- make depend uses it
 
-gethostnamadr.o: gethostnamadr.c /usr/include/stdio.h /usr/include/netdb.h
-gethostnamadr.o: /usr/include/sys/file.h /usr/include/ndbm.h
-gethostent.o: gethostent.c /usr/include/stdio.h /usr/include/sys/types.h
-gethostent.o: /usr/include/sys/socket.h /usr/include/netdb.h
-gethostent.o: /usr/include/ctype.h /usr/include/ndbm.h
-# DEPENDENCIES MUST END AT END OF FILE
-# IF YOU PUT STUFF HERE IT WILL GO AWAY
-# see make depend above
index 2ebd29e..656ae5e 100644 (file)
@@ -16,14 +16,13 @@ CFLAGS= -O ${DEFS}
 TAGSFILE= tags
 DESTDIR=
 
-#.c.o:
+.c.o:
 #      ${CC} -p -c ${CFLAGS} $*.c
 #      -ld -X -r $*.o
 #      mv a.out profiled/$*.o
 #      ${CC} ${CFLAGS} -c $*.c
 #      -ld -x -r $*.o
 #      mv a.out $*.o
-.c.o:
        ${ROOT}/xify/xify.sh <$< >$*.temp.c
        ${CC} -o $@ -c $*.temp.c
 
@@ -41,7 +40,7 @@ tags:
        done
 
 clean:
-       rm -f *.o *.temp.c errs a.out core hostlib hostlib_p profiled/*.o \
+       rm -f *.temp.c *.o errs a.out core hostlib hostlib_p profiled/*.o \
                tags Makefile.bak
 
 depend:
index eda3122..45a50f3 100644 (file)
@@ -1,3 +1,5 @@
+ROOT=../../..
+CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
 #
 # Copyright (c) 1980 Regents of the University of California.
 # All rights reserved.  The Berkeley software License Agreement
@@ -12,16 +14,19 @@ CFLAGS=     -O ${DEFS}
 TAGSFILE=tags
 
 .c.o:
-       ${CC} -p -c ${CFLAGS} $*.c
-       -ld -X -r $*.o
-       mv a.out profiled/$*.o
-       ${CC} ${CFLAGS} -c $*.c
-       -ld -x -r $*.o
-       mv a.out $*.o
-
-nslib nslib_p: ${OBJS}
-       @echo "building profiled nslib"
-       @cd profiled; ar cru ../nslib_p ${OBJS}
+#      ${CC} -p -c ${CFLAGS} $*.c
+#      -ld -X -r $*.o
+#      mv a.out profiled/$*.o
+#      ${CC} ${CFLAGS} -c $*.c
+#      -ld -x -r $*.o
+#      mv a.out $*.o
+       ${ROOT}/xify/xify.sh <$< >$*.temp.c
+       ${CC} -o $@ -c $*.temp.c
+
+#nslib nslib_p: ${OBJS}
+nslib: ${OBJS}
+#      @echo "building profiled nslib"
+#      @cd profiled; ar cru ../nslib_p ${OBJS}
        @echo "building normal nslib"
        @ar cru nslib ${OBJS}
 
@@ -32,7 +37,7 @@ tags:
        done
 
 clean:
-       rm -f nslib nslib_p *.o profiled/*.o errs a.out core \
+       rm -f nslib nslib_p *.temp.c *.o profiled/*.o errs a.out core \
                tags Makefile.bak
 
 depend:
@@ -54,8 +59,3 @@ depend:
 
 # DO NOT DELETE THIS LINE -- make depend uses it
 
-ns_addr.o: ns_addr.c /usr/include/sys/types.h /usr/include/netns/ns.h
-ns_ntoa.o: ns_ntoa.c /usr/include/sys/types.h /usr/include/netns/ns.h
-# DEPENDENCIES MUST END AT END OF FILE
-# IF YOU PUT STUFF HERE IT WILL GO AWAY
-# see make depend above
index 2da635c..284e1f3 100644 (file)
@@ -1,4 +1,128 @@
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/bcopy.c libstdc/gen/bcopy.c
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/compat-4.1/Makefile libstdc/compat-4.1/Makefile
+--- libstdc.post/compat-4.1/Makefile   2017-01-19 22:06:11.264034965 +1100
++++ libstdc/compat-4.1/Makefile        2017-01-19 22:54:49.688875325 +1100
+@@ -1,3 +1,5 @@
++ROOT=../../..
++CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
+ #
+ # Copyright (c) 1980 Regents of the University of California.
+ # All rights reserved.  The Berkeley software License Agreement
+@@ -18,16 +20,19 @@
+ TAGSFILE=tags
+ .c.o:
+-      ${CC} -p ${CFLAGS} -c $*.c
+-      -ld -X -r $*.o
+-      mv a.out profiled/$*.o
+-      ${CC} ${CFLAGS} -c $*.c
+-      -ld -x -r $*.o
+-      mv a.out $*.o
+-
+-compat-4.1lib compat-4.1lib_p: ${OBJS}
+-      @echo "building profiled compat-4.1lib"
+-      @cd profiled; ar cru ../compat-4.1lib_p ${OBJS}
++#     ${CC} -p ${CFLAGS} -c $*.c
++#     -ld -X -r $*.o
++#     mv a.out profiled/$*.o
++#     ${CC} ${CFLAGS} -c $*.c
++#     -ld -x -r $*.o
++#     mv a.out $*.o
++      ${ROOT}/xify/xify.sh <$< >$*.temp.c
++      ${CC} -o $@ -c $*.temp.c
++
++#compat-4.1lib compat-4.1lib_p: ${OBJS}
++compat-4.1lib: ${OBJS}
++#     @echo "building profiled compat-4.1lib"
++#     @cd profiled; ar cru ../compat-4.1lib_p ${OBJS}
+       @echo "buiding normal compat-4.1lib"
+       @ar cru compat-4.1lib ${OBJS}
+@@ -38,7 +43,7 @@
+       done
+ clean:
+-      rm -f compat-4.1lib compat-4.1lib_p *.o profiled/*.o tags Makefile.bak
++      rm -f compat-4.1lib compat-4.1lib_p *.temp.c *.o profiled/*.o tags Makefile.bak
+ depend:
+       for i in ${SRCS}; do \
+@@ -59,4 +64,3 @@
+ # DO NOT DELETE THIS LINE -- make depend uses it
+-
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/compat-sys5/Makefile libstdc/compat-sys5/Makefile
+--- libstdc.post/compat-sys5/Makefile  2017-01-19 22:06:11.288035015 +1100
++++ libstdc/compat-sys5/Makefile       2017-01-19 22:59:10.709340817 +1100
+@@ -1,3 +1,5 @@
++ROOT=../../..
++CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
+ #     Makefile        1.5     85/09/05
+ #
+ CFLAGS=       -O ${DEFS}
+@@ -10,16 +12,19 @@
+ TAGSFILE=tags
+ .c.o:
+-      ${CC} -p ${CFLAGS} -c $*.c
+-      -ld -X -r $*.o
+-      mv a.out profiled/$*.o
+-      ${CC} ${CFLAGS} -c $*.c
+-      -ld -x -r $*.o
+-      mv a.out $*.o
+-
+-compat-sys5lib compat-sys5lib_p: ${OBJS}
+-      @echo "building profiled compat-sys5lib"
+-      @cd profiled; ar cru ../compat-sys5lib_p ${OBJS}
++#     ${CC} -p ${CFLAGS} -c $*.c
++#     -ld -X -r $*.o
++#     mv a.out profiled/$*.o
++#     ${CC} ${CFLAGS} -c $*.c
++#     -ld -x -r $*.o
++#     mv a.out $*.o
++      ${ROOT}/xify/xify.sh <$< >$*.temp.c
++      ${CC} -o $@ -c $*.temp.c
++
++#compat-sys5lib compat-sys5lib_p: ${OBJS}
++compat-sys5lib: ${OBJS}
++#     @echo "building profiled compat-sys5lib"
++#     @cd profiled; ar cru ../compat-sys5lib_p ${OBJS}
+       @echo "buiding normal compat-sys5lib"
+       @ar cru compat-sys5lib ${OBJS}
+@@ -30,7 +35,7 @@
+       done
+ clean:
+-      rm -f compat-sys5lib compat-sys5lib_p *.o profiled/*.o Makefile.bak
++      rm -f compat-sys5lib compat-sys5lib_p *.temp.c *.o profiled/*.o Makefile.bak
+ depend:
+       for i in ${SRCS}; do \
+@@ -51,22 +56,3 @@
+ # DO NOT DELETE THIS LINE -- make depend uses it
+-getopt.o: getopt.c /usr/include/stdio.h
+-memccpy.o: memccpy.c
+-memchr.o: memchr.c
+-memcmp.o: memcmp.c
+-memcpy.o: memcpy.c
+-memset.o: memset.c
+-strcatn.o: strcatn.c
+-strchr.o: strchr.c
+-strcmpn.o: strcmpn.c
+-strcpyn.o: strcpyn.c
+-strcspn.o: strcspn.c
+-strpbrk.o: strpbrk.c
+-strrchr.o: strrchr.c
+-strspn.o: strspn.c
+-strtok.o: strtok.c
+-tmpnam.o: tmpnam.c
+-# DEPENDENCIES MUST END AT END OF FILE
+-# IF YOU PUT STUFF HERE IT WILL GO AWAY
+-# see make depend above
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/gen/bcopy.c libstdc/gen/bcopy.c
 --- libstdc.post/gen/bcopy.c   2017-01-19 22:06:11.292035023 +1100
 +++ libstdc/gen/bcopy.c        2017-01-19 22:06:11.300035039 +1100
 @@ -1,6 +1,12 @@
@@ -34,7 +158,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
                                do      /* copy by bytes */
                                        *--dst = *--src;
                                while (--length);
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/getpass.c libstdc/gen/getpass.c
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/gen/getpass.c libstdc/gen/getpass.c
 --- libstdc.post/gen/getpass.c 2017-01-19 22:06:11.292035023 +1100
 +++ libstdc/gen/getpass.c      2017-01-19 22:06:11.300035039 +1100
 @@ -20,7 +20,7 @@
@@ -46,7 +170,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
  
        if ((fi = fdopen(open("/dev/tty", 2), "r")) == NULL)
                fi = stdin;
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/getpwnamuid.c libstdc/gen/getpwnamuid.c
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/gen/getpwnamuid.c libstdc/gen/getpwnamuid.c
 --- libstdc.post/gen/getpwnamuid.c     2017-01-19 22:06:11.292035023 +1100
 +++ libstdc/gen/getpwnamuid.c  2017-01-19 22:06:11.300035039 +1100
 @@ -44,19 +44,37 @@
@@ -87,7 +211,241 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
          return (&passwd);
  }
  
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/malloc.c libstdc/gen/malloc.c
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/gen/Makefile libstdc/gen/Makefile
+--- libstdc.post/gen/Makefile  2017-01-19 22:06:11.292035023 +1100
++++ libstdc/gen/Makefile       2017-01-19 23:21:58.643221214 +1100
+@@ -1,3 +1,5 @@
++ROOT=../../..
++CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
+ #
+ # Copyright (c) 1980 Regents of the University of California.
+ # All rights reserved.  The Berkeley software License Agreement
+@@ -5,66 +7,59 @@
+ #
+ #     @(#)Makefile    5.7 (Berkeley) 3/26/86
+ #
+-# Several routines have been rewritten in assembly language for the VAX.
+-# If you are not running on a VAX, you should use the original C sources
+-# which are included in this directory. Regretably we do not have a C
+-# version of the bstring(3) routines.
+-#
+-#ifndef vax
+-#SRCS=        ${STDSRC} ${VAXSRC}
+-#OBJS=        ${STDOBJ} ${VAXOBJ}
+-#else
+-SRCS= ${STDSRC}
+-OBJS= ${STDOBJ}
+-#endif not vax
+-CFLAGS=       -O ${DEFS}
+-STDSRC=       abort.c alarm.c atoi.c atol.c calloc.c closedir.c crypt.c \
+-      ctime.c ctype_.c errlst.c execvp.c fakcu.c fstab.c gcvt.c getenv.c \
++SRCS= abort.c abs.c alarm.c atof.c atoi.c atol.c bcmp.c bcopy.c bzero.c \
++      calloc.c closedir.c crypt.c ctime.c ctype_.c disktab.c ecvt.c \
++      errlst.c execvp.c fakcu.c ffs.c frexp.c fstab.c gcvt.c getenv.c \
+       getgrent.c getgrgid.c getgrnam.c getlogin.c getpass.c getpwent.c \
+-      getpwnamuid.c getttyent.c getttynam.c getusershell.c getwd.c \
+-      initgroups.c isatty.c malloc.c mkstemp.c mktemp.c ndbm.c nlist.c \
+-      opendir.c perror.c popen.c psignal.c qsort.c random.c readdir.c \
+-      regex.c scandir.c seekdir.c setgid.c setegid.c setrgid.c setuid.c \
+-      seteuid.c setruid.c siglist.c signal.c siginterrupt.c sleep.c \
+-      swab.c syslog.c system.c telldir.c time.c timezone.c ttyname.c \
+-      ttyslot.c ualarm.c usleep.c valloc.c
+-VAXSRC=       index.c rindex.c strcat.c strcmp.c strcpy.c strlen.c \
+-      strncat.c strncmp.c strncpy.c
+-STDOBJ=       abort.o alarm.o atoi.o atol.o calloc.o closedir.o crypt.o \
+-      ctime.o ctype_.o errlst.o execvp.o fakcu.o fstab.o gcvt.o getenv.o \
++      getpwnamuid.c getttyent.c getttynam.c getusershell.c getwd.c index.c \
++      initgroups.c insque.c ldexp.c malloc.c mkstemp.c mktemp.c modf.c \
++      ndbm.c nlist.c opendir.c perror.c psignal.c qsort.c random.c \
++      readdir.c regex.c remque.c rindex.c scandir.c seekdir.c setegid.c \
++      seteuid.c setgid.c _setjmp.c setjmp.c setjmperr.c setrgid.c setruid.c \
++      setuid.c siginterrupt.c siglist.c signal.c sleep.c strcat.c strcmp.c \
++      strcpy.c strlen.c strncat.c strncmp.c strncpy.c swab.c syslog.c \
++      system.c telldir.c time.c timezone.c ttyname.c ttyslot.c ualarm.c \
++      usleep.c valloc.c
++OBJS= abort.o abs.o alarm.o atof.o atoi.o atol.o bcmp.o bcopy.o bzero.o \
++      calloc.o closedir.o crypt.o ctime.o ctype_.o disktab.o ecvt.o \
++      errlst.o execvp.o fakcu.o ffs.o frexp.o fstab.o gcvt.o getenv.o \
+       getgrent.o getgrgid.o getgrnam.o getlogin.o getpass.o getpwent.o \
+-      getpwnamuid.o getttyent.o getttynam.o getusershell.o getwd.o \
+-      initgroups.o isatty.o malloc.o mkstemp.o mktemp.o ndbm.o nlist.o \
+-      opendir.o perror.o popen.o psignal.o qsort.o random.o readdir.o \
+-      regex.o scandir.o seekdir.o setgid.o setegid.o setrgid.o setuid.o \
+-      seteuid.o setruid.o siglist.o signal.o siginterrupt.o sleep.o \
+-      swab.o syslog.o system.o telldir.o time.o timezone.o ttyname.o \
+-      ttyslot.o ualarm.o usleep.o valloc.o
+-VAXOBJ=       index.o rindex.o strcat.o strcmp.o strcpy.o strlen.o \
+-      strncat.o strncmp.o strncpy.o
++      getpwnamuid.o getttyent.o getttynam.o getusershell.o getwd.o index.o \
++      initgroups.o insque.o ldexp.o malloc.o mkstemp.o mktemp.o modf.o \
++      ndbm.o nlist.o opendir.o perror.o psignal.o qsort.o random.o \
++      readdir.o regex.o remque.o rindex.o scandir.o seekdir.o setegid.o \
++      seteuid.o setgid.o _setjmp.o setjmp.o setjmperr.o setrgid.o setruid.o \
++      setuid.o siginterrupt.o siglist.o signal.o sleep.o strcat.o strcmp.o \
++      strcpy.o strlen.o strncat.o strncmp.o strncpy.o swab.o syslog.o \
++      system.o telldir.o time.o timezone.o ttyname.o ttyslot.o ualarm.o \
++      usleep.o valloc.o
++CFLAGS=       -O ${DEFS}
+ TAGSFILE=tags
+ .c.o:
+-      ${CC} -p ${CFLAGS} -c $*.c
+-      -ld -X -r $*.o
+-      mv a.out profiled/$*.o
+-      ${CC} ${CFLAGS} -c $*.c
+-      -ld -x -r $*.o
+-      mv a.out $*.o
++#     ${CC} -p ${CFLAGS} -c $*.c
++#     -ld -X -r $*.o
++#     mv a.out profiled/$*.o
++#     ${CC} ${CFLAGS} -c $*.c
++#     -ld -x -r $*.o
++#     mv a.out $*.o
++      ${ROOT}/xify/xify.sh <$< >$*.temp.c
++      ${CC} -o $@ -c $*.temp.c
+ genlib genlib_p: ${OBJS}
+-      @echo "building profiled genlib"
+-      @cd profiled; ar cru ../genlib_p ${OBJS}
++genlib: ${OBJS}
++#     @echo "building profiled genlib"
++#     @cd profiled; ar cru ../genlib_p ${OBJS}
+       @echo "buiding normal genlib"
+       @ar cru genlib ${OBJS}
+-errlst.o: errlst.c
+-      cc -S ${DEFS} errlst.c
+-      ed - <:errfix errlst.s
+-      as -o errlst.o errlst.s
+-      cp errlst.o profiled/errlst.o
+-      rm errlst.s
++#errlst.o: errlst.c
++#     cc -S ${DEFS} errlst.c
++#     ed - <:errfix errlst.s
++#     as -o errlst.o errlst.s
++#     cp errlst.o profiled/errlst.o
++#     rm errlst.s
+ tags:
+       cwd=`pwd`; \
+@@ -73,7 +68,7 @@
+       done
+ clean:
+-      rm -f genlib genlib_p *.o profiled/*.o tags Makefile.bak
++      rm -f genlib genlib_p *.temp.c *.o profiled/*.o tags Makefile.bak
+ depend:
+       for i in ${SRCS}; do \
+@@ -94,106 +89,3 @@
+ # DO NOT DELETE THIS LINE -- make depend uses it
+-abort.o: abort.c /usr/include/signal.h
+-alarm.o: alarm.c /usr/include/sys/time.h /usr/include/time.h
+-atoi.o: atoi.c
+-atol.o: atol.c
+-calloc.o: calloc.c
+-closedir.o: closedir.c /usr/include/sys/param.h
+-closedir.o: /usr/include/machine/machparam.h /usr/include/signal.h
+-closedir.o: /usr/include/sys/types.h /usr/include/sys/dir.h
+-crypt.o: crypt.c
+-ctime.o: ctime.c /usr/include/sys/time.h /usr/include/time.h
+-ctime.o: /usr/include/sys/types.h /usr/include/sys/timeb.h
+-ctype_.o: ctype_.c /usr/include/ctype.h
+-errlst.o: errlst.c
+-execvp.o: execvp.c /usr/include/errno.h
+-fakcu.o: fakcu.c
+-fstab.o: fstab.c /usr/include/fstab.h /usr/include/stdio.h /usr/include/ctype.h
+-gcvt.o: gcvt.c
+-getenv.o: getenv.c
+-getgrent.o: getgrent.c /usr/include/stdio.h /usr/include/grp.h
+-getgrgid.o: getgrgid.c /usr/include/grp.h
+-getgrnam.o: getgrnam.c /usr/include/grp.h
+-getlogin.o: getlogin.c /usr/include/utmp.h
+-getpass.o: getpass.c /usr/include/stdio.h /usr/include/signal.h
+-getpass.o: /usr/include/sgtty.h /usr/include/sys/ioctl.h
+-getpass.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h
+-getpwent.o: getpwent.c /usr/include/stdio.h /usr/include/pwd.h
+-getpwent.o: /usr/include/ndbm.h
+-getpwnamuid.o: getpwnamuid.c /usr/include/stdio.h /usr/include/pwd.h
+-getpwnamuid.o: /usr/include/ndbm.h /usr/include/sys/file.h
+-getttyent.o: getttyent.c /usr/include/stdio.h /usr/include/strings.h
+-getttyent.o: /usr/include/ttyent.h
+-getttynam.o: getttynam.c /usr/include/ttyent.h
+-getusershell.o: getusershell.c /usr/include/sys/param.h
+-getusershell.o: /usr/include/machine/machparam.h /usr/include/signal.h
+-getusershell.o: /usr/include/sys/types.h /usr/include/sys/file.h
+-getusershell.o: /usr/include/sys/stat.h /usr/include/ctype.h
+-getusershell.o: /usr/include/stdio.h
+-getwd.o: getwd.c /usr/include/sys/param.h /usr/include/machine/machparam.h
+-getwd.o: /usr/include/signal.h /usr/include/sys/types.h /usr/include/sys/stat.h
+-getwd.o: /usr/include/sys/dir.h
+-initgroups.o: initgroups.c /usr/include/stdio.h /usr/include/sys/param.h
+-initgroups.o: /usr/include/machine/machparam.h /usr/include/signal.h
+-initgroups.o: /usr/include/sys/types.h /usr/include/grp.h
+-isatty.o: isatty.c /usr/include/sgtty.h /usr/include/sys/ioctl.h
+-isatty.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h
+-malloc.o: malloc.c /usr/include/sys/types.h
+-mkstemp.o: mkstemp.c /usr/include/sys/file.h
+-mktemp.o: mktemp.c
+-ndbm.o: ndbm.c /usr/include/sys/types.h /usr/include/sys/stat.h
+-ndbm.o: /usr/include/sys/file.h /usr/include/stdio.h /usr/include/errno.h
+-ndbm.o: /usr/include/ndbm.h
+-nlist.o: nlist.c /usr/include/sys/types.h /usr/include/a.out.h
+-nlist.o: /usr/include/sys/exec.h /usr/include/stdio.h
+-opendir.o: opendir.c /usr/include/sys/param.h /usr/include/machine/machparam.h
+-opendir.o: /usr/include/signal.h /usr/include/sys/types.h
+-opendir.o: /usr/include/sys/dir.h
+-perror.o: perror.c /usr/include/sys/types.h /usr/include/sys/uio.h
+-popen.o: popen.c /usr/include/stdio.h /usr/include/signal.h
+-psignal.o: psignal.c /usr/include/signal.h
+-qsort.o: qsort.c
+-random.o: random.c /usr/include/stdio.h
+-readdir.o: readdir.c /usr/include/sys/param.h /usr/include/machine/machparam.h
+-readdir.o: /usr/include/signal.h /usr/include/sys/types.h
+-readdir.o: /usr/include/sys/dir.h
+-regex.o: regex.c
+-scandir.o: scandir.c /usr/include/sys/types.h /usr/include/sys/stat.h
+-scandir.o: /usr/include/sys/dir.h
+-seekdir.o: seekdir.c /usr/include/sys/param.h /usr/include/machine/machparam.h
+-seekdir.o: /usr/include/signal.h /usr/include/sys/types.h
+-seekdir.o: /usr/include/sys/dir.h
+-setgid.o: setgid.c
+-setegid.o: setegid.c
+-setrgid.o: setrgid.c
+-setuid.o: setuid.c
+-seteuid.o: seteuid.c
+-setruid.o: setruid.c
+-siglist.o: siglist.c /usr/include/signal.h
+-signal.o: signal.c /usr/include/signal.h
+-siginterrupt.o: siginterrupt.c /usr/include/signal.h
+-sleep.o: sleep.c /usr/include/sys/time.h /usr/include/time.h
+-sleep.o: /usr/include/signal.h
+-swab.o: swab.c
+-syslog.o: syslog.c /usr/include/sys/types.h /usr/include/sys/socket.h
+-syslog.o: /usr/include/sys/file.h /usr/include/sys/signal.h
+-syslog.o: /usr/include/sys/syslog.h /usr/include/netdb.h /usr/include/strings.h
+-system.o: system.c /usr/include/signal.h
+-telldir.o: telldir.c /usr/include/sys/param.h /usr/include/machine/machparam.h
+-telldir.o: /usr/include/signal.h /usr/include/sys/types.h
+-telldir.o: /usr/include/sys/dir.h
+-time.o: time.c /usr/include/sys/types.h /usr/include/sys/time.h
+-time.o: /usr/include/time.h
+-timezone.o: timezone.c
+-ttyname.o: ttyname.c /usr/include/sys/param.h /usr/include/machine/machparam.h
+-ttyname.o: /usr/include/signal.h /usr/include/sys/types.h
+-ttyname.o: /usr/include/sys/dir.h /usr/include/sys/stat.h
+-ttyslot.o: ttyslot.c /usr/include/ttyent.h
+-ualarm.o: ualarm.c /usr/include/sys/time.h /usr/include/time.h
+-usleep.o: usleep.c /usr/include/sys/time.h /usr/include/time.h
+-usleep.o: /usr/include/signal.h
+-valloc.o: valloc.c
+-# DEPENDENCIES MUST END AT END OF FILE
+-# IF YOU PUT STUFF HERE IT WILL GO AWAY
+-# see make depend above
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/gen/malloc.c libstdc/gen/malloc.c
 --- libstdc.post/gen/malloc.c  2017-01-19 22:06:11.292035023 +1100
 +++ libstdc/gen/malloc.c       2017-01-19 22:06:11.300035039 +1100
 @@ -4,6 +4,12 @@
@@ -149,7 +507,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
                return;
        /*
         * Add new memory allocated to that on
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/ndbm.c libstdc/gen/ndbm.c
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/gen/ndbm.c libstdc/gen/ndbm.c
 --- libstdc.post/gen/ndbm.c    2017-01-19 22:06:11.292035023 +1100
 +++ libstdc/gen/ndbm.c 2017-01-19 22:06:11.300035039 +1100
 @@ -70,14 +70,14 @@
@@ -169,7 +527,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
        db->dbm_dirf = vopen(db->dbm_pagbuf, flags, argp);
        va_end(argp);
        if (db->dbm_dirf < 0)
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/qsort.c libstdc/gen/qsort.c
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/gen/qsort.c libstdc/gen/qsort.c
 --- libstdc.post/gen/qsort.c   2017-01-19 22:06:11.292035023 +1100
 +++ libstdc/gen/qsort.c        2017-01-19 22:06:11.300035039 +1100
 @@ -36,7 +36,7 @@
@@ -181,7 +539,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
  #define base ((char *)_base)
        register char c, *i, *j, *lo, *hi;
        char *min, *max;
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/scandir.c libstdc/gen/scandir.c
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/gen/scandir.c libstdc/gen/scandir.c
 --- libstdc.post/gen/scandir.c 2017-01-19 22:06:11.292035023 +1100
 +++ libstdc/gen/scandir.c      2017-01-19 22:06:11.300035039 +1100
 @@ -24,7 +24,7 @@
@@ -202,7 +560,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
        *namelist = names;
        return(nitems);
  }
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/signal.c libstdc/gen/signal.c
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/gen/signal.c libstdc/gen/signal.c
 --- libstdc.post/gen/signal.c  2017-01-19 22:06:11.292035023 +1100
 +++ libstdc/gen/signal.c       2017-01-19 22:06:11.300035039 +1100
 @@ -15,12 +15,12 @@
@@ -227,7 +585,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
 -      return (osv.sv_handler);
 +      return ((void (*) __P((int sig)))osv.sv_handler);
  }
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/sleep.c libstdc/gen/sleep.c
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/gen/sleep.c libstdc/gen/sleep.c
 --- libstdc.post/gen/sleep.c   2017-01-19 22:06:11.292035023 +1100
 +++ libstdc/gen/sleep.c        2017-01-19 22:06:11.300035039 +1100
 @@ -15,7 +15,7 @@
@@ -239,7 +597,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
  
  static int ringring;
  
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/system.c libstdc/gen/system.c
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/gen/system.c libstdc/gen/system.c
 --- libstdc.post/gen/system.c  2017-01-19 22:06:11.292035023 +1100
 +++ libstdc/gen/system.c       2017-01-19 22:06:11.300035039 +1100
 @@ -11,7 +11,7 @@
@@ -251,7 +609,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
  
        if ((pid = vfork()) == 0) {
                execl("/bin/sh", "sh", "-c", s, 0);
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/usleep.c libstdc/gen/usleep.c
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/gen/usleep.c libstdc/gen/usleep.c
 --- libstdc.post/gen/usleep.c  2017-01-19 22:06:11.292035023 +1100
 +++ libstdc/gen/usleep.c       2017-01-19 22:06:11.300035039 +1100
 @@ -18,7 +18,7 @@
@@ -263,7 +621,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
  
  static int ringring;
  
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/valloc.c libstdc/gen/valloc.c
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/gen/valloc.c libstdc/gen/valloc.c
 --- libstdc.post/gen/valloc.c  2017-01-19 22:06:11.292035023 +1100
 +++ libstdc/gen/valloc.c       2017-01-19 22:06:11.300035039 +1100
 @@ -1,6 +1,12 @@
@@ -292,7 +650,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
 +      j = ((INT)cp + (valsiz-1)) &~ (valsiz-1);
        return ((char *)j);
  }
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen.h libstdc/gen.h
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/gen.h libstdc/gen.h
 --- libstdc.post/gen.h 2017-01-19 22:06:11.268034974 +1100
 +++ libstdc/gen.h      2017-01-19 22:06:11.300035039 +1100
 @@ -108,7 +108,7 @@
@@ -304,9 +662,72 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
  
  /* gen/random.c */
  int srandom __P((unsigned x));
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/linux/csu/Makefile libstdc/linux/csu/Makefile
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/inet/Makefile libstdc/inet/Makefile
+--- libstdc.post/inet/Makefile 2017-01-19 22:06:11.268034974 +1100
++++ libstdc/inet/Makefile      2017-01-19 22:58:10.357181705 +1100
+@@ -1,3 +1,5 @@
++ROOT=../../..
++CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
+ #
+ # Copyright (c) 1980 Regents of the University of California.
+ # All rights reserved.  The Berkeley software License Agreement
+@@ -16,16 +18,19 @@
+ TAGSFILE=tags
+ .c.o:
+-      ${CC} -p -c ${CFLAGS} $*.c
+-      -ld -X -r $*.o
+-      mv a.out profiled/$*.o
+-      ${CC} ${CFLAGS} -c $*.c
+-      -ld -x -r $*.o
+-      mv a.out $*.o
+-
+-inetlib inetlib_p: ${OBJS}
+-      @echo "building profiled inetlib"
+-      @cd profiled; ar cru ../inetlib_p ${OBJS}
++#     ${CC} -p -c ${CFLAGS} $*.c
++#     -ld -X -r $*.o
++#     mv a.out profiled/$*.o
++#     ${CC} ${CFLAGS} -c $*.c
++#     -ld -x -r $*.o
++#     mv a.out $*.o
++      ${ROOT}/xify/xify.sh <$< >$*.temp.c
++      ${CC} -o $@ -c $*.temp.c
++
++#inetlib inetlib_p: ${OBJS}
++inetlib: ${OBJS}
++#     @echo "building profiled inetlib"
++#     @cd profiled; ar cru ../inetlib_p ${OBJS}
+       @echo "building normal inetlib"
+       @ar cru inetlib ${OBJS}
+@@ -36,7 +41,7 @@
+       done
+ clean:
+-      rm -f inetlib inetlib_p *.o profiled/*.o errs a.out core \
++      rm -f inetlib inetlib_p *.temp.c *.o profiled/*.o errs a.out core \
+               tags Makefile.bak
+ depend:
+@@ -58,14 +63,3 @@
+ # DO NOT DELETE THIS LINE -- make depend uses it
+-inet_addr.o: inet_addr.c /usr/include/sys/types.h /usr/include/ctype.h
+-inet_addr.o: /usr/include/netinet/in.h
+-inet_network.o: inet_network.c /usr/include/sys/types.h /usr/include/ctype.h
+-inet_netof.o: inet_netof.c /usr/include/sys/types.h /usr/include/netinet/in.h
+-inet_ntoa.o: inet_ntoa.c /usr/include/sys/types.h /usr/include/netinet/in.h
+-inet_lnaof.o: inet_lnaof.c /usr/include/sys/types.h /usr/include/netinet/in.h
+-inet_makeaddr.o: inet_makeaddr.c /usr/include/sys/types.h
+-inet_makeaddr.o: /usr/include/netinet/in.h
+-# DEPENDENCIES MUST END AT END OF FILE
+-# IF YOU PUT STUFF HERE IT WILL GO AWAY
+-# see make depend above
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/linux/csu/Makefile libstdc/linux/csu/Makefile
 --- libstdc.post/linux/csu/Makefile    2017-01-19 22:06:11.272034982 +1100
-+++ libstdc/linux/csu/Makefile 2017-01-19 22:26:06.914770403 +1100
++++ libstdc/linux/csu/Makefile 2017-01-19 22:45:26.680158601 +1100
 @@ -1,5 +1,5 @@
  ROOT=../../../..
 -CC=gcc -g -Wall -I${ROOT}/cross/include -Dx_vax
@@ -314,7 +735,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
  DESTDIR=${ROOT}/cross
  #
  # Copyright (c) 1980 Regents of the University of California.
-@@ -12,6 +12,7 @@
+@@ -12,16 +12,13 @@
  #     mcrt0   C run time start off for profiling, ``prof'' conventions
  #     gcrt0   C run time start off for profiling, ``gprof'' conventions
  #
@@ -322,7 +743,35 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
  SRCS= crt0.c
  # mon.c gmon.c
  OBJS= crt0.o
-@@ -96,9 +97,3 @@
+ # mcrt0.o gcrt0.o mon.o gmon.o
+ TAGSFILE=tags
+-.c.o:
+-      ${ROOT}/xify/xify.sh <$< >$*.temp.c
+-      ${CC} -o $@ -c $*.temp.c
+-
+ all: ${OBJS}
+ install: ${OBJS}
+@@ -29,13 +26,15 @@
+ #     mv mcrt0.o ${DESTDIR}/lib/mcrt0.o
+ #     mv gcrt0.o ${DESTDIR}/usr/lib/gcrt0.o
+-#crt0.o:      crt0.c
++crt0.o:       crt0.c
+ #     cc -S ${DFLAGS} -DCRT0 crt0.c
+ #     /lib/cpp crt0.s > x.s
+ #     as -o x.o x.s
+ #     ld -x -r -o crt0.o x.o
+ #     rm -f x.s x.o crt0.s
+-#
++      ${ROOT}/xify/xify.sh <$< >$*.temp.c
++      ${CC} -o $@ -c $*.temp.c
++
+ #moncrt0.o: crt0.c
+ #     cc -S ${DFLAGS} -DMCRT0 crt0.c
+ #     /lib/cpp crt0.s > x.s
+@@ -96,9 +95,3 @@
  
  # DO NOT DELETE THIS LINE -- make depend uses it
  
@@ -332,10 +781,84 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
 -# DEPENDENCIES MUST END AT END OF FILE
 -# IF YOU PUT STUFF HERE IT WILL GO AWAY
 -# see make depend above
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/linux/Makefile libstdc/linux/Makefile
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/linux/gen/abort.c libstdc/linux/gen/abort.c
+--- libstdc.post/linux/gen/abort.c     1970-01-01 10:00:00.000000000 +1000
++++ libstdc/linux/gen/abort.c  2017-01-19 23:25:25.791352190 +1100
+@@ -0,0 +1,6 @@
++#include <nox_stdlib.h>
++#include <gen.h>
++
++int abort() {
++      nox_abort();
++}
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/linux/gen/Makefile libstdc/linux/gen/Makefile
+--- libstdc.post/linux/gen/Makefile    1970-01-01 10:00:00.000000000 +1000
++++ libstdc/linux/gen/Makefile 2017-01-19 23:24:41.719319163 +1100
+@@ -0,0 +1,55 @@
++ROOT=../../../..
++CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
++#
++# Copyright (c) 1980 Regents of the University of California.
++# All rights reserved.  The Berkeley software License Agreement
++# specifies the terms and conditions for redistribution.
++#
++#     @(#)Makefile    5.4 (Berkeley) 9/5/85
++#
++
++SRCS= abort.c
++OBJS= abort.o
++TAGSFILE=tags
++
++.c.o:
++#     /lib/cpp -E ${DEFS} -DPROF $*.c | ${AS} -o $*.o
++#     -ld -x -r $*.o
++#     mv a.out profiled/$*.o
++#     /lib/cpp -E ${DEFS} $*.c | ${AS} -o $*.o
++#     -ld -x -r $*.o
++#     mv a.out $*.o
++      ${ROOT}/xify/xify.sh <$< >$*.temp.c
++      ${CC} -o $@ -c $*.temp.c
++
++#genlib genlib_p: ${OBJS}
++genlib: ${OBJS}
++#     @echo "building profiled genlib_p"
++#     @cd profiled; ar cru ../genlib_p ${OBJS}
++      @echo "building normal genlib_p"
++      @ar cru genlib ${OBJS}
++
++tags:
++
++clean:
++      rm -f genlib genlib_p *.temp.c ${OBJS} profiled/*.o tags Makefile.bak
++
++depend:
++      for i in ${SRCS}; do \
++          cc -M ${DEFS} $$i | awk ' { if ($$1 != prev) \
++              { if (rec != "") print rec; rec = $$0; prev = $$1; } \
++              else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
++              else rec = rec " " $$2 } } \
++              END { print rec } ' >> makedep; done
++      echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
++      echo '$$r makedep' >>eddep
++      echo 'w' >>eddep
++      cp Makefile Makefile.bak
++      ed - Makefile < eddep
++      rm eddep makedep
++      echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
++      echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
++      echo '# see make depend above' >> Makefile
++
++# DO NOT DELETE THIS LINE -- make depend uses it
++
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/linux/Makefile libstdc/linux/Makefile
 --- libstdc.post/linux/Makefile        2017-01-19 22:06:11.272034982 +1100
-+++ libstdc/linux/Makefile     2017-01-19 22:09:48.332469270 +1100
-@@ -12,13 +12,15 @@
++++ libstdc/linux/Makefile     2017-01-19 23:25:48.627370231 +1100
+@@ -8,17 +8,19 @@
+ # Machine dependent routines for linux hosted are located here
+ #
+ #COMPAT=      compat-4.1
+-ALL=  sys
++ALL=  gen sys
  #gen net stdio sys ${COMPAT}
  TAGSFILE=tags
  
@@ -356,9 +879,9 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
        rm -rf tmp
  
  ${ALL}:       FRC
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/linux/sys/Makefile libstdc/linux/sys/Makefile
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/linux/sys/Makefile libstdc/linux/sys/Makefile
 --- libstdc.post/linux/sys/Makefile    2017-01-19 22:06:11.272034982 +1100
-+++ libstdc/linux/sys/Makefile 2017-01-19 22:25:48.722732474 +1100
++++ libstdc/linux/sys/Makefile 2017-01-19 22:44:43.124079518 +1100
 @@ -1,5 +1,5 @@
  ROOT=../../../..
 -CC=gcc -g -Wall -I${ROOT}/cross/include -Dx_vax
@@ -366,20 +889,44 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
  #
  # Copyright (c) 1980 Regents of the University of California.
  # All rights reserved.  The Berkeley software License Agreement
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/linux/sys/write.c libstdc/linux/sys/write.c
+@@ -12,14 +12,13 @@
+ OBJS= write.o
+ TAGSFILE=tags
+-#.c.o:
++.c.o:
+ #     /lib/cpp -E ${DEFS} -DPROF $*.c | ${AS} -o $*.o
+ #     -ld -x -r $*.o
+ #     mv a.out profiled/$*.o
+ #     /lib/cpp -E ${DEFS} $*.c | ${AS} -o $*.o
+ #     -ld -x -r $*.o
+ #     mv a.out $*.o
+-.c.o:
+       ${ROOT}/xify/xify.sh <$< >$*.temp.c
+       ${CC} -o $@ -c $*.temp.c
+@@ -33,7 +32,7 @@
+ tags:
+ clean:
+-      rm -f syslib syslib_p ${OBJS} profiled/*.o *.temp.c tags Makefile.bak
++      rm -f syslib syslib_p *.temp.c ${OBJS} profiled/*.o tags Makefile.bak
+ depend:
+       for i in ${SRCS}; do \
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/linux/sys/write.c libstdc/linux/sys/write.c
 --- libstdc.post/linux/sys/write.c     2017-01-19 22:06:11.272034982 +1100
-+++ libstdc/linux/sys/write.c  2017-01-19 22:07:03.204139424 +1100
-@@ -1,16 +1,14 @@
--#include <sys/file.h>
--
--/*#include <nox_unistd.h>*/
++++ libstdc/linux/sys/write.c  2017-01-19 23:25:32.723357594 +1100
+@@ -1,16 +1,13 @@
 +#include <nox_unistd.h>
++#include <sys/errno.h>
+ #include <sys/file.h>
  
+-/*#include <nox_unistd.h>*/
+-
 -/*#include <sys/errno.h>*/
 -/*#include <sys/file.h>*/
-+#include <sys/errno.h>
-+#include <sys/file.h>
+-
  int write(f, b, l) int f; void *b; int l; {
    nox_size_t res;
    
@@ -390,16 +937,16 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
      return -1;
    }
    return (int)res;
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/Makefile libstdc/Makefile
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/Makefile libstdc/Makefile
 --- libstdc.post/Makefile      2017-01-19 22:06:11.272034982 +1100
-+++ libstdc/Makefile   2017-01-19 22:18:54.957726734 +1100
++++ libstdc/Makefile   2017-01-19 23:24:13.531299380 +1100
 @@ -1,3 +1,5 @@
-+ROOT=../..
++ROOT=${shell pwd}/../..
 +DESTDIR=${ROOT}/cross
  #
  # Copyright (c) 1980 Regents of the University of California.
  # All rights reserved.  The Berkeley software License Agreement
-@@ -39,31 +41,36 @@
+@@ -39,31 +41,35 @@
  #HOSTLOOKUP=  hosttable
  HOSTLOOKUP=   named
  #                                                     
@@ -413,8 +960,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
  DEFS=
  COMPAT=       compat-4.1 compat-sys5
 -ALL=  gen inet net ns stdio ${MACHINE} ${COMPAT}
-+ALL=  ${MACHINE}
-+#gen inet net ns stdio ${MACHINE} ${COMPAT}
++ALL=  gen inet net ns stdio sys ${COMPAT} ${MACHINE}
  TAGSFILE=tags
  
 -libc.a libc_p.a: ${MACHINE}/csu ${ALL} net/${HOSTLOOKUP}
@@ -449,7 +995,184 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
        rm -rf t1 tmp
  
  ${MACHINE}/csu ${ALL} net/${HOSTLOOKUP}: FRC
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/net/named/gethostnamadr.c libstdc/net/named/gethostnamadr.c
+@@ -72,10 +78,12 @@
+ FRC:
+ install: 
+-      ${INSTALL} libc.a ${DESTDIR}/lib/libc.a
+-      ranlib ${DESTDIR}/lib/libc.a
+-      ${INSTALL} libc_p.a ${DESTDIR}/usr/lib/libc_p.a
+-      ranlib ${DESTDIR}/usr/lib/libc_p.a
++#     ${INSTALL} libc.a ${DESTDIR}/lib/libc.a
++#     ranlib ${DESTDIR}/lib/libc.a
++#     ${INSTALL} libc_p.a ${DESTDIR}/usr/lib/libc_p.a
++#     ranlib ${DESTDIR}/usr/lib/libc_p.a
++      ${INSTALL} libc.a ${DESTDIR}/lib/libx_c.a
++      ranlib ${DESTDIR}/lib/libx_c.a
+       cd ${MACHINE}/csu; make DESTDIR=${DESTDIR} install
+ tags:
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/net/hosttable/Makefile libstdc/net/hosttable/Makefile
+--- libstdc.post/net/hosttable/Makefile        2017-01-19 22:06:11.268034974 +1100
++++ libstdc/net/hosttable/Makefile     2017-01-19 22:56:56.969006135 +1100
+@@ -1,3 +1,5 @@
++ROOT=../../../..
++CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
+ #
+ # Copyright (c) 1983 Regents of the University of California.
+@@ -12,16 +14,18 @@
+ CFLAGS=       -O ${DEFS}
+ .c.o: 
+-      ${CC} -p -c ${CFLAGS} $*.c
+-      -ld -X -r $*.o
+-      mv a.out profiled/$*.o
+-      ${CC} ${CFLAGS} -c $*.c
+-      -ld -x -r $*.o
+-      mv a.out $*.o
++#     ${CC} -p -c ${CFLAGS} $*.c
++#     -ld -X -r $*.o
++#     mv a.out profiled/$*.o
++#     ${CC} ${CFLAGS} -c $*.c
++#     -ld -x -r $*.o
++#     mv a.out $*.o
++      ${ROOT}/xify/xify.sh <$< >$*.temp.c
++      ${CC} -o $@ -c $*.temp.c
+ hostlib hostlib_p: ${OBJS} 
+-      @echo "building profiled hostlib"
+-      @cd profiled; ar cru ../hostlib_p ${OBJS}
++#     @echo "building profiled hostlib"
++#     @cd profiled; ar cru ../hostlib_p ${OBJS}
+       @echo "building normal netlib"
+       @ar cru hostlib ${OBJS}
+       
+@@ -32,7 +36,7 @@
+       done
+ clean:
+-      rm -f *.o errs a.out core hostlib hostlib_p profiled/*.o \
++      rm -f *.temp.c *.o errs a.out core hostlib hostlib_p profiled/*.o \
+               tags Makefile.bak
+ depend:
+@@ -54,11 +58,3 @@
+ # DO NOT DELETE THIS LINE -- make depend uses it
+-gethostnamadr.o: gethostnamadr.c /usr/include/stdio.h /usr/include/netdb.h
+-gethostnamadr.o: /usr/include/sys/file.h /usr/include/ndbm.h
+-gethostent.o: gethostent.c /usr/include/stdio.h /usr/include/sys/types.h
+-gethostent.o: /usr/include/sys/socket.h /usr/include/netdb.h
+-gethostent.o: /usr/include/ctype.h /usr/include/ndbm.h
+-# DEPENDENCIES MUST END AT END OF FILE
+-# IF YOU PUT STUFF HERE IT WILL GO AWAY
+-# see make depend above
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/net/Makefile libstdc/net/Makefile
+--- libstdc.post/net/Makefile  2017-01-19 22:06:11.268034974 +1100
++++ libstdc/net/Makefile       2017-01-19 22:55:58.740943241 +1100
+@@ -1,3 +1,5 @@
++ROOT=../../..
++CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
+ #
+ # Copyright (c) 1983 Regents of the University of California.
+ # All rights reserved.  The Berkeley software License Agreement
+@@ -21,16 +23,19 @@
+ TAGSFILE=tags
+ .c.o:
+-      ${CC} -p -c ${CFLAGS} $*.c
+-      -ld -X -r $*.o
+-      mv a.out profiled/$*.o
+-      ${CC} ${CFLAGS} -c $*.c
+-      -ld -x -r $*.o
+-      mv a.out $*.o
+-
+-netlib netlib_p: ${OBJS}
+-      @echo "building profiled netlib"
+-      @cd profiled; ar cru ../netlib_p ${OBJS}
++#     ${CC} -p -c ${CFLAGS} $*.c
++#     -ld -X -r $*.o
++#     mv a.out profiled/$*.o
++#     ${CC} ${CFLAGS} -c $*.c
++#     -ld -x -r $*.o
++#     mv a.out $*.o
++      ${ROOT}/xify/xify.sh <$< >$*.temp.c
++      ${CC} -o $@ -c $*.temp.c
++
++#netlib netlib_p: ${OBJS}
++netlib: ${OBJS}
++#     @echo "building profiled netlib"
++#     @cd profiled; ar cru ../netlib_p ${OBJS}
+       @echo "building normal netlib"
+       @ar cru netlib ${OBJS}
+@@ -41,7 +46,7 @@
+       done
+ clean:
+-      rm -f *.o profiled/*.o errs a.out core netlib netlib_p \
++      rm -f *.temp.c *.o profiled/*.o errs a.out core netlib netlib_p \
+               tags Makefile.bak
+ depend:
+@@ -63,54 +68,3 @@
+ # DO NOT DELETE THIS LINE -- make depend uses it
+-getnetbyaddr.o: getnetbyaddr.c /usr/include/netdb.h
+-getnetent.o: getnetent.c /usr/include/stdio.h /usr/include/sys/types.h
+-getnetent.o: /usr/include/sys/socket.h /usr/include/netdb.h
+-getnetent.o: /usr/include/ctype.h
+-getnetbyname.o: getnetbyname.c /usr/include/netdb.h
+-getproto.o: getproto.c /usr/include/netdb.h
+-getnetbyaddr.o: getnetbyaddr.c /usr/include/netdb.h
+-getnetent.o: getnetent.c /usr/include/stdio.h /usr/include/sys/types.h
+-getnetent.o: /usr/include/sys/socket.h /usr/include/netdb.h
+-getnetent.o: /usr/include/ctype.h
+-getnetbyname.o: getnetbyname.c /usr/include/netdb.h
+-getproto.o: getproto.c /usr/include/netdb.h
+-getprotoent.o: getprotoent.c /usr/include/stdio.h /usr/include/sys/types.h
+-getprotoent.o: /usr/include/sys/socket.h /usr/include/netdb.h
+-getprotoent.o: /usr/include/ctype.h
+-getprotoname.o: getprotoname.c /usr/include/netdb.h
+-getservent.o: getservent.c /usr/include/stdio.h /usr/include/sys/types.h
+-getservent.o: /usr/include/sys/socket.h /usr/include/netdb.h
+-getservent.o: /usr/include/ctype.h
+-getservbyport.o: getservbyport.c /usr/include/netdb.h
+-getservbyname.o: getservbyname.c /usr/include/netdb.h
+-rcmd.o: rcmd.c /usr/include/stdio.h /usr/include/ctype.h /usr/include/pwd.h
+-rcmd.o: /usr/include/sys/param.h /usr/include/machine/machparam.h
+-rcmd.o: /usr/include/signal.h /usr/include/sys/types.h
+-rcmd.o: /usr/include/sys/socket.h /usr/include/sys/stat.h
+-rcmd.o: /usr/include/netinet/in.h /usr/include/netdb.h /usr/include/errno.h
+-rexec.o: rexec.c /usr/include/sys/types.h /usr/include/sys/socket.h
+-rexec.o: /usr/include/netinet/in.h /usr/include/stdio.h /usr/include/netdb.h
+-rexec.o: /usr/include/errno.h
+-ruserpass.o: ruserpass.c /usr/include/stdio.h /usr/include/utmp.h
+-ruserpass.o: /usr/include/ctype.h /usr/include/sys/types.h
+-ruserpass.o: /usr/include/sys/stat.h /usr/include/errno.h
+-res_comp.o: res_comp.c /usr/include/sys/types.h /usr/include/stdio.h
+-res_comp.o: /usr/include/arpa/nameser.h
+-res_debug.o: res_debug.c /usr/include/sys/types.h /usr/include/netinet/in.h
+-res_debug.o: /usr/include/stdio.h /usr/include/arpa/nameser.h
+-res_init.o: res_init.c /usr/include/sys/types.h /usr/include/sys/socket.h
+-res_init.o: /usr/include/netinet/in.h /usr/include/stdio.h
+-res_init.o: /usr/include/arpa/nameser.h /usr/include/resolv.h
+-res_mkquery.o: res_mkquery.c /usr/include/stdio.h /usr/include/sys/types.h
+-res_mkquery.o: /usr/include/netinet/in.h /usr/include/arpa/nameser.h
+-res_mkquery.o: /usr/include/resolv.h
+-res_send.o: res_send.c /usr/include/sys/param.h
+-res_send.o: /usr/include/machine/machparam.h /usr/include/signal.h
+-res_send.o: /usr/include/sys/types.h /usr/include/sys/time.h
+-res_send.o: /usr/include/time.h /usr/include/sys/socket.h
+-res_send.o: /usr/include/netinet/in.h /usr/include/stdio.h /usr/include/errno.h
+-res_send.o: /usr/include/arpa/nameser.h /usr/include/resolv.h
+-# DEPENDENCIES MUST END AT END OF FILE
+-# IF YOU PUT STUFF HERE IT WILL GO AWAY
+-# see make depend above
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/net/named/gethostnamadr.c libstdc/net/named/gethostnamadr.c
 --- libstdc.post/net/named/gethostnamadr.c     2017-01-19 22:06:11.268034974 +1100
 +++ libstdc/net/named/gethostnamadr.c  2017-01-19 22:06:11.300035039 +1100
 @@ -12,6 +12,12 @@
@@ -477,26 +1200,18 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
  
                if (bp + n >= &hostbuf[sizeof(hostbuf)]) {
  #ifdef DEBUG
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/net/named/Makefile libstdc/net/named/Makefile
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/net/named/Makefile libstdc/net/named/Makefile
 --- libstdc.post/net/named/Makefile    2017-01-19 22:06:11.268034974 +1100
-+++ libstdc/net/named/Makefile 2017-01-19 22:28:11.331025754 +1100
++++ libstdc/net/named/Makefile 2017-01-19 22:44:01.808004502 +1100
 @@ -1,3 +1,5 @@
 +ROOT=../../../..
 +CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
  #
  # Copyright (c) 1983 Regents of the University of California.
  # All rights reserved.  The Berkeley software License Agreement
-@@ -14,17 +16,21 @@
- TAGSFILE= tags
+@@ -15,16 +17,19 @@
  DESTDIR=
  
-+#.c.o:
-+#     ${CC} -p -c ${CFLAGS} $*.c
-+#     -ld -X -r $*.o
-+#     mv a.out profiled/$*.o
-+#     ${CC} ${CFLAGS} -c $*.c
-+#     -ld -x -r $*.o
-+#     mv a.out $*.o
  .c.o:
 -      ${CC} -p -c ${CFLAGS} $*.c
 -      -ld -X -r $*.o
@@ -508,6 +1223,12 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
 -hostlib hostlib_p: ${OBJS} 
 -      @echo "building profiled hostlib"
 -      @cd profiled; ar cru ../hostlib_p ${OBJS}
++#     ${CC} -p -c ${CFLAGS} $*.c
++#     -ld -X -r $*.o
++#     mv a.out profiled/$*.o
++#     ${CC} ${CFLAGS} -c $*.c
++#     -ld -x -r $*.o
++#     mv a.out $*.o
 +      ${ROOT}/xify/xify.sh <$< >$*.temp.c
 +      ${CC} -o $@ -c $*.temp.c
 +
@@ -518,16 +1239,16 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
        @echo "building normal hostlib"
        @ar cru hostlib ${OBJS}
        
-@@ -35,7 +41,7 @@
+@@ -35,7 +40,7 @@
        done
  
  clean:
 -      rm -f *.o errs a.out core hostlib hostlib_p profiled/*.o \
-+      rm -f *.o *.temp.c errs a.out core hostlib hostlib_p profiled/*.o \
++      rm -f *.temp.c *.o errs a.out core hostlib hostlib_p profiled/*.o \
                tags Makefile.bak
  
  depend:
-@@ -57,14 +63,3 @@
+@@ -57,14 +62,3 @@
  
  # DO NOT DELETE THIS LINE -- make depend uses it
  
@@ -542,7 +1263,64 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
 -# DEPENDENCIES MUST END AT END OF FILE
 -# IF YOU PUT STUFF HERE IT WILL GO AWAY
 -# see make depend above
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/stdio/doprnt.c libstdc/stdio/doprnt.c
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/ns/Makefile libstdc/ns/Makefile
+--- libstdc.post/ns/Makefile   2017-01-19 22:06:11.260034958 +1100
++++ libstdc/ns/Makefile        2017-01-19 23:02:14.253773608 +1100
+@@ -1,3 +1,5 @@
++ROOT=../../..
++CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
+ #
+ # Copyright (c) 1980 Regents of the University of California.
+ # All rights reserved.  The Berkeley software License Agreement
+@@ -12,16 +14,19 @@
+ TAGSFILE=tags
+ .c.o:
+-      ${CC} -p -c ${CFLAGS} $*.c
+-      -ld -X -r $*.o
+-      mv a.out profiled/$*.o
+-      ${CC} ${CFLAGS} -c $*.c
+-      -ld -x -r $*.o
+-      mv a.out $*.o
+-
+-nslib nslib_p: ${OBJS}
+-      @echo "building profiled nslib"
+-      @cd profiled; ar cru ../nslib_p ${OBJS}
++#     ${CC} -p -c ${CFLAGS} $*.c
++#     -ld -X -r $*.o
++#     mv a.out profiled/$*.o
++#     ${CC} ${CFLAGS} -c $*.c
++#     -ld -x -r $*.o
++#     mv a.out $*.o
++      ${ROOT}/xify/xify.sh <$< >$*.temp.c
++      ${CC} -o $@ -c $*.temp.c
++
++#nslib nslib_p: ${OBJS}
++nslib: ${OBJS}
++#     @echo "building profiled nslib"
++#     @cd profiled; ar cru ../nslib_p ${OBJS}
+       @echo "building normal nslib"
+       @ar cru nslib ${OBJS}
+@@ -32,7 +37,7 @@
+       done
+ clean:
+-      rm -f nslib nslib_p *.o profiled/*.o errs a.out core \
++      rm -f nslib nslib_p *.temp.c *.o profiled/*.o errs a.out core \
+               tags Makefile.bak
+ depend:
+@@ -54,8 +59,3 @@
+ # DO NOT DELETE THIS LINE -- make depend uses it
+-ns_addr.o: ns_addr.c /usr/include/sys/types.h /usr/include/netns/ns.h
+-ns_ntoa.o: ns_ntoa.c /usr/include/sys/types.h /usr/include/netns/ns.h
+-# DEPENDENCIES MUST END AT END OF FILE
+-# IF YOU PUT STUFF HERE IT WILL GO AWAY
+-# see make depend above
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/stdio/doprnt.c libstdc/stdio/doprnt.c
 --- libstdc.post/stdio/doprnt.c        2017-01-19 22:06:11.260034958 +1100
 +++ libstdc/stdio/doprnt.c     2017-01-19 22:06:11.300035039 +1100
 @@ -13,6 +13,14 @@
@@ -588,7 +1366,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
                        base = 16;
                        goto nosign;
                case 's':
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/stdio/findiop.c libstdc/stdio/findiop.c
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/stdio/findiop.c libstdc/stdio/findiop.c
 --- libstdc.post/stdio/findiop.c       2017-01-19 22:06:11.260034958 +1100
 +++ libstdc/stdio/findiop.c    2017-01-19 22:06:11.300035039 +1100
 @@ -105,7 +105,7 @@
@@ -600,7 +1378,141 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
        register FILE **iov;
        register FILE *fp;
  
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/stdio.h libstdc/stdio.h
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/stdio/Makefile libstdc/stdio/Makefile
+--- libstdc.post/stdio/Makefile        2017-01-19 22:06:11.260034958 +1100
++++ libstdc/stdio/Makefile     2017-01-19 23:27:31.011458224 +1100
+@@ -1,3 +1,5 @@
++ROOT=../../..
++CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
+ #
+ # Copyright (c) 1980 Regents of the University of California.
+ # All rights reserved.  The Berkeley software License Agreement
+@@ -5,48 +7,35 @@
+ #
+ #     @(#)Makefile    5.4 (Berkeley) 9/5/85
+ #
+-# Several routines have been rewritten in assembly language for the VAX.
+-# If you are not running on a VAX, you should use the original C sources
+-# which are included in this directory. Regretably we do not have a C
+-# version of doprnt().
+-#
+-#ifndef vax
+-#SRCS=        ${STDSRC} ${VAXSRC}
+-#OBJS=        ${STDOBJ} ${VAXOBJ}
+-#else
+-SRCS= ${STDSRC}
+-OBJS= ${STDOBJ}
+-#endif not vax
+-
++SRCS= clrerr.c doprnt.c doscan.c exit.c fdopen.c fgetc.c fgets.c filbuf.c \
++      findiop.c flsbuf.c fopen.c fprintf.c fputc.c fputs.c fread.c \
++      freopen.c fseek.c ftell.c fwrite.c getchar.c gets.c getw.c popen.c \
++      printf.c putchar.c puts.c putw.c rew.c scanf.c setbuf.c setbuffer.c \
++      sibuf.c sobuf.c sprintf.c strout.c ungetc.c vfprintf.c vprintf.c \
++      vsprintf.c
++OBJS= clrerr.o doprnt.o doscan.o exit.o fdopen.o fgetc.o fgets.o filbuf.o \
++      findiop.o flsbuf.o fopen.o fprintf.o fputc.o fputs.o fread.o \
++      freopen.o fseek.o ftell.o fwrite.o getchar.o gets.o getw.o popen.o \
++      printf.o putchar.o puts.o putw.o rew.o scanf.o setbuf.o setbuffer.o \
++      sibuf.o sobuf.o sprintf.o strout.o ungetc.o vfprintf.o vprintf.o \
++      vsprintf.o
+ CFLAGS=       -O ${DEFS}
+-
+-STDSRC=       clrerr.c doscan.c \
+-      exit.c fdopen.c fgetc.c filbuf.c findiop.c flsbuf.c fopen.c \
+-      fprintf.c fputc.c fread.c freopen.c fseek.c ftell.c \
+-      fwrite.c getchar.c getw.c printf.c putchar.c \
+-      putw.c rew.c scanf.c setbuf.c setbuffer.c sibuf.c sobuf.c \
+-      sprintf.c strout.c ungetc.c
+-VAXSRC=       fgets.c fputs.c gets.c puts.c
+-STDOBJ=       clrerr.o doscan.o \
+-      exit.o fdopen.o fgetc.o filbuf.o findiop.o flsbuf.o fopen.o \
+-      fprintf.o fputc.o fread.o freopen.o fseek.o ftell.o \
+-      fwrite.o getchar.o getw.o printf.o putchar.o \
+-      putw.o rew.o scanf.o setbuf.o setbuffer.o sibuf.o sobuf.o \
+-      sprintf.o strout.o ungetc.o
+-VAXOBJ=       fgets.o fputs.o gets.o puts.o
+ TAGSFILE=tags
+ .c.o:
+-      ${CC} -p ${CFLAGS} -c $*.c
+-      -ld -X -r $*.o
+-      mv a.out profiled/$*.o
+-      ${CC} ${CFLAGS} -c $*.c
+-      -ld -x -r $*.o
+-      mv a.out $*.o
+-
+-stdiolib stdiolib_p: ${OBJS}
+-      @echo "building profiled stdiolib"
+-      @cd profiled; ar cru ../stdiolib_p ${OBJS}
++#     ${CC} -p ${CFLAGS} -c $*.c
++#     -ld -X -r $*.o
++#     mv a.out profiled/$*.o
++#     ${CC} ${CFLAGS} -c $*.c
++#     -ld -x -r $*.o
++#     mv a.out $*.o
++      ${ROOT}/xify/xify.sh <$< >$*.temp.c
++      ${CC} -o $@ -c $*.temp.c
++
++#stdiolib stdiolib_p: ${OBJS}
++stdiolib: ${OBJS}
++#     @echo "building profiled stdiolib"
++#     @cd profiled; ar cru ../stdiolib_p ${OBJS}
+       @echo "building normal stdiolib"
+       @ar cru stdiolib ${OBJS}
+@@ -57,7 +46,7 @@
+       done
+ clean:
+-      rm -f stdiolib stdiolib_p *.o profiled/*.o tags Makefile.bak
++      rm -f stdiolib stdiolib_p *.temp.c *.o profiled/*.o tags Makefile.bak
+ depend:
+       for i in ${SRCS}; do \
+@@ -78,41 +67,3 @@
+ # DO NOT DELETE THIS LINE -- make depend uses it
+-clrerr.o: clrerr.c /usr/include/stdio.h
+-doscan.o: doscan.c /usr/include/stdio.h /usr/include/ctype.h
+-exit.o: exit.c
+-fdopen.o: fdopen.c /usr/include/sys/types.h /usr/include/sys/file.h
+-fdopen.o: /usr/include/stdio.h
+-fgetc.o: fgetc.c /usr/include/stdio.h
+-filbuf.o: filbuf.c /usr/include/stdio.h /usr/include/sys/types.h
+-filbuf.o: /usr/include/sys/stat.h
+-findiop.o: findiop.c /usr/include/stdio.h
+-flsbuf.o: flsbuf.c /usr/include/stdio.h /usr/include/sys/types.h
+-flsbuf.o: /usr/include/sys/stat.h
+-fopen.o: fopen.c /usr/include/sys/types.h /usr/include/sys/file.h
+-fopen.o: /usr/include/stdio.h
+-fprintf.o: fprintf.c /usr/include/stdio.h
+-fputc.o: fputc.c /usr/include/stdio.h
+-fread.o: fread.c /usr/include/stdio.h
+-freopen.o: freopen.c /usr/include/sys/types.h /usr/include/sys/file.h
+-freopen.o: /usr/include/stdio.h
+-fseek.o: fseek.c /usr/include/stdio.h
+-ftell.o: ftell.c /usr/include/stdio.h
+-fwrite.o: fwrite.c /usr/include/stdio.h
+-getchar.o: getchar.c /usr/include/stdio.h
+-getw.o: getw.c /usr/include/stdio.h
+-printf.o: printf.c /usr/include/stdio.h
+-putchar.o: putchar.c /usr/include/stdio.h
+-putw.o: putw.c /usr/include/stdio.h
+-rew.o: rew.c /usr/include/stdio.h
+-scanf.o: scanf.c /usr/include/stdio.h
+-setbuf.o: setbuf.c /usr/include/stdio.h
+-setbuffer.o: setbuffer.c /usr/include/stdio.h
+-sibuf.o: sibuf.c /usr/include/stdio.h
+-sobuf.o: sobuf.c /usr/include/stdio.h
+-sprintf.o: sprintf.c /usr/include/stdio.h
+-strout.o: strout.c /usr/include/stdio.h
+-ungetc.o: ungetc.c /usr/include/stdio.h
+-# DEPENDENCIES MUST END AT END OF FILE
+-# IF YOU PUT STUFF HERE IT WILL GO AWAY
+-# see make depend above
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/stdio.h libstdc/stdio.h
 --- libstdc.post/stdio.h       2017-01-19 22:06:11.272034982 +1100
 +++ libstdc/stdio.h    2017-01-19 22:06:11.300035039 +1100
 @@ -109,7 +109,7 @@
@@ -612,7 +1524,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
  void _cleanup __P((void));
  
  /* stdio/flsbuf.c */
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/sys/dir.h libstdc/sys/dir.h
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/sys/dir.h libstdc/sys/dir.h
 --- libstdc.post/sys/dir.h     2017-01-19 22:06:11.276034990 +1100
 +++ libstdc/sys/dir.h  2017-01-19 22:06:11.300035039 +1100
 @@ -122,7 +122,7 @@
@@ -624,7 +1536,104 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post
  int alphasort __P((struct direct **d1, struct direct **d2));
  
  /* gen/seekdir.c */
-diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/sys/signal.h libstdc/sys/signal.h
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/sys/Makefile libstdc/sys/Makefile
+--- libstdc.post/sys/Makefile  1970-01-01 10:00:00.000000000 +1000
++++ libstdc/sys/Makefile       2017-01-19 23:09:01.702292019 +1100
+@@ -0,0 +1,93 @@
++ROOT=../../..
++CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
++#
++# Copyright (c) 1980 Regents of the University of California.
++# All rights reserved.  The Berkeley software License Agreement
++# specifies the terms and conditions for redistribution.
++#
++#     @(#)Makefile    6.1 (Berkeley) 1/29/86
++#
++
++SRCS= accept.c access.c acct.c adjtime.c bind.c brk.c chdir.c chmod.c \
++      chown.c chroot.c close.c connect.c creat.c dup2.c dup.c execl.c \
++      execle.c exect.c execv.c execve.c _exit.c fchmod.c fchown.c fcntl.c \
++      flock.c fork.c fstat.c fsync.c ftruncate.c getdtablesize.c getegid.c \
++      geteuid.c getgid.c getgroups.c gethostid.c gethostname.c getitimer.c \
++      getpagesize.c getpeername.c getpgrp.c getpid.c getppid.c \
++      getpriority.c getrlimit.c getrusage.c getsockname.c getsockopt.c \
++      gettimeofday.c getuid.c ioctl.c isatty.c kill.c killpg.c link.c \
++      listen.c lseek.c lstat.c mkdir.c mknod.c mount.c open.c pipe.c \
++      profil.c ptrace.c quota.c read.c readlink.c readv.c reboot.c recv.c \
++      recvfrom.c recvmsg.c rename.c rmdir.c sbrk.c select.c send.c \
++      sendmsg.c sendto.c setgroups.c sethostid.c sethostname.c setitimer.c \
++      setpgrp.c setpriority.c setquota.c setregid.c setreuid.c setrlimit.c \
++      setsockopt.c settimeofday.c shutdown.c sigblock.c sigpause.c \
++      sigreturn.c sigsetmask.c sigstack.c sigvec.c socket.c socketpair.c \
++      stat.c swapon.c symlink.c sync.c truncate.c umask.c umount.c unlink.c \
++      utimes.c vfork.c vhangup.c vopen.c wait3.c wait.c write.c writev.c
++OBJS= accept.o access.o acct.o adjtime.o bind.o brk.o chdir.o chmod.o \
++      chown.o chroot.o close.o connect.o creat.o dup2.o dup.o execl.o \
++      execle.o exect.o execv.o execve.o _exit.o fchmod.o fchown.o fcntl.o \
++      flock.o fork.o fstat.o fsync.o ftruncate.o getdtablesize.o getegid.o \
++      geteuid.o getgid.o getgroups.o gethostid.o gethostname.o getitimer.o \
++      getpagesize.o getpeername.o getpgrp.o getpid.o getppid.o \
++      getpriority.o getrlimit.o getrusage.o getsockname.o getsockopt.o \
++      gettimeofday.o getuid.o ioctl.o isatty.o kill.o killpg.o link.o \
++      listen.o lseek.o lstat.o mkdir.o mknod.o mount.o open.o pipe.o \
++      profil.o ptrace.o quota.o read.o readlink.o readv.o reboot.o recv.o \
++      recvfrom.o recvmsg.o rename.o rmdir.o sbrk.o select.o send.o \
++      sendmsg.o sendto.o setgroups.o sethostid.o sethostname.o setitimer.o \
++      setpgrp.o setpriority.o setquota.o setregid.o setreuid.o setrlimit.o \
++      setsockopt.o settimeofday.o shutdown.o sigblock.o sigpause.o \
++      sigreturn.o sigsetmask.o sigstack.o sigvec.o socket.o socketpair.o \
++      stat.o swapon.o symlink.o sync.o truncate.o umask.o umount.o unlink.o \
++      utimes.o vfork.o vhangup.o vopen.o wait3.o wait.o write.o writev.o
++CFLAGS=       -O ${DEFS}
++TAGSFILE=tags
++
++.c.o:
++#     ${CC} -p -c ${CFLAGS} $*.c
++#     -ld -X -r $*.o
++#     mv a.out profiled/$*.o
++#     ${CC} ${CFLAGS} -c $*.c
++#     -ld -x -r $*.o
++#     mv a.out $*.o
++      ${ROOT}/xify/xify.sh <$< >$*.temp.c
++      ${CC} -o $@ -c $*.temp.c
++
++#syslib syslib_p: ${OBJS}
++syslib: ${OBJS}
++#     @echo "building profiled syslib"
++#     @cd profiled; ar cru ../syslib_p ${OBJS}
++      @echo "building normal syslib"
++      @ar cru syslib ${OBJS}
++
++tags:
++      cwd=`pwd`; \
++      for i in ${SRCS}; do \
++              ctags -a -f ${TAGSFILE} $$cwd/$$i; \
++      done
++
++clean:
++      rm -f syslib syslib_p *.temp.c *.o profiled/*.o errs a.out core \
++              tags Makefile.bak
++
++depend:
++      for i in ${SRCS}; do \
++          cc -M ${CFLAGS} $$i | awk ' { if ($$1 != prev) \
++              { if (rec != "") print rec; rec = $$0; prev = $$1; } \
++              else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
++              else rec = rec " " $$2 } } \
++              END { print rec } ' >> makedep; done
++      echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
++      echo '$$r makedep' >>eddep
++      echo 'w' >>eddep
++      cp Makefile Makefile.bak
++      ed - Makefile < eddep
++      rm eddep makedep
++      echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
++      echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
++      echo '# see make depend above' >> Makefile
++
++# DO NOT DELETE THIS LINE -- make depend uses it
++
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libstdc.post/sys/signal.h libstdc/sys/signal.h
 --- libstdc.post/sys/signal.h  2017-01-19 22:06:11.276034990 +1100
 +++ libstdc/sys/signal.h       2017-01-19 22:06:11.300035039 +1100
 @@ -9,7 +9,7 @@
index e837cfd..d29e1d0 100644 (file)
@@ -1,3 +1,5 @@
+ROOT=../../..
+CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
 #
 # Copyright (c) 1980 Regents of the University of California.
 # All rights reserved.  The Berkeley software License Agreement
@@ -5,48 +7,35 @@
 #
 #      @(#)Makefile    5.4 (Berkeley) 9/5/85
 #
-# Several routines have been rewritten in assembly language for the VAX.
-# If you are not running on a VAX, you should use the original C sources
-# which are included in this directory. Regretably we do not have a C
-# version of doprnt().
-#
-#ifndef vax
-#SRCS= ${STDSRC} ${VAXSRC}
-#OBJS= ${STDOBJ} ${VAXOBJ}
-#else
-SRCS=  ${STDSRC}
-OBJS=  ${STDOBJ}
-#endif not vax
-
+SRCS=  clrerr.c doprnt.c doscan.c exit.c fdopen.c fgetc.c fgets.c filbuf.c \
+       findiop.c flsbuf.c fopen.c fprintf.c fputc.c fputs.c fread.c \
+       freopen.c fseek.c ftell.c fwrite.c getchar.c gets.c getw.c popen.c \
+       printf.c putchar.c puts.c putw.c rew.c scanf.c setbuf.c setbuffer.c \
+       sibuf.c sobuf.c sprintf.c strout.c ungetc.c vfprintf.c vprintf.c \
+       vsprintf.c
+OBJS=  clrerr.o doprnt.o doscan.o exit.o fdopen.o fgetc.o fgets.o filbuf.o \
+       findiop.o flsbuf.o fopen.o fprintf.o fputc.o fputs.o fread.o \
+       freopen.o fseek.o ftell.o fwrite.o getchar.o gets.o getw.o popen.o \
+       printf.o putchar.o puts.o putw.o rew.o scanf.o setbuf.o setbuffer.o \
+       sibuf.o sobuf.o sprintf.o strout.o ungetc.o vfprintf.o vprintf.o \
+       vsprintf.o
 CFLAGS=        -O ${DEFS}
-
-STDSRC=        clrerr.c doscan.c \
-       exit.c fdopen.c fgetc.c filbuf.c findiop.c flsbuf.c fopen.c \
-       fprintf.c fputc.c fread.c freopen.c fseek.c ftell.c \
-       fwrite.c getchar.c getw.c printf.c putchar.c \
-       putw.c rew.c scanf.c setbuf.c setbuffer.c sibuf.c sobuf.c \
-       sprintf.c strout.c ungetc.c
-VAXSRC=        fgets.c fputs.c gets.c puts.c
-STDOBJ=        clrerr.o doscan.o \
-       exit.o fdopen.o fgetc.o filbuf.o findiop.o flsbuf.o fopen.o \
-       fprintf.o fputc.o fread.o freopen.o fseek.o ftell.o \
-       fwrite.o getchar.o getw.o printf.o putchar.o \
-       putw.o rew.o scanf.o setbuf.o setbuffer.o sibuf.o sobuf.o \
-       sprintf.o strout.o ungetc.o
-VAXOBJ=        fgets.o fputs.o gets.o puts.o
 TAGSFILE=tags
 
 .c.o:
-       ${CC} -p ${CFLAGS} -c $*.c
-       -ld -X -r $*.o
-       mv a.out profiled/$*.o
-       ${CC} ${CFLAGS} -c $*.c
-       -ld -x -r $*.o
-       mv a.out $*.o
+#      ${CC} -p ${CFLAGS} -c $*.c
+#      -ld -X -r $*.o
+#      mv a.out profiled/$*.o
+#      ${CC} ${CFLAGS} -c $*.c
+#      -ld -x -r $*.o
+#      mv a.out $*.o
+       ${ROOT}/xify/xify.sh <$< >$*.temp.c
+       ${CC} -o $@ -c $*.temp.c
 
-stdiolib stdiolib_p: ${OBJS}
-       @echo "building profiled stdiolib"
-       @cd profiled; ar cru ../stdiolib_p ${OBJS}
+#stdiolib stdiolib_p: ${OBJS}
+stdiolib: ${OBJS}
+#      @echo "building profiled stdiolib"
+#      @cd profiled; ar cru ../stdiolib_p ${OBJS}
        @echo "building normal stdiolib"
        @ar cru stdiolib ${OBJS}
 
@@ -57,7 +46,7 @@ tags:
        done
 
 clean:
-       rm -f stdiolib stdiolib_p *.o profiled/*.o tags Makefile.bak
+       rm -f stdiolib stdiolib_p *.temp.c *.o profiled/*.o tags Makefile.bak
 
 depend:
        for i in ${SRCS}; do \
@@ -78,41 +67,3 @@ depend:
 
 # DO NOT DELETE THIS LINE -- make depend uses it
 
-clrerr.o: clrerr.c /usr/include/stdio.h
-doscan.o: doscan.c /usr/include/stdio.h /usr/include/ctype.h
-exit.o: exit.c
-fdopen.o: fdopen.c /usr/include/sys/types.h /usr/include/sys/file.h
-fdopen.o: /usr/include/stdio.h
-fgetc.o: fgetc.c /usr/include/stdio.h
-filbuf.o: filbuf.c /usr/include/stdio.h /usr/include/sys/types.h
-filbuf.o: /usr/include/sys/stat.h
-findiop.o: findiop.c /usr/include/stdio.h
-flsbuf.o: flsbuf.c /usr/include/stdio.h /usr/include/sys/types.h
-flsbuf.o: /usr/include/sys/stat.h
-fopen.o: fopen.c /usr/include/sys/types.h /usr/include/sys/file.h
-fopen.o: /usr/include/stdio.h
-fprintf.o: fprintf.c /usr/include/stdio.h
-fputc.o: fputc.c /usr/include/stdio.h
-fread.o: fread.c /usr/include/stdio.h
-freopen.o: freopen.c /usr/include/sys/types.h /usr/include/sys/file.h
-freopen.o: /usr/include/stdio.h
-fseek.o: fseek.c /usr/include/stdio.h
-ftell.o: ftell.c /usr/include/stdio.h
-fwrite.o: fwrite.c /usr/include/stdio.h
-getchar.o: getchar.c /usr/include/stdio.h
-getw.o: getw.c /usr/include/stdio.h
-printf.o: printf.c /usr/include/stdio.h
-putchar.o: putchar.c /usr/include/stdio.h
-putw.o: putw.c /usr/include/stdio.h
-rew.o: rew.c /usr/include/stdio.h
-scanf.o: scanf.c /usr/include/stdio.h
-setbuf.o: setbuf.c /usr/include/stdio.h
-setbuffer.o: setbuffer.c /usr/include/stdio.h
-sibuf.o: sibuf.c /usr/include/stdio.h
-sobuf.o: sobuf.c /usr/include/stdio.h
-sprintf.o: sprintf.c /usr/include/stdio.h
-strout.o: strout.c /usr/include/stdio.h
-ungetc.o: ungetc.c /usr/include/stdio.h
-# DEPENDENCIES MUST END AT END OF FILE
-# IF YOU PUT STUFF HERE IT WILL GO AWAY
-# see make depend above
diff --git a/lib/libstdc/sys/Makefile b/lib/libstdc/sys/Makefile
new file mode 100644 (file)
index 0000000..3354085
--- /dev/null
@@ -0,0 +1,93 @@
+ROOT=../../..
+CC=gcc -g -I${ROOT}/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result
+#
+# Copyright (c) 1980 Regents of the University of California.
+# All rights reserved.  The Berkeley software License Agreement
+# specifies the terms and conditions for redistribution.
+#
+#      @(#)Makefile    6.1 (Berkeley) 1/29/86
+#
+
+SRCS=  accept.c access.c acct.c adjtime.c bind.c brk.c chdir.c chmod.c \
+       chown.c chroot.c close.c connect.c creat.c dup2.c dup.c execl.c \
+       execle.c exect.c execv.c execve.c _exit.c fchmod.c fchown.c fcntl.c \
+       flock.c fork.c fstat.c fsync.c ftruncate.c getdtablesize.c getegid.c \
+       geteuid.c getgid.c getgroups.c gethostid.c gethostname.c getitimer.c \
+       getpagesize.c getpeername.c getpgrp.c getpid.c getppid.c \
+       getpriority.c getrlimit.c getrusage.c getsockname.c getsockopt.c \
+       gettimeofday.c getuid.c ioctl.c isatty.c kill.c killpg.c link.c \
+       listen.c lseek.c lstat.c mkdir.c mknod.c mount.c open.c pipe.c \
+       profil.c ptrace.c quota.c read.c readlink.c readv.c reboot.c recv.c \
+       recvfrom.c recvmsg.c rename.c rmdir.c sbrk.c select.c send.c \
+       sendmsg.c sendto.c setgroups.c sethostid.c sethostname.c setitimer.c \
+       setpgrp.c setpriority.c setquota.c setregid.c setreuid.c setrlimit.c \
+       setsockopt.c settimeofday.c shutdown.c sigblock.c sigpause.c \
+       sigreturn.c sigsetmask.c sigstack.c sigvec.c socket.c socketpair.c \
+       stat.c swapon.c symlink.c sync.c truncate.c umask.c umount.c unlink.c \
+       utimes.c vfork.c vhangup.c vopen.c wait3.c wait.c write.c writev.c
+OBJS=  accept.o access.o acct.o adjtime.o bind.o brk.o chdir.o chmod.o \
+       chown.o chroot.o close.o connect.o creat.o dup2.o dup.o execl.o \
+       execle.o exect.o execv.o execve.o _exit.o fchmod.o fchown.o fcntl.o \
+       flock.o fork.o fstat.o fsync.o ftruncate.o getdtablesize.o getegid.o \
+       geteuid.o getgid.o getgroups.o gethostid.o gethostname.o getitimer.o \
+       getpagesize.o getpeername.o getpgrp.o getpid.o getppid.o \
+       getpriority.o getrlimit.o getrusage.o getsockname.o getsockopt.o \
+       gettimeofday.o getuid.o ioctl.o isatty.o kill.o killpg.o link.o \
+       listen.o lseek.o lstat.o mkdir.o mknod.o mount.o open.o pipe.o \
+       profil.o ptrace.o quota.o read.o readlink.o readv.o reboot.o recv.o \
+       recvfrom.o recvmsg.o rename.o rmdir.o sbrk.o select.o send.o \
+       sendmsg.o sendto.o setgroups.o sethostid.o sethostname.o setitimer.o \
+       setpgrp.o setpriority.o setquota.o setregid.o setreuid.o setrlimit.o \
+       setsockopt.o settimeofday.o shutdown.o sigblock.o sigpause.o \
+       sigreturn.o sigsetmask.o sigstack.o sigvec.o socket.o socketpair.o \
+       stat.o swapon.o symlink.o sync.o truncate.o umask.o umount.o unlink.o \
+       utimes.o vfork.o vhangup.o vopen.o wait3.o wait.o write.o writev.o
+CFLAGS=        -O ${DEFS}
+TAGSFILE=tags
+
+.c.o:
+#      ${CC} -p -c ${CFLAGS} $*.c
+#      -ld -X -r $*.o
+#      mv a.out profiled/$*.o
+#      ${CC} ${CFLAGS} -c $*.c
+#      -ld -x -r $*.o
+#      mv a.out $*.o
+       ${ROOT}/xify/xify.sh <$< >$*.temp.c
+       ${CC} -o $@ -c $*.temp.c
+
+#syslib syslib_p: ${OBJS}
+syslib: ${OBJS}
+#      @echo "building profiled syslib"
+#      @cd profiled; ar cru ../syslib_p ${OBJS}
+       @echo "building normal syslib"
+       @ar cru syslib ${OBJS}
+
+tags:
+       cwd=`pwd`; \
+       for i in ${SRCS}; do \
+               ctags -a -f ${TAGSFILE} $$cwd/$$i; \
+       done
+
+clean:
+       rm -f syslib syslib_p *.temp.c *.o profiled/*.o errs a.out core \
+               tags Makefile.bak
+
+depend:
+       for i in ${SRCS}; do \
+           cc -M ${CFLAGS} $$i | awk ' { if ($$1 != prev) \
+               { if (rec != "") print rec; rec = $$0; prev = $$1; } \
+               else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
+               else rec = rec " " $$2 } } \
+               END { print rec } ' >> makedep; done
+       echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
+       echo '$$r makedep' >>eddep
+       echo 'w' >>eddep
+       cp Makefile Makefile.bak
+       ed - Makefile < eddep
+       rm eddep makedep
+       echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
+       echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
+       echo '# see make depend above' >> Makefile
+
+# DO NOT DELETE THIS LINE -- make depend uses it
+
diff --git a/test/hello.c b/test/hello.c
new file mode 100644 (file)
index 0000000..3b433f9
--- /dev/null
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+int main() {
+       printf("hello, world\n");
+       return 0;
+}
diff --git a/test/n.sh b/test/n.sh
new file mode 100755 (executable)
index 0000000..dac9453
--- /dev/null
+++ b/test/n.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+ROOT=..
+$ROOT/xify/xify.sh <hello.c >hello.temp.c
+gcc -g -I$ROOT/cross/include -Dx_vax -Wall -Wno-char-subscripts -Wno-deprecated-declarations -Wno-format -Wno-maybe-uninitialized -Wno-parentheses -Wno-unused-result -o hello.o -c hello.temp.c
+gcc -g -L$ROOT/cross/lib -o hello $ROOT/cross/lib/crt0.o hello.o -lx_c
index 7ca4fd3..41112c0 100644 (file)
@@ -195,6 +195,7 @@ int main() {
           (l != 4 || memcmp(p, "case", 4) != 0) &&
           (l != 4 || memcmp(p, "char", 4) != 0) &&
           (l != 8 || memcmp(p, "continue", 8) != 0) &&
+          (l != 7 || memcmp(p, "default", 7) != 0 /*|| buf[0] != '#'*/) &&
           (l != 7 || memcmp(p, "defined", 7) != 0 /*|| buf[0] != '#'*/) &&
           (l != 2 || memcmp(p, "do", 2) != 0) &&
           (l != 6 || memcmp(p, "double", 6) != 0) &&