diff --git a/mach/sparc/libsys/LIST b/mach/sparc/libsys/LIST index 9c9fe8b7e..bb9583b3b 100644 --- a/mach/sparc/libsys/LIST +++ b/mach/sparc/libsys/LIST @@ -61,7 +61,6 @@ fchmod.s fchown.s fchroot.s fcntl.s -fif.s flock.s fork.s fstat.s diff --git a/mach/sparc/libsys/brk.s b/mach/sparc/libsys/brk.s index 88491450a..dc8664daa 100644 --- a/mach/sparc/libsys/brk.s +++ b/mach/sparc/libsys/brk.s @@ -1,6 +1,6 @@ .global _brk, __brk _brk: - set __brk,%o7 - jmp %o7 + set __brk,%o0 + jmp %o0 nop diff --git a/mach/sparc/libsys/head_em.s b/mach/sparc/libsys/head_em.s index 73e7807fe..4969bbadc 100644 --- a/mach/sparc/libsys/head_em.s +++ b/mach/sparc/libsys/head_em.s @@ -54,9 +54,9 @@ lino: filn: .word 0 ! filn reghp: - .word _end + .word __end limhp: - .word _end + .word __end trppc: .word 0 trpim: diff --git a/mach/sparc/libsys/sbrk.s b/mach/sparc/libsys/sbrk.s index 1bd8d164a..5c13024ca 100644 --- a/mach/sparc/libsys/sbrk.s +++ b/mach/sparc/libsys/sbrk.s @@ -1,6 +1,6 @@ .global _sbrk, __sbrk _sbrk: - set __sbrk,%o7 - jmp %o7 + set __sbrk,%o0 + jmp %o0 nop diff --git a/mach/sparc/libsys/syscall.h b/mach/sparc/libsys/syscall.h index 4e826a60a..03e66c190 100644 --- a/mach/sparc/libsys/syscall.h +++ b/mach/sparc/libsys/syscall.h @@ -56,7 +56,7 @@ #define SYS_getpgrp 81 #define SYS_setpgrp 82 #define SYS_setitimer 83 -#define SYS_wait 84 +#define SYS_wait4 84 #define SYS_swapon 85 #define SYS_getitimer 86 #define SYS_gethostname 87 diff --git a/util/ceg/util/make_back b/util/ceg/util/make_back index 2201de07b..28ec5b4b1 100644 --- a/util/ceg/util/make_back +++ b/util/ceg/util/make_back @@ -9,11 +9,10 @@ BACK = $(CEG)/ce_back/$(OBJ)_back all: back.$(LIBSUF) -back.$(LIBSUF): mach.h +back.$(LIBSUF): $(SRC_DIR)/mach.h -mkdir back - cd back;cp $(BACK)/*h . ; cp $(BACK)/Makefile . ; make ; cd .. + cd back; cp $(BACK)/*h . ; cp $(BACK)/Makefile . ; cd .. + if [ -d $(SRC_DIR)/back.src ] ; then cd back; cp $(SRC_DIR)/back.src/* . ; cd .. ; fi + cd back; make SRC_DIR=$(SRC_DIR) CC="$(CC)" CFLAGS="$(COPTIONS)" TARGET_HOME=$(TARGET_HOME) ; cd .. $(AR) r back.$(LIBSUF) back/*.$(SUF) $(RANLIB) back.$(LIBSUF) - -mach.h: $(SRC_DIR)/mach.h - cp $(SRC_DIR)/mach.h . diff --git a/util/ceg/util/make_ce b/util/ceg/util/make_ce index 12ed60a16..eafd29569 100644 --- a/util/ceg/util/make_ce +++ b/util/ceg/util/make_ce @@ -10,7 +10,7 @@ CEG = $(EM)/lib.bin/ceg AS = $(CEG)/as_parser DEF = $(CEG)/defaults -IFILES = -I. -I$(SRC_DIR) -I$(AS) -I$(EM)/h -I$(EM)/modules/h -I../back -I$(SRC_HOME)/mach +IFILES = -I. -I$(SRC_DIR) -I.. -I$(AS) -I$(EM)/h -I$(EM)/modules/h -I../back -I$(SRC_HOME)/mach CFLAGS = $(COPTIONS) $(IFILES) @@ -30,4 +30,5 @@ ce/dummy1: ceg/ceg $(SRC_DIR)/EM_table $(SRC_DIR)/mach.c -mkdir ce -cp $(SRC_DIR)/mach.c ce/mach.c cd ce ; ../ceg/ceg -l < $(DEF)/not_impl/not_impl_table ; cp $(DEF)/*.c . ; cp $(DEF)/*/*.c . ; cd .. + if [ -d $(SRC_DIR)/ce.src ] ; then cd ce ; cp $(SRC_DIR)/ce.src/*.c . ; cd .. ; fi cd ce ; $(EM)/lib.bin/cpp -P $(SRC_DIR)/EM_table | ../ceg/ceg -l ; touch dummy1 ; cd .. diff --git a/util/ceg/util/make_ceg b/util/ceg/util/make_ceg index adfe84a2b..c9b7d671e 100644 --- a/util/ceg/util/make_ceg +++ b/util/ceg/util/make_ceg @@ -12,7 +12,7 @@ AS = $(CEG)/as_parser EVAL = $(CEG)/as_parser/eval DEF = $(CEG)/defaults -IFILES = -I. -I$(SRC_DIR) -I$(AS) -I$(Em) -I$(TARGET_HOME)/h -I$(TARGET_HOME)/modules/h -I../back +IFILES = -I. -I$(SRC_DIR) -I.. -I$(AS) -I$(Em) -I$(TARGET_HOME)/h -I$(TARGET_HOME)/modules/h -I../back CFLAGS = $(COPTIONS) $(IFILES) LDFLAGS = $(LDOPTIONS) @@ -25,19 +25,19 @@ CEG_LIBS = $(TARGET_HOME)/modules/lib/liballoc.$(LIBSUF)\ all: ceg/ceg obj_list: ceg/as_lib.$(LIBSUF) ceg/as_instr.$(SUF) ceg/eval_as.$(SUF) - echo 'ceg/as_lib.$(LIBSUF) ceg/as_instr.$(SUF) ceg/eval_as.$(SUF)' > list + echo 'ceg/as_lib.$(LIBSUF) ceg/as_instr.$(SUF) ceg/eval_as.$(SUF)' > ceg/list as_list: ceg/as_lib.$(LIBSUF) - echo 'ceg/as_lib.$(LIBSUF)' > list + echo 'ceg/as_lib.$(LIBSUF)' > ceg/list -list: $(OBJ)_list +ceg/list: $(OBJ)_list -ceg/ceg: list - $(CC) $(LDFLAGS) -o ceg/ceg $(Em)/*.$(SUF) `cat list` $(CEG_LIBS) +ceg/ceg: ceg/list + $(CC) $(LDFLAGS) -o ceg/ceg $(Em)/*.$(SUF) `cat ceg/list` $(CEG_LIBS) ceg/as_lib.$(LIBSUF): -mkdir ceg - cd ceg ; cp $(CEG)/util/make_ceg_$(OBJ) Makefile ; cd .. + cp $(CEG)/util/make_ceg ceg/Makefile cd ceg ; cp $(ASMAIN)/* . ; $(CC) -c $(CFLAGS) *.c; $(AR) r as_lib.$(LIBSUF) *.$(SUF) ; cd .. $(RANLIB) ceg/as_lib.$(LIBSUF) diff --git a/util/ceg/util/update_ceg b/util/ceg/util/update_ceg index 4cc01e916..e5704a469 100755 --- a/util/ceg/util/update_ceg +++ b/util/ceg/util/update_ceg @@ -1,19 +1,15 @@ CEG=$TARGET_HOME/lib.bin/ceg MAKE=$CEG/util/make_ce -case $# in - 2) case $1 in - -as) OBJ=as;; - -obj) OBJ=obj;; - *) echo wrong option $1, use -as or -obj; - exit 1;; - esac - SRC_DIR=$2 - ;; - 1) SRC_DIR=$1;OBJ=obj ;; - *) echo Usage: $0 [-as|-obj] - ;; +OBJ=obj +case $1 in +-as) OBJ=as ; shift ;; +-obj) OBJ=obj ; shift ;; +*) echo wrong option $1, use -as or -obj; + exit 1;; esac +SRC_DIR=$1 +shift make -f ceg/Makefile SRC_DIR=$SRC_DIR OBJ=$OBJ @@ -40,4 +36,5 @@ do esac done touch ce/dummy +touch ce/dummy1 make -f $MAKE SRC_DIR=$SRC_DIR ce.$LIBSUF