From 5f33ca72e5675cd08a24fcb228649c1a3ef7d74f Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Fri, 19 Oct 2012 11:29:57 +0000 Subject: Link boot64 twice, first as a self-contained binary, to enforce there are no unresolved symbols, then as a relocatable image as initially intended. This will prevent the arcbios.c 1.18 breakage from occuring again. --- sys/arch/sgi/stand/boot64/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sys/arch/sgi') 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 -- cgit v1.2.3