From: miod Date: Sun, 14 Jun 2015 18:33:53 +0000 (+0000) Subject: Build __moddi3, __muldi3 and __qdivrem from libkern, and built no-pie, instead X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=24fde715b5c7147d60d95bd392681029b5ead6fe;p=openbsd Build __moddi3, __muldi3 and __qdivrem from libkern, and built no-pie, instead of getting them from libgcc.a, built pie. This repairs boot blocks operation on sparc, as found the hard way by sebastia@ --- diff --git a/sys/arch/sparc/stand/boot/Makefile b/sys/arch/sparc/stand/boot/Makefile index cf5f1d1031c..2d4de961251 100644 --- a/sys/arch/sparc/stand/boot/Makefile +++ b/sys/arch/sparc/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.20 2013/11/03 21:36:43 deraadt Exp $ +# $OpenBSD: Makefile,v 1.21 2015/06/14 18:33:53 miod Exp $ # $NetBSD: Makefile,v 1.2 1995/09/30 21:43:38 pk Exp $ PROG= boot @@ -14,6 +14,7 @@ SRCS+= boot.c loadfile_sparc.c .PATH: ${S}/lib/libkern/arch/sparc ${S}/lib/libkern SRCS+= bzero.S strlen.c mul.S umul.S strcmp.c sdiv.S urem.S udiv.S rem.S +SRCS+= moddi3.c muldi3.c qdivrem.c CFLAGS= -fno-pie -O2 -I${.CURDIR}/../common -I${.CURDIR}/../../../../arch \ -I${.CURDIR}/../../../.. -I${.CURDIR}/../../../../lib/libsa ${DEFS} @@ -27,8 +28,7 @@ elfclean: clean-elf.c ${PROG}: ${OBJS} ${LIBS} elfclean ${LD} -nopie -N -Ttext ${RELOC2} --format a.out-sparc-netbsd \ - -e start ${OBJS} \ - ${LIBSA} ${LIBZ} `cc -print-libgcc-file-name` -o ${.TARGET}.elf + -e start ${OBJS} ${LIBSA} ${LIBZ} -o ${.TARGET}.elf ./elfclean ${.TARGET}.elf objcopy -j .text -j .data -j .bss -O a.out-sparc-netbsd \ ${.TARGET}.elf ${.TARGET}.aout