diff --git a/.gitignore b/.gitignore index 97dcb9ab..b12b87ea 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ vm/linux/generated/Objs.zone vm/linux/generated/Platform_linux vm/linux/generated/Tags vm/linux/generated/glueCheckSum +vm/linux/generated/glueFileList vm/linux/generated/incls/_precompiled.hh vm/linux/generated/includeDB vm/linux/optimized/Self diff --git a/bin/shell/makeFileLists b/bin/shell/makeFileLists index 63bc3f8d..1285c8dd 100755 --- a/bin/shell/makeFileLists +++ b/bin/shell/makeFileLists @@ -62,7 +62,7 @@ echo '${AOUT} files: ${PATCHED_OBJS}' >> $dep echo '${AOUT}:' `cat $allobjs` '${GLUE_LIBS}' >> $dep echo -n ' @lock_run _$@.lock' "'" >> $dep echo ' echo Compiling vmDate ; \' >> $dep -echo ' make_vmDate; ${AS} vmDate.s -o vmDate.o; \'>> $dep +echo ' make_vmDate; ${AS} ${ASFLAGS} vmDate.s -o vmDate.o; \'>> $dep echo ' check_locks ; \' >> $dep echo ' echo Linking $@ ; \' >> $dep echo ' rm -rf $@ cleanLocks; \' >> $dep # if disk space is tight... diff --git a/bin/src/makeDeps.cpp b/bin/src/makeDeps.cpp index a96ece35..ee32e9ec 100755 --- a/bin/src/makeDeps.cpp +++ b/bin/src/makeDeps.cpp @@ -862,8 +862,8 @@ Bool list::compareLists(register list* s, database* cur, database* prev) { void list::add(list* s) { register item* i = new item(s); // next two statements are for debugging - if ( i->next ) { printf("next %x\n", (unsigned)i->next); Plat.abort();} - if ( !i->contents ) { printf("c = %x\n", (unsigned)i->contents); Plat.abort();} + if ( i->next ) { printf("next %p\n", i->next); Plat.abort();} + if ( !i->contents ) { printf("c = %p\n", i->contents); Plat.abort();} if (last) last->next = i; else first = i; diff --git a/vm/linux/generated/glueFileList b/vm/linux/generated/glueFileList deleted file mode 100644 index e69de29b..00000000 diff --git a/vm/templates/compile.make b/vm/templates/compile.make index 6277b591..45f3d38d 100755 --- a/vm/templates/compile.make +++ b/vm/templates/compile.make @@ -124,6 +124,7 @@ glue.o: glue.cpp @lock_run _$@.lock " \ echo Linking $@; \ ld ${GLUE_LD_FLAGS} -o $@ $< ${EXTRA_LIBS} ${$*_libs}; \ + ld ${GLUE_LD_FLAGS} -o $@ $< ${EXTRA_LIBS} ${$*_libs}; \ " # Creating patched sigaction diff --git a/vm/templates/link.make b/vm/templates/link.make index ff726bb0..28f14bc2 100755 --- a/vm/templates/link.make +++ b/vm/templates/link.make @@ -79,12 +79,12 @@ else LINK.gnu = CC -norunpath endif -COMPILE.gnu.o = ${COMPILE.gnu} ${CFLAGS} -c -COMPILE.gnu.o.nog = ${COMPILE.gnu} ${CFLAGSnog} -c -COMPILE.gnu.s = ${COMPILE.gnu} ${CFLAGS} -S -COMPILE.gnu.i = ${COMPILE.gnu} ${CFLAGS} -E +COMPILE.gnu.o = ${COMPILE.gnu} ${GNUFLAGS} ${CFLAGS} -c +COMPILE.gnu.o.nog = ${COMPILE.gnu} ${GNUFLAGS} ${CFLAGSnog} -c +COMPILE.gnu.s = ${COMPILE.gnu} ${GNUFLAGS} ${CFLAGS} -S +COMPILE.gnu.i = ${COMPILE.gnu} ${GNUFLAGS} ${CFLAGS} -E -ASFLAGS = +ASFLAGS = --32 ifeq (${COMPILER}, GCC_COMPILER) COMPILE1.s = ${COMPILE.gnu.i} -xc++ else @@ -133,7 +133,7 @@ ifeq (${COMPILER}, GCC_COMPILER) # LD = PURIFYOPTIONS="-HOME=$(PURELINKHOME)" \ # ${GCC} ${CC_PURELINK_OPTS} ${LDFLAGS} else - LDFLAGS += ${LIBDIRS} -e start -dc -dp + LDFLAGS += ${LIBDIRS} -e start -dc -dp -m32 # Get gcc to call ld directly # for Jaguar: LD = ${GCC} -B/usr/bin/ ${LDFLAGS} diff --git a/vm/templates/linux.make b/vm/templates/linux.make index ceb35482..25fb1f48 100755 --- a/vm/templates/linux.make +++ b/vm/templates/linux.make @@ -20,18 +20,18 @@ SRC_PATH = ${ROOT}/vm/${VM_SUBDIR}/generated/incls \ $(SRC_DIRS:%=${ROOT}/vm/src/%) #ASM_FILTER = | removeUnderscore | sed 's;//.*;;' -GLUE_LD_FLAGS = -G +GLUE_LD_FLAGS = -G -m32 VPATH += $(SRC_PATH:%=%:) CPP = /usr/bin/cpp -XLIBLIBDIRS = -L/usr/lib +XLIBLIBDIRS = CLIBS = -lstdc++ -lnsl -lc # no -lsocket # link termcap and ucb statically to avoid having to mess with LD_LIBRARY_PATH #OS_GLUE_LIBS = /usr/ucblib/libtermcap.a /usr/ucblib/libucb.a -lm -OS_GLUE_LIBS = /usr/lib/libncurses.a -lm -lpthread +OS_GLUE_LIBS = -lncurses -lm -lpthread # precomp headers for Linux # _precompiled.hh is in generated/incls, _precomiped.gch is in debug, optimized, etc. @@ -56,7 +56,7 @@ CONFIGDEFS = \ -DMANUFACTURER=${MANUFACTURER} INCLUDE_PRECOMP = -include _precompiled.hh -GNUFLAGS += -fno-exceptions -ffriend-injection -Winvalid-pch -fno-stack-protector +GNUFLAGS += -m32 -fno-exceptions -ffriend-injection -Winvalid-pch -fno-stack-protector INCLUDES += -I/usr/include -I/usr/include/X11 -I/usr/lib/c++/4.1