Skip to content
Snippets Groups Projects
Commit 43e24775 authored by Raymond Toy's avatar Raymond Toy
Browse files

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.
parent 1d8db41a
No related branches found
No related tags found
No related merge requests found
...@@ -96,7 +96,9 @@ install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/${MANDIR} ...@@ -96,7 +96,9 @@ install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/${MANDIR}
install ${GROUP} ${OWNER} -m 0755 $TARGET/lisp/lisp $DESTDIR/bin/ install ${GROUP} ${OWNER} -m 0755 $TARGET/lisp/lisp $DESTDIR/bin/
if [ "$EXECUTABLE" = "true" ] if [ "$EXECUTABLE" = "true" ]
then 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/ install ${GROUP} ${OWNER} -m 0755 src/tools/linker.sh $DESTDIR/lib/cmucl/lib/
if [ -f src/tools/$SCRIPT-cmucl-linker-script ]; then if [ -f src/tools/$SCRIPT-cmucl-linker-script ]; then
install ${GROUP} ${OWNER} -m 0755 src/tools/$SCRIPT-cmucl-linker-script $DESTDIR/lib/cmucl/lib/ install ${GROUP} ${OWNER} -m 0755 src/tools/$SCRIPT-cmucl-linker-script $DESTDIR/lib/cmucl/lib/
......
...@@ -52,21 +52,15 @@ version.o : version.c version ...@@ -52,21 +52,15 @@ version.o : version.c version
$(CC) ${CFLAGS} $(CPPFLAGS) -DVERSION=`cat version` -c $< $(CC) ${CFLAGS} $(CPPFLAGS) -DVERSION=`cat version` -c $<
lisp: ${OBJS} version.o lisp: ${OBJS} version.o
$(CC) -g ${OS_LINK_FLAGS} -o ,lisp \ $(CC) -g ${OS_LINK_FLAGS} -o ,lisp $^ ${OS_LIBS} -lm
${OBJS} version.o \
${OS_LIBS} -lm
mv -f ,lisp lisp mv -f ,lisp lisp
# Create a library out of all the object files so we can build an # 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 # 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} lisp.a: version.o ${OBJS} ${EXEC_FINAL_OBJ}
$(AR) crs lisp.a ${OBJS} version.o $(AR) crs lisp.a ${OBJS} version.o
ifneq (${EXEC_FINAL_OBJ},) ifneq (${EXEC_FINAL_OBJ},)
$(AR) d lisp.a exec-init.o $(AR) d lisp.a exec-init.o
$(AR) r lisp.a ${EXEC_FINAL_OBJ}
endif endif
version: version:
......
...@@ -139,5 +139,5 @@ trap 'rm -f $OUTDIR/$OPT_IFADDR $OUTDIR/CORRO.o $OUTDIR/CORSTA.o $OUTDIR/CORDYN. ...@@ -139,5 +139,5 @@ trap 'rm -f $OUTDIR/$OPT_IFADDR $OUTDIR/CORRO.o $OUTDIR/CORSTA.o $OUTDIR/CORDYN.
(cd $OUTDIR (cd $OUTDIR
echo "long initial_function_addr = $IFADDR;" > $OPT_IFADDR 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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment