Several fixes

This commit is contained in:
ceriel 1991-09-25 10:30:45 +00:00
parent 8661cdb40b
commit c17ce93d9e
9 changed files with 29 additions and 33 deletions

View file

@ -61,7 +61,6 @@ fchmod.s
fchown.s
fchroot.s
fcntl.s
fif.s
flock.s
fork.s
fstat.s

View file

@ -1,6 +1,6 @@
.global _brk, __brk
_brk:
set __brk,%o7
jmp %o7
set __brk,%o0
jmp %o0
nop

View file

@ -54,9 +54,9 @@ lino:
filn:
.word 0 ! filn
reghp:
.word _end
.word __end
limhp:
.word _end
.word __end
trppc:
.word 0
trpim:

View file

@ -1,6 +1,6 @@
.global _sbrk, __sbrk
_sbrk:
set __sbrk,%o7
jmp %o7
set __sbrk,%o0
jmp %o0
nop

View file

@ -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

View file

@ -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 .

View file

@ -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 ..

View file

@ -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)

View file

@ -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] <source directory>
;;
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