Raymond Toy pushed to branch master at cmucl / cmucl
Commits: 20abbd7c by Raymond Toy at 2015-10-04T20:26:12Z Support asdf's static-image-op.
* src/lisp/GNUMakefile * Don't add exec-final.o to lisp.a. (But still remove exec-init.o from it.) * src/tools/linker.sh * When linking the executable, need to link exec-final.o too. * bin/make-main-dist.sh * Need to install exec-init.o and exec-final.o. exec-init.o is needed to link a normal lisp; exec-final.o is used for the executable image. * Fix modes on some installed files. exec-init.o, exec-final.o, and lisp.a don't need to be executable.
- - - - -
3 changed files:
- bin/make-main-dist.sh - src/lisp/GNUmakefile - src/tools/linker.sh
Changes:
===================================== bin/make-main-dist.sh ===================================== --- a/bin/make-main-dist.sh +++ b/bin/make-main-dist.sh @@ -96,7 +96,9 @@ install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/${MANDIR} install ${GROUP} ${OWNER} -m 0755 $TARGET/lisp/lisp $DESTDIR/bin/ if [ "$EXECUTABLE" = "true" ] then - install ${GROUP} ${OWNER} -m 0755 $TARGET/lisp/lisp.a $DESTDIR/lib/cmucl/lib/ + install ${GROUP} ${OWNER} -m 0555 $TARGET/lisp/lisp.a $DESTDIR/lib/cmucl/lib/ + install ${GROUP} ${OWNER} -m 0555 $TARGET/lisp/exec-init.o $DESTDIR/lib/cmucl/lib/ + install ${GROUP} ${OWNER} -m 0555 $TARGET/lisp/exec-final.o $DESTDIR/lib/cmucl/lib/ install ${GROUP} ${OWNER} -m 0755 src/tools/linker.sh $DESTDIR/lib/cmucl/lib/ if [ -f src/tools/$SCRIPT-cmucl-linker-script ]; then install ${GROUP} ${OWNER} -m 0755 src/tools/$SCRIPT-cmucl-linker-script $DESTDIR/lib/cmucl/lib/
===================================== src/lisp/GNUmakefile ===================================== --- a/src/lisp/GNUmakefile +++ b/src/lisp/GNUmakefile @@ -52,21 +52,15 @@ version.o : version.c version $(CC) ${CFLAGS} $(CPPFLAGS) -DVERSION=`cat version` -c $<
lisp: ${OBJS} version.o - $(CC) -g ${OS_LINK_FLAGS} -o ,lisp \ - ${OBJS} version.o \ - ${OS_LIBS} -lm + $(CC) -g ${OS_LINK_FLAGS} -o ,lisp $^ ${OS_LIBS} -lm mv -f ,lisp lisp
# Create a library out of all the object files so we can build an # executable. However, we need to remove exec-init.o from the library -# and replace it with exec-final.o because exec-final.o sets the -# builtin_image_flag to 1 so that the runtime knows the runtime -# contains the core sections. lisp.a: version.o ${OBJS} ${EXEC_FINAL_OBJ} $(AR) crs lisp.a ${OBJS} version.o ifneq (${EXEC_FINAL_OBJ},) $(AR) d lisp.a exec-init.o - $(AR) r lisp.a ${EXEC_FINAL_OBJ} endif
version:
===================================== src/tools/linker.sh ===================================== --- a/src/tools/linker.sh +++ b/src/tools/linker.sh @@ -139,5 +139,5 @@ trap 'rm -f $OUTDIR/$OPT_IFADDR $OUTDIR/CORRO.o $OUTDIR/CORSTA.o $OUTDIR/CORDYN.
(cd $OUTDIR echo "long initial_function_addr = $IFADDR;" > $OPT_IFADDR -$CCOMPILER -m32 -o $OUTNAME $OPT_IFADDR $OPT_ARCHIVE $OPT_CORE $RO_ADDR $STATIC_ADDR $DYN_ADDR $OPT_EXTRA $OS_LIBS -lm) +$CCOMPILER -m32 -o $OUTNAME $OPT_IFADDR $OPT_ARCHIVE $CMUCLLIB/exec-final.o $OPT_CORE $RO_ADDR $STATIC_ADDR $DYN_ADDR $OPT_EXTRA $OS_LIBS -lm)
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/20abbd7c903455c9909ccdada3...