diff options
-rw-r--r-- | sys/arch/sgi/stand/boot64/Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/sgi/stand/boot64/Makefile b/sys/arch/sgi/stand/boot64/Makefile index a1fe2430a8c..feff68fe4f7 100644 --- a/sys/arch/sgi/stand/boot64/Makefile +++ b/sys/arch/sgi/stand/boot64/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.1 2009/05/14 18:57:43 miod Exp $ +# $OpenBSD: Makefile,v 1.2 2012/10/19 11:29:56 miod Exp $ -LDFLAGS+= ${SALDFLAGS} -r --oformat=elf64-tradbigmips -e __start +LDFLAGS+= ${SALDFLAGS} --oformat=elf64-tradbigmips -e __start STRIP= strip INSTALL_STRIP= @@ -9,8 +9,13 @@ PROG= boot64 .include "${.CURDIR}/../boot/Makefile" ${PROG}: $(OBJS) $(LDADD) + @# Link first as self-contained binary to enforce there are no + @# unresolved symbols $(LD) $(LDFLAGS) -o ${PROG} $(OBJS) -L${LIBSADIR} ${LIBSA} \ -L${LIBZDIR} ${LIBZ} + @# then link as a relocatable binary + $(LD) $(LDFLAGS) -r -o ${PROG} $(OBJS) -L${LIBSADIR} ${LIBSA} \ + -L${LIBZDIR} ${LIBZ} $(STRIP) --strip-unneeded ${PROG} LINKS= ${BINDIR}/${PROG} ${BINDIR}/boot-IP27 |