diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-11-25 18:25:37 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-11-25 18:25:37 +0000 |
commit | fd3cd56c5876d53b6c02e5b0821c0039831c6b6d (patch) | |
tree | 3d877f0b245dd0e07d6c535cd77daf7b8459efe5 /sys/arch/sparc64/stand | |
parent | 98824d13d14295a8c20e3c51cd80ca8e90e5c383 (diff) |
libkern, begone. Move to a new mechanism where config(8)'s "file"
directive can select between MI and MD versions of these files. At
the same time, adjust the boot programs to pick exactly what they need,
instead of the 7 or 8 mechanisms previously used.
There will be some fallout from this, but testing it all by myself is a
ridiculously slow process; it will be finished in-tree.
Various developers were very nice and avoided making fun of me when I
was gibbering in the corner..
Diffstat (limited to 'sys/arch/sparc64/stand')
-rw-r--r-- | sys/arch/sparc64/stand/Makefile | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/stand/Makefile.inc | 15 | ||||
-rw-r--r-- | sys/arch/sparc64/stand/libkern/Makefile | 39 | ||||
-rw-r--r-- | sys/arch/sparc64/stand/ofwboot/Makefile | 12 |
4 files changed, 11 insertions, 59 deletions
diff --git a/sys/arch/sparc64/stand/Makefile b/sys/arch/sparc64/stand/Makefile index 621784028c3..bd51f1a6f1c 100644 --- a/sys/arch/sparc64/stand/Makefile +++ b/sys/arch/sparc64/stand/Makefile @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile,v 1.4 2001/09/07 15:35:23 jason Exp $ +# $OpenBSD: Makefile,v 1.5 2007/11/25 18:25:33 deraadt Exp $ .if ${MACHINE} == "sparc64" -SUBDIR= bootblk libsa libkern libz ofwboot ofwboot.net +SUBDIR= bootblk libsa libz ofwboot ofwboot.net .endif SUBDIR+= installboot diff --git a/sys/arch/sparc64/stand/Makefile.inc b/sys/arch/sparc64/stand/Makefile.inc index f07da843800..f8aa7985fa6 100644 --- a/sys/arch/sparc64/stand/Makefile.inc +++ b/sys/arch/sparc64/stand/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.6 2005/12/30 02:03:49 millert Exp $ +# $OpenBSD: Makefile.inc,v 1.7 2007/11/25 18:25:33 deraadt Exp $ # $NetBSD: Makefile.inc,v 1.7 2000/08/20 14:57:16 mrg Exp $ .ifndef __INCLUDED_STAND_MAKEFILE_INC @@ -22,19 +22,6 @@ CFLAGS+= -fno-builtin-vprintf -fno-builtin-printf -fno-builtin-putchar -### Figure out what to use for libkern -LIBKERNDIR= ${.CURDIR}/../libkern - -.if exists(${LIBKERNDIR}/obj.${MACHINE}) -LIBKERNOBJDIR= ${LIBKERNDIR}/obj.${MACHINE} -.elif exists(${LIBKERNDIR}/obj) -LIBKERNOBJDIR= ${LIBKERNDIR}/obj -.else -LIBKERNOBJDIR= ${LIBKERNDIR} -.endif - -LIBKERN= ${LIBKERNOBJDIR}/libkern.a - ### Figure out what to use for libsa LIBSADIR= ${.CURDIR}/../libsa diff --git a/sys/arch/sparc64/stand/libkern/Makefile b/sys/arch/sparc64/stand/libkern/Makefile deleted file mode 100644 index 3eb6bb9a2c8..00000000000 --- a/sys/arch/sparc64/stand/libkern/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# $OpenBSD: Makefile,v 1.5 2003/06/01 17:00:39 deraadt Exp $ - -LIB= kern - -.PATH: ${.CURDIR}/../../../../lib/libkern -.PATH: ${.CURDIR}/../../../../lib/libkern/arch/sparc - -.include "${.CURDIR}/../../../../lib/libkern/arch/sparc/Makefile.inc" - -CFLAGS= -O2 -nostdinc -I${.CURDIR}/../include -I${.CURDIR}/../../../.. \ - -I${.CURDIR}/../../../../lib/libkern \ - -I${.CURDIR}/../../../../lib/libkern/arch/sparc -I${.CURDIR} - -AFLAGS= -x assembler-with-cpp -traditional-cpp -I${.CURDIR}/../include \ - -I${.CURDIR}/../../../.. -I${.CURDIR}/../../../../lib/libkern \ - -I${.CURDIR}/../../../../lib/libkern/arch/sparc - -# kern routines -SRCS= __main.c ashrdi3.c bzero.S divdi3.c qdivrem.c strlen.S \ - strcmp.c strlcat.c strlcpy.c strncmp.c umoddi3.c - -SRCS+= umul.S mul.S rem.S sdiv.S udiv.S urem.S -SRCS+= saveregs.S - -${OBJS}: ${.CURDIR}/../Makefile.inc - -CLEANFILES += machine - -NOPROFILE= -NOPIC= - -.if !make(libdep) && !make(sadep) && !make(salibdir) && !make(kernlibdir) && !make(obj) -.BEGIN: - @([ -h machine ] || ln -s ${.CURDIR}/../../include machine) -.endif - -install: - -.include <bsd.lib.mk> diff --git a/sys/arch/sparc64/stand/ofwboot/Makefile b/sys/arch/sparc64/stand/ofwboot/Makefile index 9487f13a364..e10c59285b3 100644 --- a/sys/arch/sparc64/stand/ofwboot/Makefile +++ b/sys/arch/sparc64/stand/ofwboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.10 2007/10/17 20:45:27 hshoexer Exp $ +# $OpenBSD: Makefile,v 1.11 2007/11/25 18:25:33 deraadt Exp $ # $NetBSD: Makefile,v 1.2 2001/03/04 14:50:05 mrg Exp $ CURDIR= ${.CURDIR} @@ -12,8 +12,12 @@ WARNS= 0 PROG?= ofwboot NOMAN= ja, man! -SRCS= srt0.s Locore.c boot.c ofdev.c alloc.c net.c netif_of.c vers.c + .PATH: ${S}/arch/sparc64/sparc64 +SRCS= srt0.s Locore.c boot.c ofdev.c alloc.c net.c netif_of.c vers.c + +.PATH: ${S}/lib/libkern/arch/sparc64 ${S}/lib/libkern +SRCS+= strlcpy.c strcmp.c strlcat.c strlen.c CWARNFLAGS+= -Wno-main AFLAGS+= -Wa,-Av9a @@ -54,9 +58,9 @@ CPPFLAGS+= -DSPARC_BOOT_NFS @([ -h machine ] || ln -s ${.CURDIR}/../../include machine) .endif -${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} +${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LD} -N -Ttext ${RELOC} -e ${ENTRY} -o ${PROG} \ - ${OBJS} -L${LIBSADIR} ${LIBSA} -L${LIBKERNDIR} ${LIBKERN} \ + ${OBJS} -L${LIBSADIR} ${LIBSA} \ -L${LIBZDIR} ${LIBZ} NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $< |