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 | |
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')
-rw-r--r-- | sys/arch/sparc64/conf/Makefile.sparc64 | 14 | ||||
-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 |
5 files changed, 15 insertions, 69 deletions
diff --git a/sys/arch/sparc64/conf/Makefile.sparc64 b/sys/arch/sparc64/conf/Makefile.sparc64 index d6fdd153eb4..3412e7db0c5 100644 --- a/sys/arch/sparc64/conf/Makefile.sparc64 +++ b/sys/arch/sparc64/conf/Makefile.sparc64 @@ -33,14 +33,6 @@ HOSTCC= ${CC} HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//} HOSTED_CFLAGS= ${CFLAGS} -### find out what to use for libkern -.include "$S/lib/libkern/Makefile.inc" -.ifndef PROF -LIBKERN= ${KERNLIB} -.else -LIBKERN= ${KERNLIB_PROF} -.endif - # compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP} # where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix, # capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file @@ -68,7 +60,7 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $< # ${SYSTEM_LD_HEAD} # ${SYSTEM_LD} swapxxx.o # ${SYSTEM_LD_TAIL} -SYSTEM_OBJ= locore.o param.o ioconf.o ${OBJS} ${LIBKERN} +SYSTEM_OBJ= locore.o param.o ioconf.o ${OBJS} SYSTEM_DEP= Makefile ${SYSTEM_OBJ} SYSTEM_LD_HEAD= @rm -f $@ SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \ @@ -100,6 +92,9 @@ param.c: $S/conf/param.c param.o: param.c Makefile ${NORMAL_C_C} +mcount.o: $S/lib/libkern/mcount.c Makefile + ${NORMAL_C_NOP} + ioconf.o: ioconf.c ${NORMAL_C} @@ -144,7 +139,6 @@ depend:: .depend locore.o: ${SPARC64}/sparc64/locore.s assym.h ${NORMAL_S} -in_cksum.o: assym.h # The install target can be redefined by putting a # install-kernel-${MACHINE_NAME} target into /etc/mk.conf 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 $< |