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 | |
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')
71 files changed, 466 insertions, 670 deletions
diff --git a/sys/arch/alpha/conf/Makefile.alpha b/sys/arch/alpha/conf/Makefile.alpha index 5435fc97c1f..6a36714be28 100644 --- a/sys/arch/alpha/conf/Makefile.alpha +++ b/sys/arch/alpha/conf/Makefile.alpha @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.alpha,v 1.40 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.alpha,v 1.41 2007/11/25 18:25:25 deraadt Exp $ # $NetBSD: Makefile.alpha,v 1.27 1996/12/01 06:12:25 jonathan Exp $ # Makefile for OpenBSD @@ -50,14 +50,6 @@ HOSTED_CC= ${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} where TYPE is NORMAL or # HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file). @@ -77,7 +69,7 @@ HOSTED_C= ${HOSTED_CC} ${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; \ @@ -109,6 +101,9 @@ param.c: $S/conf/param.c param.o: param.c Makefile ${NORMAL_C} +mcount.o: $S/lib/libkern/mcount.c Makefile + ${NORMAL_C_NOP} + ioconf.o: ioconf.c ${NORMAL_C} diff --git a/sys/arch/alpha/conf/files.alpha b/sys/arch/alpha/conf/files.alpha index c276f5135eb..c979e7e444a 100644 --- a/sys/arch/alpha/conf/files.alpha +++ b/sys/arch/alpha/conf/files.alpha @@ -1,4 +1,4 @@ -# $OpenBSD: files.alpha,v 1.82 2007/06/08 22:57:42 jasper Exp $ +# $OpenBSD: files.alpha,v 1.83 2007/11/25 18:25:25 deraadt Exp $ # $NetBSD: files.alpha,v 1.32 1996/11/25 04:03:21 cgd Exp $ # # alpha-specific configuration info @@ -355,3 +355,14 @@ include "dev/bluetooth/files.bluetooth" # Machine-independent 1-Wire drivers # include "dev/onewire/files.onewire" + +# Machine-dependent libkern components +file lib/libkern/softfloat.c +file lib/libkern/arch/alpha/__divl.S +file lib/libkern/arch/alpha/__divlu.S +file lib/libkern/arch/alpha/__divq.S +file lib/libkern/arch/alpha/__divqu.S +file lib/libkern/arch/alpha/__reml.S +file lib/libkern/arch/alpha/__remlu.S +file lib/libkern/arch/alpha/__remq.S +file lib/libkern/arch/alpha/__remqu.S diff --git a/sys/arch/alpha/stand/Makefile b/sys/arch/alpha/stand/Makefile index 3c09a2a57c8..97e08de346e 100644 --- a/sys/arch/alpha/stand/Makefile +++ b/sys/arch/alpha/stand/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.8 2000/11/08 16:01:24 art Exp $ +# $OpenBSD: Makefile,v 1.9 2007/11/25 18:25:29 deraadt Exp $ # $NetBSD: Makefile,v 1.7 1997/04/10 23:03:38 cgd Exp $ .if ${MACHINE} == "alpha" -SUBDIR= boot bootxx netboot libkern libsa libz +SUBDIR= boot bootxx netboot libsa libz .endif SUBDIR+= setnetbootinfo installboot diff --git a/sys/arch/alpha/stand/boot/Makefile b/sys/arch/alpha/stand/boot/Makefile index 29514f0ef7f..035155b6936 100644 --- a/sys/arch/alpha/stand/boot/Makefile +++ b/sys/arch/alpha/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.15 2005/08/10 16:58:42 todd Exp $ +# $OpenBSD: Makefile,v 1.16 2007/11/25 18:25:29 deraadt Exp $ # $NetBSD: Makefile,v 1.17 1997/04/17 07:27:46 thorpej Exp $ S= ${.CURDIR}/../../../.. @@ -18,6 +18,9 @@ HEADERSIZE_PROG = headersize CLEANFILES+= vers.c vers.o ${PROG}.sym ${PROG}.nosym ${HEADERSIZE_PROG} +.PATH: ${S}/lib/libkern/arch/alpha ${S}/lib/libkern +SRCS+= __divlu.S __remqu.S __reml.S strlen.c bzero.c __divl.S __divqu.S \ + __remlu.S DEFNS= -DCOMPAT_UFS -DALPHA_BOOT_ELF @@ -39,12 +42,6 @@ lint: .include <bsd.prog.mk> -### find out what to use for libkern -KERN_AS= library -KERNDST= ${.CURDIR}/../libkern/${__objdir} -.include "${.CURDIR}/../libkern/Makefile.inc" -LIBKERN= ${KERNLIB} - ### find out what to use for libz Z_AS= library ZDST= ${.CURDIR}/../libz/${__objdir} @@ -59,9 +56,9 @@ SA_ZLIB= yes .include "${.CURDIR}/../libsa/Makefile.inc" LIBSA= ${SALIB} -${PROG}.sym: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} +${PROG}.sym: ${OBJS} ${LIBSA} ${LIBZ} sh ${.CURDIR}/newvers.sh ${.CURDIR}/version ${COMPILE.c} vers.c ${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${PROG}.sym \ - ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} + ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBSA} size ${PROG}.sym diff --git a/sys/arch/alpha/stand/bootxx/Makefile b/sys/arch/alpha/stand/bootxx/Makefile index c9d82a03846..ffa3957e704 100644 --- a/sys/arch/alpha/stand/bootxx/Makefile +++ b/sys/arch/alpha/stand/bootxx/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.8 2005/08/10 16:58:42 todd Exp $ +# $OpenBSD: Makefile,v 1.9 2007/11/25 18:25:29 deraadt Exp $ # $NetBSD: Makefile,v 1.12 1997/04/17 07:27:49 thorpej Exp $ S= ${.CURDIR}/../../../.. @@ -17,6 +17,9 @@ HEADERSIZE_PROG = headersize CLEANFILES+= ${PROG}.sym ${PROG}.nosym ${PROG}.trunc ${HEADERSIZE_PROG} +.PATH: ${S}/lib/libkern/arch/alpha ${S}/lib/libkern +SRCS+= bzero.c + DEFNS= -DPRIMARY_BOOTBLOCK DEFNS+= -DALPHA_BOOT_ELF @@ -40,13 +43,6 @@ lint: .include <bsd.prog.mk> -### find out what to use for libkern -KERN_AS= library -KERNDST= ${.CURDIR}/../libkern/${__objdir} -.include "${.CURDIR}/../libkern/Makefile.inc" -LIBKERN= ${KERNLIB} - -${PROG}.sym: ${OBJS} ${LIBKERN} - ${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${PROG}.sym ${OBJS} \ - ${LIBKERN} +${PROG}.sym: ${OBJS} + ${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${PROG}.sym ${OBJS} size ${PROG}.sym diff --git a/sys/arch/alpha/stand/libkern/Makefile b/sys/arch/alpha/stand/libkern/Makefile deleted file mode 100644 index 87ff5fbe70a..00000000000 --- a/sys/arch/alpha/stand/libkern/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $OpenBSD: Makefile,v 1.1 1997/05/05 06:01:55 millert Exp $ - -.include <bsd.obj.mk> -.include <bsd.dep.mk> -.include <bsd.subdir.mk> diff --git a/sys/arch/alpha/stand/libkern/Makefile.inc b/sys/arch/alpha/stand/libkern/Makefile.inc deleted file mode 100644 index 27c4fb0c431..00000000000 --- a/sys/arch/alpha/stand/libkern/Makefile.inc +++ /dev/null @@ -1,52 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.1 1997/05/05 06:01:56 millert Exp $ -# $NetBSD: Makefile.inc,v 1.22 1996/09/30 15:54:35 ws Exp $ -# -# NOTE: $S must correspond to the top of the 'sys' tree - -KERNDIR= $S/lib/libkern - -KERNDST?= ${.OBJDIR}/lib/kern -KERN_AS?= obj - -.if (${KERN_AS} == "library") -KERNLIB= ${KERNDST}/libkern.a -KERNLIB_PROF= ${KERNDST}/libkern_p.a -.else -KERNLIB= ${KERNDST}/libkern.o -KERNLIB_PROF= ${KERNDST}/libkern.po -.endif - -KERNMAKE= \ - cd ${KERNDIR} && MAKEOBJDIR=${KERNDST} ${MAKE} \ - CC='${CC}' CFLAGS='${CFLAGS}' \ - AS='${AS}' AFLAGS='${AFLAGS}' \ - LD='${LD}' STRIP='${STRIP}' \ - MACHINE='${MACHINE}' MACHINE_ARCH='${MACHINE_ARCH}' \ - KERNCPPFLAGS='${CPPFLAGS:S@^-I.@-I../../.@g}' - -${KERNLIB}: .NOTMAIN __always_make_kernlib - @echo making sure the kern library is up to date... -.if (${KERN_AS} == "library") - @${KERNMAKE} libkern.a -.else - @${KERNMAKE} libkern.o -.endif - -${KERNLIB_PROF}: .NOTMAIN __always_make_kernlib - @echo making sure the profiled kern library is up to date... -.if (${KERN_AS} == "library") - @${KERNMAKE} libkern_p.a -.else - @${KERNMAKE} libkern.po -.endif - -clean: .NOTMAIN __always_make_kernlib - @echo cleaning the kern library objects - @${KERNMAKE} clean - -depend: .NOTMAIN __always_make_kernlib - @echo depending the kern library objects - @${KERNMAKE} depend - -__always_make_kernlib: .NOTMAIN - @mkdir -p ${KERNDST} diff --git a/sys/arch/alpha/stand/netboot/Makefile b/sys/arch/alpha/stand/netboot/Makefile index 29d2ff3a8ef..3c627fc84d6 100644 --- a/sys/arch/alpha/stand/netboot/Makefile +++ b/sys/arch/alpha/stand/netboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2006/02/15 12:40:50 mickey Exp $ +# $OpenBSD: Makefile,v 1.8 2007/11/25 18:25:30 deraadt Exp $ # $NetBSD: Makefile,v 1.11 1997/04/17 07:27:50 thorpej Exp $ S= ${.CURDIR}/../../../.. @@ -20,6 +20,9 @@ HEADERSIZE_PROG = headersize CLEANFILES+= vers.c vers.o ${PROG}.sym ${PROG}.nosym ${HEADERSIZE_PROG} +.PATH: ${S}/lib/libkern/arch/alpha ${S}/lib/libkern +SRCS+= bzero.c __divqu.S strlen.S __remqu.S + DEFNS= -DPRIMARY_BOOTBLOCK -DALPHA_BOOT_ELF -DSUN_BOOTPARAMS AFLAGS += -DASSEMBLER ${DEFNS} @@ -40,12 +43,6 @@ lint: .include <bsd.prog.mk> -### find out what to use for libkern -KERN_AS= library -KERNDST= ${.CURDIR}/../libkern/${__objdir} -.include "${.CURDIR}/../libkern/Makefile.inc" -LIBKERN= ${KERNLIB} - ### find out what to use for libz Z_AS= library ZDST= ${.CURDIR}/../libz/${__objdir} @@ -60,9 +57,9 @@ SA_ZLIB= yes .include "${.CURDIR}/../libsa/Makefile.inc" LIBSA= ${SALIB} -${PROG}.sym: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} +${PROG}.sym: ${OBJS} ${LIBSA} ${LIBZ} sh ${.CURDIR}/newvers.sh ${.CURDIR}/version ${COMPILE.c} vers.c ${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${PROG}.sym \ - ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} + ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBSA} size ${PROG}.sym diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64 index fc428942bb0..92131c6b535 100644 --- a/sys/arch/amd64/conf/Makefile.amd64 +++ b/sys/arch/amd64/conf/Makefile.amd64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.amd64,v 1.13 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.amd64,v 1.14 2007/11/25 18:25:27 deraadt Exp $ # Makefile for OpenBSD # @@ -56,14 +56,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 @@ -91,7 +83,7 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $< # ${SYSTEM_LD_HEAD} # ${SYSTEM_LD} swapxxx.o # ${SYSTEM_LD_TAIL} -SYSTEM_OBJ= locore.o vector.o copy.o spl.o param.o ioconf.o ${OBJS} ${LIBKERN} +SYSTEM_OBJ= locore.o vector.o copy.o spl.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; \ @@ -123,6 +115,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} diff --git a/sys/arch/amd64/stand/Makefile.inc b/sys/arch/amd64/stand/Makefile.inc index 7ef3710014d..41cc0024285 100644 --- a/sys/arch/amd64/stand/Makefile.inc +++ b/sys/arch/amd64/stand/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.4 2005/12/30 02:03:48 millert Exp $ +# $OpenBSD: Makefile.inc,v 1.5 2007/11/25 18:25:30 deraadt Exp $ CFLAGS=${DEBUG} ${COPTS} -Os -Wall -Werror CFLAGS+= -fno-stack-protector @@ -27,7 +27,7 @@ CLEANFILES+= machine SACFLAGS+=-nostdinc -fno-builtin -fpack-struct .endif -.if !make(libdep) && !make(sadep) && !make(salibdir) && !make(kernlibdir) && !make(obj) +.if !make(libdep) && !make(sadep) && !make(salibdir) && !make(obj) .BEGIN: @([ X$(S) = X -o -h machine ] || ln -s $(S)/arch/amd64/include machine) .endif diff --git a/sys/arch/amd64/stand/boot/Makefile b/sys/arch/amd64/stand/boot/Makefile index 5bbae80bbe7..e53352882a2 100644 --- a/sys/arch/amd64/stand/boot/Makefile +++ b/sys/arch/amd64/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2007/05/30 01:25:43 tom Exp $ +# $OpenBSD: Makefile,v 1.8 2007/11/25 18:25:30 deraadt Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -26,18 +26,15 @@ SRCS+= gidt.S alloca.S biosdev.c bioscons.c gateA20.c \ SRCS+= boot.c cmd.c vars.c bootarg.c .PATH: ${S}/lib/libsa -.PATH: ${S}/lib/libkern # for strl* and gcc support -# stand routines SRCS+= alloc.c exit.c getfile.c gets.c globals.c strcmp.c strlen.c \ strncmp.c memcmp.c memcpy.c memset.c printf.c snprintf.c \ strerror.c strncpy.c strtol.c strtoll.c ctime.c strlcpy.c strlcat.c -# io routines SRCS+= close.c closeall.c dev.c disklabel.c dkcksum.c fstat.c ioctl.c lseek.c \ open.c read.c stat.c write.c cread.c readdir.c cons.c loadfile.c \ elf32.c elf64.c -# boot filesystems SRCS+= ufs.c -# gcc support + +.PATH: ${S}/lib/libkern/arch/amd64 ${S}/lib/libkern SRCS+= divdi3.c moddi3.c qdivrem.c .PATH: ${S}/lib/libz @@ -48,7 +45,7 @@ boot.bin: boot ${PROG}: $(OBJS) $(LD) $(LDFLAGS) -o ${PROG} $(OBJS) - #@$(SIZE) ${PROG} + @$(SIZE) ${PROG} .else NOPROG= diff --git a/sys/arch/amd64/stand/cdboot/Makefile b/sys/arch/amd64/stand/cdboot/Makefile index 21469c17ed6..33b56c737a9 100644 --- a/sys/arch/amd64/stand/cdboot/Makefile +++ b/sys/arch/amd64/stand/cdboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.10 2007/05/30 01:25:43 tom Exp $ +# $OpenBSD: Makefile,v 1.11 2007/11/25 18:25:30 deraadt Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -26,20 +26,15 @@ SRCS+= gidt.S alloca.S biosdev.c bioscons.c gateA20.c \ SRCS+= cmd.c vars.c bootarg.c .PATH: ${S}/lib/libsa -.PATH: ${S}/lib/libkern # for strl* and gcc support -# stand routines -# not required: getfile.c gets.c globals.c strlcat.c SRCS+= alloc.c exit.c strcmp.c strlen.c \ strncmp.c memcmp.c memcpy.c memset.c printf.c snprintf.c \ strerror.c strncpy.c strtol.c strtoll.c ctime.c strlcpy.c -# io routines -# not required: ioctl.c write.c SRCS+= close.c closeall.c dev.c disklabel.c dkcksum.c fstat.c lseek.c \ open.c read.c stat.c cread.c readdir.c cons.c loadfile.c \ elf32.c elf64.c -# boot filesystems SRCS+= ufs.c cd9660.c -# gcc support + +.PATH: ${S}/lib/libkern/arch/i386 ${S}/lib/libkern SRCS+= divdi3.c moddi3.c qdivrem.c .PATH: ${S}/lib/libz diff --git a/sys/arch/amd64/stand/pxeboot/Makefile b/sys/arch/amd64/stand/pxeboot/Makefile index 801ff654c3e..1f346cbb1c8 100644 --- a/sys/arch/amd64/stand/pxeboot/Makefile +++ b/sys/arch/amd64/stand/pxeboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2007/05/30 01:25:43 tom Exp $ +# $OpenBSD: Makefile,v 1.8 2007/11/25 18:25:30 deraadt Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -27,22 +27,18 @@ SRCS+= pxe.c pxe_call.S pxe_net.c SRCS+= boot.c cmd.c vars.c bootarg.c .PATH: ${S}/lib/libsa -.PATH: ${S}/lib/libkern # for strl* and gcc support -# stand routines SRCS+= alloc.c exit.c getfile.c gets.c globals.c strcmp.c strlen.c \ strncmp.c memcmp.c memcpy.c memset.c printf.c snprintf.c \ strerror.c strncpy.c strtol.c strtoll.c ctime.c strlcpy.c strlcat.c -# io routines + SRCS+= close.c closeall.c dev.c disklabel.c dkcksum.c fstat.c ioctl.c lseek.c \ read.c stat.c write.c cread.c readdir.c cons.c loadfile.c \ elf32.c elf64.c -# network routines SRCS+= ether.c netif.c rpc.c -# network info services SRCS+= bootp.c bootparam.c -# boot filesystems SRCS+= ufs.c nfs.c tftp.c -# gcc support + +.PATH: ${S}/lib/libkern/arch/amd64 ${S}/lib/libkern SRCS+= divdi3.c moddi3.c qdivrem.c .PATH: ${S}/lib/libz diff --git a/sys/arch/arm/conf/files.arm b/sys/arch/arm/conf/files.arm index 64aa6d11a75..dabfe69765a 100644 --- a/sys/arch/arm/conf/files.arm +++ b/sys/arch/arm/conf/files.arm @@ -1,4 +1,4 @@ -# $OpenBSD: files.arm,v 1.11 2006/07/12 17:31:23 miod Exp $ +# $OpenBSD: files.arm,v 1.12 2007/11/25 18:25:27 deraadt Exp $ # $NetBSD: files.arm,v 1.76 2003/11/05 12:53:15 scw Exp $ # Floating point emulator @@ -107,3 +107,29 @@ file arch/arm/arm/bcopy_page.S #file arch/arm/arm/linux_sigcode.S compat_linux #file arch/arm/arm/linux_syscall.c compat_linux #file arch/arm/arm/linux_trap.c compat_linux + +# machine-dependent libkern components +file lib/libkern/arch/arm/divsi3.S +file lib/libkern/arch/arm/memcpy.S +file lib/libkern/arch/arm/memmove.S + +# quad support is neccessary for 32 bit architectures +file lib/libkern/adddi3.c +file lib/libkern/anddi3.c +file lib/libkern/ashldi3.c +file lib/libkern/ashrdi3.c +file lib/libkern/cmpdi2.c +file lib/libkern/divdi3.c +file lib/libkern/iordi3.c +file lib/libkern/lshldi3.c +file lib/libkern/lshrdi3.c +file lib/libkern/moddi3.c +file lib/libkern/muldi3.c +file lib/libkern/negdi2.c +file lib/libkern/notdi2.c +file lib/libkern/qdivrem.c +file lib/libkern/subdi3.c +file lib/libkern/ucmpdi2.c +file lib/libkern/udivdi3.c +file lib/libkern/umoddi3.c +file lib/libkern/xordi3.c diff --git a/sys/arch/armish/conf/Makefile.armish b/sys/arch/armish/conf/Makefile.armish index 002d5a65e23..c1729d20ec6 100644 --- a/sys/arch/armish/conf/Makefile.armish +++ b/sys/arch/armish/conf/Makefile.armish @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.armish,v 1.6 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.armish,v 1.7 2007/11/25 18:25:28 deraadt Exp $ # $NetBSD: Makefile.i386,v 1.67 1996/05/11 16:12:11 mycroft Exp $ # Makefile for OpenBSD @@ -61,14 +61,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 @@ -96,7 +88,7 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $< # ${SYSTEM_LD_HEAD} # ${SYSTEM_LD} swapxxx.o # ${SYSTEM_LD_TAIL} -SYSTEM_OBJ= ${BOARDTYPE}_start.o locore.o param.o ioconf.o ${OBJS} ${LIBKERN} +SYSTEM_OBJ= ${BOARDTYPE}_start.o locore.o param.o ioconf.o ${OBJS} SYSTEM_DEP= Makefile ${SYSTEM_OBJ} SYSTEM_LD_HEAD= rm -f $@ SYSTEM_LD_HEAD+=; \ @@ -137,6 +129,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} diff --git a/sys/arch/armish/stand/boot/Makefile b/sys/arch/armish/stand/boot/Makefile index e5d91f24a9b..f9c63b4da0d 100644 --- a/sys/arch/armish/stand/boot/Makefile +++ b/sys/arch/armish/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2006/07/29 15:01:49 kettenis Exp $ +# $OpenBSD: Makefile,v 1.5 2007/11/25 18:25:30 deraadt Exp $ NOMAN= @@ -21,10 +21,8 @@ SRCS+= conf.c devopen.c exec.c machdep.c dev_armish.c time.c SRCS+= clock.c ns16550.c wd.c wdc.c pciide.c SRCS+= ctime.c strtol.c -### find out what to use for libkern -KERN_AS= library -.include "${S}/lib/libkern/Makefile.inc" -LIBKERN= ${KERNLIB} +.PATH: ${S}/lib/libkern/arch/arm ${S}/lib/libkern +SRCS+= divsi3.S divdi3.c moddi3.c qdivrem.c strlcpy.c strlen.c ashrdi3.c ### find out what to use for libsa SA_AS= library @@ -35,8 +33,8 @@ LIBSA= ${SALIB} LDFLAGS= -T ${.CURDIR}/ldscript -${PROG}: ${OBJS} ${LIBKERN} ${LIBSA} - ${LD} ${LDFLAGS} -o boot ${OBJS} ${LIBSA} ${LIBKERN} ${LIBSA} +${PROG}: ${OBJS} ${LIBSA} + ${LD} ${LDFLAGS} -o boot ${OBJS} ${LIBSA} ${LIBSA} .if !make(obj) .BEGIN: diff --git a/sys/arch/aviion/conf/Makefile.aviion b/sys/arch/aviion/conf/Makefile.aviion index 3ddc96a1bae..d68ac192ef8 100644 --- a/sys/arch/aviion/conf/Makefile.aviion +++ b/sys/arch/aviion/conf/Makefile.aviion @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.aviion,v 1.4 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.aviion,v 1.5 2007/11/25 18:25:28 deraadt Exp $ # # Makefile for OpenBSD # @@ -58,14 +58,6 @@ HOSTED_CFLAGS?= ${CFLAGS} ### CPU configuration -### 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 @@ -92,7 +84,7 @@ PROFILE_C= ${CC} -S -c ${CFLAGS} ${CPPFLAGS} $<; \ # ${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; \ @@ -123,6 +115,9 @@ param.c: $S/conf/param.c param.o: param.c Makefile ${NORMAL_C} +mcount.o: $S/lib/libkern/mcount.c Makefile + ${NORMAL_C_NOP} + ioconf.o: ioconf.c ${NORMAL_C} diff --git a/sys/arch/hp300/conf/Makefile.hp300 b/sys/arch/hp300/conf/Makefile.hp300 index a4d766b8fab..802322b6a9a 100644 --- a/sys/arch/hp300/conf/Makefile.hp300 +++ b/sys/arch/hp300/conf/Makefile.hp300 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.hp300,v 1.41 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.hp300,v 1.42 2007/11/25 18:25:28 deraadt Exp $ # $NetBSD: Makefile.hp300,v 1.54 1997/04/01 23:16:41 scottr Exp $ # Makefile for OpenBSD @@ -92,14 +92,6 @@ CPPFLAGS+= -DM68K_MMU_HP CPPFLAGS+= -DM68K_MMU_MOTOROLA .endif -### find out what to use for libkern -.include "$S/lib/libkern/Makefile.inc" -.ifndef PROF -LIBKERN= ${KERNLIB} -.else -LIBKERN= ${KERNLIB_PROF} -.endif - ### for the Motorola 68040 Floating Point Software Product .include "${M68K}/fpsp/Makefile.inc" @@ -122,7 +114,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} ${FPSP} ${LIBKERN} +SYSTEM_OBJ= locore.o ${FPSP} 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; \ @@ -155,6 +147,9 @@ param.c: $S/conf/param.c param.o: param.c Makefile ${NORMAL_C} +mcount.o: $S/lib/libkern/mcount.c Makefile + ${NORMAL_C_NOP} + ioconf.o: ioconf.c ${NORMAL_C} diff --git a/sys/arch/hp300/stand/libkern/Makefile b/sys/arch/hp300/stand/libkern/Makefile deleted file mode 100644 index 5de723b5440..00000000000 --- a/sys/arch/hp300/stand/libkern/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# $OpenBSD: Makefile,v 1.7 2006/08/17 17:19:44 miod Exp $ - -LIB= kern - -.PATH: ${.CURDIR}/../../../../lib/libkern -.PATH: ${.CURDIR}/../../../../lib/libkern/arch/m68k - -.include "${.CURDIR}/../Makefile.inc" - -CFLAGS+=-I${.CURDIR}/../include \ - -I${.CURDIR}/../../../.. -I${.CURDIR}/../../../../lib/libkern - -AFLAGS= -x assembler-with-cpp -traditional-cpp -I${.CURDIR}/../include \ - -I${.CURDIR}/../../../.. -I${.CURDIR}/../../../../lib/libkern - -# kern routines -SRCS= __main.c ashrdi3.c divdi3.c qdivrem.c strlen.S strcmp.S \ - strncmp.S umoddi3.c - -NOPROFILE= -NOPIC= - -install: - -.include <bsd.lib.mk> diff --git a/sys/arch/hppa/conf/Makefile.hppa b/sys/arch/hppa/conf/Makefile.hppa index 49e5dfc0632..8f841028ab6 100644 --- a/sys/arch/hppa/conf/Makefile.hppa +++ b/sys/arch/hppa/conf/Makefile.hppa @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.hppa,v 1.29 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.hppa,v 1.30 2007/11/25 18:25:28 deraadt Exp $ # Makefile for OpenBSD # @@ -76,14 +76,6 @@ HOSTED_CFLAGS= ${CFLAGS} # this line must be there because libkern needs assym.h generated early depend:: .NOTMAIN .depend -### 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} where TYPE is NORMAL or # HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file). @@ -134,6 +126,9 @@ param.c: $S/conf/param.c param.o: param.c Makefile ${NORMAL_C} +mcount.o: $S/lib/libkern/mcount.c Makefile + ${NORMAL_C_NOP} + ioconf.o: ioconf.c ${NORMAL_C} @@ -187,9 +182,9 @@ assym.h machdep.o: Makefile # depend on CPU configuration locore.o machdep.o trap.o: Makefile - locore.o: ${HPPA}/hppa/locore.S assym.h ${NORMAL_S} + fpemu.o: assym.h # The install target can be redefined by putting a diff --git a/sys/arch/hppa/conf/files.hppa b/sys/arch/hppa/conf/files.hppa index 9241d3b5392..e7e836a9cab 100644 --- a/sys/arch/hppa/conf/files.hppa +++ b/sys/arch/hppa/conf/files.hppa @@ -1,4 +1,4 @@ -# $OpenBSD: files.hppa,v 1.74 2007/10/18 17:39:52 miod Exp $ +# $OpenBSD: files.hppa,v 1.75 2007/11/25 18:25:28 deraadt Exp $ # # hppa-specific configuration info @@ -315,3 +315,29 @@ file arch/hppa/hppa/in_cksum.c inet file netinet/in4_cksum.c inet file arch/hppa/dev/clock.c file arch/hppa/hppa/fpemu.S fpemul + +# quad support is neccessary for 32 bit architectures +file lib/libkern/adddi3.c +file lib/libkern/anddi3.c +file lib/libkern/ashldi3.c +file lib/libkern/ashrdi3.c +file lib/libkern/cmpdi2.c +file lib/libkern/divdi3.c +file lib/libkern/iordi3.c +file lib/libkern/lshldi3.c +file lib/libkern/lshrdi3.c +file lib/libkern/moddi3.c +file lib/libkern/muldi3.c +file lib/libkern/negdi2.c +file lib/libkern/notdi2.c +file lib/libkern/qdivrem.c +file lib/libkern/subdi3.c +file lib/libkern/ucmpdi2.c +file lib/libkern/udivdi3.c +file lib/libkern/umoddi3.c +file lib/libkern/xordi3.c + +# kern.. +file lib/libkern/arch/hppa/milli.S +file lib/libkern/arch/hppa/spcopy.S + diff --git a/sys/arch/hppa/stand/libkern/Makefile b/sys/arch/hppa/stand/libkern/Makefile deleted file mode 100644 index 8d7217dd7bd..00000000000 --- a/sys/arch/hppa/stand/libkern/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -# $OpenBSD: Makefile,v 1.5 2007/05/06 02:48:14 deraadt Exp $ - -LIB= kern - -S= ${.CURDIR}/../../../.. -M= ${KERNDIR}/arch/${MACHINE_ARCH} -SADIR= ${.CURDIR}/.. -KERNDIR=$S/lib/libkern - -NOPIC= nopic -NOPROFILE= noprofile - -.PATH: ${KERNDIR} - -.include "arch/hppa/Makefile.inc" - -# Quad support -SRCS+= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ - lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \ - subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c - -# Other stuff -SRCS+= srandom.c - -install: - -.include <bsd.lib.mk> -CPPFLAGS+= ${DEBUGFLAGS} -CFLAGS+= ${SACFLAGS} diff --git a/sys/arch/hppa64/conf/Makefile.hppa64 b/sys/arch/hppa64/conf/Makefile.hppa64 index 2f7422a58cd..fb41b12a22b 100644 --- a/sys/arch/hppa64/conf/Makefile.hppa64 +++ b/sys/arch/hppa64/conf/Makefile.hppa64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.hppa64,v 1.5 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.hppa64,v 1.6 2007/11/25 18:25:28 deraadt Exp $ # Makefile for OpenBSD # @@ -58,14 +58,6 @@ HOSTED_CFLAGS= ${CFLAGS} # this line must be there because libkern needs assym.h generated early depend:: .NOTMAIN .depend -### 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} where TYPE is NORMAL or # HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file). @@ -85,7 +77,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} ${LIBSPMATH} ${LIBKERN} +SYSTEM_OBJ= locore.o param.o ioconf.o ${OBJS} ${LIBSPMATH} SYSTEM_DEP= Makefile ${SYSTEM_OBJ} SYSTEM_LD_HEAD= @rm -f $@ SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \ @@ -116,6 +108,12 @@ param.c: $S/conf/param.c param.o: param.c Makefile ${NORMAL_C} +mcount.o: $S/lib/libkern/mcount.c Makefile + ${NORMAL_C_NOP} + +mcount.o: $S/lib/libkern/mcount.c Makefile + ${NORMAL_C_NOP} + ioconf.o: ioconf.c ${NORMAL_C} @@ -169,9 +167,9 @@ assym.h machdep.o: Makefile # depend on CPU configuration locore.o machdep.o trap.o: Makefile - locore.o: ${HPPA}/hppa64/locore.S assym.h ${NORMAL_S} + fpemu.o: assym.h # The install target can be redefined by putting a diff --git a/sys/arch/hppa64/stand/libkern/Makefile b/sys/arch/hppa64/stand/libkern/Makefile deleted file mode 100644 index da76711c749..00000000000 --- a/sys/arch/hppa64/stand/libkern/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -# $OpenBSD: Makefile,v 1.2 2007/05/06 02:48:44 deraadt Exp $ - -LIB= kern - -S= ${.CURDIR}/../../../.. -M= ${KERNDIR}/arch/${MACHINE_ARCH} -SADIR= ${.CURDIR}/.. -KERNDIR=$S/lib/libkern - -NOPIC= nopic -NOPROFILE= noprofile - -.PATH: ${KERNDIR} - -.include "arch/hppa64/Makefile.inc" - -# Quad support -SRCS+= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ - lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \ - subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c - -# Other stuff -SRCS+= srandom.c - -install: - -.include <bsd.lib.mk> -CPPFLAGS+= ${DEBUGFLAGS} -CFLAGS+= ${SACFLAGS} diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386 index 4ff169db45c..6b33f326b96 100644 --- a/sys/arch/i386/conf/Makefile.i386 +++ b/sys/arch/i386/conf/Makefile.i386 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.i386,v 1.48 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.i386,v 1.49 2007/11/25 18:25:28 deraadt Exp $ # Makefile for OpenBSD # @@ -54,19 +54,12 @@ 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 # is marked as config-dependent. +NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $< NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $< @@ -89,7 +82,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; \ @@ -121,6 +114,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} diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386 index 0466e09ec8e..6c288408bd8 100644 --- a/sys/arch/i386/conf/files.i386 +++ b/sys/arch/i386/conf/files.i386 @@ -1,4 +1,4 @@ -# $OpenBSD: files.i386,v 1.169 2007/11/25 17:11:12 oga Exp $ +# $OpenBSD: files.i386,v 1.170 2007/11/25 18:25:28 deraadt Exp $ # # new style config file for i386 architecture # @@ -446,3 +446,24 @@ file arch/i386/i386/esm.c esm needs-flag include "dev/vesa/files.vesa" #include "dev/rasops/files.rasops" + +# quad support is neccessary for 32 bit architectures +file lib/libkern/adddi3.c +file lib/libkern/anddi3.c +file lib/libkern/ashldi3.c +file lib/libkern/ashrdi3.c +file lib/libkern/cmpdi2.c +file lib/libkern/divdi3.c +file lib/libkern/iordi3.c +file lib/libkern/lshldi3.c +file lib/libkern/lshrdi3.c +file lib/libkern/moddi3.c +file lib/libkern/muldi3.c +file lib/libkern/negdi2.c +file lib/libkern/notdi2.c +file lib/libkern/qdivrem.c +file lib/libkern/subdi3.c +file lib/libkern/ucmpdi2.c +file lib/libkern/udivdi3.c +file lib/libkern/umoddi3.c +file lib/libkern/xordi3.c diff --git a/sys/arch/i386/stand/Makefile b/sys/arch/i386/stand/Makefile index 8bd42d130d2..29178462331 100644 --- a/sys/arch/i386/stand/Makefile +++ b/sys/arch/i386/stand/Makefile @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile,v 1.14 2007/04/13 17:34:40 millert Exp $ +# $OpenBSD: Makefile,v 1.15 2007/11/25 18:25:31 deraadt Exp $ .if ${MACHINE} == "i386" -SUBDIR= etc libsa libkern libz mbr cdbr +SUBDIR= etc libsa libz mbr cdbr .endif SUBDIR+= biosboot installboot boot pxeboot cdboot diff --git a/sys/arch/i386/stand/boot/Makefile b/sys/arch/i386/stand/boot/Makefile index 6f81bbe376a..04f3a5337d7 100644 --- a/sys/arch/i386/stand/boot/Makefile +++ b/sys/arch/i386/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.33 2006/10/30 18:28:57 jmc Exp $ +# $OpenBSD: Makefile,v 1.34 2007/11/25 18:25:31 deraadt Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -24,11 +24,14 @@ SRCS+= boot.c cmd.c vars.c bootarg.c conf.c S =${.CURDIR}/../../../.. SADIR= ${.CURDIR}/.. -LDADD= ${LIBSA} ${LIBZ} ${LIBKERN} -DPADD= ${LIBSA} ${LIBZ} ${LIBKERN} +LDADD= ${LIBSA} ${LIBZ} +DPADD= ${LIBSA} ${LIBZ} .PATH: ${S}/stand/boot +.PATH: ${S}/lib/libkern/arch/i386 ${S}/lib/libkern +SRCS+= strlcpy.c moddi3.c divdi3.c qdivrem.c + boot.bin: boot objcopy -v -O binary ${PROG} boot.bin diff --git a/sys/arch/i386/stand/cdboot/Makefile b/sys/arch/i386/stand/cdboot/Makefile index 5e2e9b82ac0..f4f98939815 100644 --- a/sys/arch/i386/stand/cdboot/Makefile +++ b/sys/arch/i386/stand/cdboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2007/05/29 00:03:10 deraadt Exp $ +# $OpenBSD: Makefile,v 1.6 2007/11/25 18:25:32 deraadt Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -19,8 +19,11 @@ SRCS+= boot.c cmd.c vars.c bootarg.c conf.c S =${.CURDIR}/../../../.. SADIR= ${.CURDIR}/.. -LDADD= ${LIBSA} ${LIBZ} ${LIBKERN} -DPADD= ${LIBSA} ${LIBZ} ${LIBKERN} +LDADD= ${LIBSA} ${LIBZ} +DPADD= ${LIBSA} ${LIBZ} + +.PATH: ${S}/lib/libkern/arch/i386 ${S}/lib/libkern +SRCS+= strlcpy.c moddi3.c divdi3.c qdivrem.c .PATH: ${S}/stand/boot diff --git a/sys/arch/i386/stand/libkern/Makefile b/sys/arch/i386/stand/libkern/Makefile deleted file mode 100644 index 5492d91d137..00000000000 --- a/sys/arch/i386/stand/libkern/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# $OpenBSD: Makefile,v 1.2 2006/09/18 21:14:15 mpf Exp $ - -.include "${.CURDIR}/../Makefile.inc" - -LIB= kern - -S=${.CURDIR}/../../../.. -SADIR=${.CURDIR}/.. - -.PATH: ${S}/lib/libkern - -NOPROFILE=noprofile -NOPIC=nopic - -# kern routines -SRCS+= divdi3.c moddi3.c qdivrem.c strlcpy.c strlcat.c - -all: ${KERNLIB} - -install: - -.include <bsd.lib.mk> diff --git a/sys/arch/i386/stand/pxeboot/Makefile b/sys/arch/i386/stand/pxeboot/Makefile index fce837db82b..85a8f2fac03 100644 --- a/sys/arch/i386/stand/pxeboot/Makefile +++ b/sys/arch/i386/stand/pxeboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 2005/07/30 14:32:46 millert Exp $ +# $OpenBSD: Makefile,v 1.3 2007/11/25 18:25:32 deraadt Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -19,8 +19,11 @@ SRCS+= boot.c cmd.c vars.c bootarg.c conf.c devopen.c net.c open.c S =${.CURDIR}/../../../.. SADIR= ${.CURDIR}/.. -LDADD= ${LIBSA} ${LIBZ} ${LIBKERN} -DPADD= ${LIBSA} ${LIBZ} ${LIBKERN} +LDADD= ${LIBSA} ${LIBZ} +DPADD= ${LIBSA} ${LIBZ} + +.PATH: ${S}/lib/libkern/arch/i386 ${S}/lib/libkern +SRCS+= strlcpy.c moddi3.c divdi3.c qdivrem.c .PATH: ${S}/stand/boot diff --git a/sys/arch/landisk/conf/Makefile.landisk b/sys/arch/landisk/conf/Makefile.landisk index 84740c25be5..57bbde8a6fe 100644 --- a/sys/arch/landisk/conf/Makefile.landisk +++ b/sys/arch/landisk/conf/Makefile.landisk @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.landisk,v 1.5 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.landisk,v 1.6 2007/11/25 18:25:28 deraadt Exp $ # # Makefile for OpenBSD/landisk # @@ -56,14 +56,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 @@ -93,7 +85,7 @@ NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@ # ${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; \ @@ -127,6 +119,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} @@ -180,7 +175,6 @@ assym.h machdep.o: Makefile # depend on CPU configuration locore.o machdep.o: Makefile - locore.o: ${LANDISK}/landisk/locore.S assym.h ${NORMAL_S} diff --git a/sys/arch/landisk/stand/boot/Makefile b/sys/arch/landisk/stand/boot/Makefile index 29479c96489..141c97d8192 100644 --- a/sys/arch/landisk/stand/boot/Makefile +++ b/sys/arch/landisk/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2006/11/12 19:37:01 deraadt Exp $ +# $OpenBSD: Makefile,v 1.5 2007/11/25 18:25:32 deraadt Exp $ PROG= boot SRCS= srt0.S conf.c devs.c getsecs.c scifcons.c delay.c @@ -17,6 +17,9 @@ CFLAGS+=-m4-nofpu .PATH: ${S}/stand/boot SRCS+= boot.c cmd.c vars.c bootarg.c +.PATH: ${S}/lib/libkern/arch/sh ${S}/lib/libkern +SRCS+= strlen.c strlcpy.c + SAREL= SA_ZLIB= USE_LOADFILE= @@ -26,11 +29,6 @@ SRCS+= ctime.c strtol.c DPADD+= $(SALIB) LDADD+= $(SALIB) -KERN_AS?= library -.include "${S}/lib/libkern/Makefile.inc" -DPADD+= $(KERNLIB) -LDADD+= $(KERNLIB) - Z_AS?= library .include "${S}/lib/libz/Makefile.inc" DPADD+= $(ZLIB) diff --git a/sys/arch/landisk/stand/xxboot/Makefile b/sys/arch/landisk/stand/xxboot/Makefile index c0b34aba72f..83055ec07cd 100644 --- a/sys/arch/landisk/stand/xxboot/Makefile +++ b/sys/arch/landisk/stand/xxboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2006/11/08 20:03:32 drahn Exp $ +# $OpenBSD: Makefile,v 1.4 2007/11/25 18:25:32 deraadt Exp $ MAN= xxboot.8 @@ -27,10 +27,8 @@ SAREL= DPADD+= $(SALIB) LDADD+= $(SALIB) -KERN_AS?= library -.include "${S}/lib/libkern/Makefile.inc" -DPADD+= $(KERNLIB) -LDADD+= $(KERNLIB) +.PATH: ${S}/lib/libkern/arch/sh ${S}/lib/libkern +SRCS+= strlen.c LIBGCC!=${CC} -print-libgcc-file-name LDADD+= $(LIBGCC) diff --git a/sys/arch/luna88k/conf/Makefile.luna88k b/sys/arch/luna88k/conf/Makefile.luna88k index 3a8643e3a4b..e5b3aa76335 100644 --- a/sys/arch/luna88k/conf/Makefile.luna88k +++ b/sys/arch/luna88k/conf/Makefile.luna88k @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.luna88k,v 1.10 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.luna88k,v 1.11 2007/11/25 18:25:28 deraadt Exp $ # # Makefile for OpenBSD # @@ -54,14 +54,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 @@ -88,7 +80,7 @@ PROFILE_C= ${CC} -S -c ${CFLAGS} ${CPPFLAGS} $<; \ # ${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; \ @@ -119,6 +111,9 @@ param.c: $S/conf/param.c param.o: param.c Makefile ${NORMAL_C} +mcount.o: $S/lib/libkern/mcount.c Makefile + ${NORMAL_C_NOP} + ioconf.o: ioconf.c ${NORMAL_C} diff --git a/sys/arch/m68k/conf/files.m68k b/sys/arch/m68k/conf/files.m68k index 68d5edc8d9c..fb913871203 100644 --- a/sys/arch/m68k/conf/files.m68k +++ b/sys/arch/m68k/conf/files.m68k @@ -1,4 +1,4 @@ -# $OpenBSD: files.m68k,v 1.17 2007/02/05 05:46:11 miod Exp $ +# $OpenBSD: files.m68k,v 1.18 2007/11/25 18:25:28 deraadt Exp $ # $NetBSD: files.m68k,v 1.18 1997/06/06 23:15:28 veego Exp $ # file arch/m68k/m68k/bcopy.s @@ -28,3 +28,24 @@ include "compat/m68k4k/files.m68k4k" # include "compat/sunos/files.sunos" file arch/m68k/m68k/sunos_machdep.c compat_sunos + +# quad support is neccessary for 32 bit architectures +file lib/libkern/adddi3.c +file lib/libkern/anddi3.c +file lib/libkern/ashldi3.c +file lib/libkern/ashrdi3.c +file lib/libkern/cmpdi2.c +file lib/libkern/divdi3.c +file lib/libkern/iordi3.c +file lib/libkern/lshldi3.c +file lib/libkern/lshrdi3.c +file lib/libkern/moddi3.c +file lib/libkern/muldi3.c +file lib/libkern/negdi2.c +file lib/libkern/notdi2.c +file lib/libkern/qdivrem.c +file lib/libkern/subdi3.c +file lib/libkern/ucmpdi2.c +file lib/libkern/udivdi3.c +file lib/libkern/umoddi3.c +file lib/libkern/xordi3.c diff --git a/sys/arch/m88k/conf/files.m88k b/sys/arch/m88k/conf/files.m88k index 86812f60371..65e2692ebb7 100644 --- a/sys/arch/m88k/conf/files.m88k +++ b/sys/arch/m88k/conf/files.m88k @@ -1,4 +1,4 @@ -# $OpenBSD: files.m88k,v 1.16 2005/12/03 19:01:13 miod Exp $ +# $OpenBSD: files.m88k,v 1.17 2007/11/25 18:25:28 deraadt Exp $ file arch/m88k/m88k/db_disasm.c ddb file arch/m88k/m88k/db_interface.c ddb @@ -21,3 +21,24 @@ file arch/m88k/m88k/trap.c file arch/m88k/m88k/vectors_88100.S m88100 file arch/m88k/m88k/vectors_88110.S m88110 file arch/m88k/m88k/vm_machdep.c + +# quad support is neccessary for 32 bit architectures +file lib/libkern/adddi3.c +file lib/libkern/anddi3.c +file lib/libkern/ashldi3.c +file lib/libkern/ashrdi3.c +file lib/libkern/cmpdi2.c +file lib/libkern/divdi3.c +file lib/libkern/iordi3.c +file lib/libkern/lshldi3.c +file lib/libkern/lshrdi3.c +file lib/libkern/moddi3.c +file lib/libkern/muldi3.c +file lib/libkern/negdi2.c +file lib/libkern/notdi2.c +file lib/libkern/qdivrem.c +file lib/libkern/subdi3.c +file lib/libkern/ucmpdi2.c +file lib/libkern/udivdi3.c +file lib/libkern/umoddi3.c +file lib/libkern/xordi3.c diff --git a/sys/arch/mac68k/conf/Makefile.mac68k b/sys/arch/mac68k/conf/Makefile.mac68k index 5477aead64a..ddee7505ea6 100644 --- a/sys/arch/mac68k/conf/Makefile.mac68k +++ b/sys/arch/mac68k/conf/Makefile.mac68k @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.mac68k,v 1.37 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.mac68k,v 1.38 2007/11/25 18:25:28 deraadt Exp $ # $NetBSD: Makefile.mac68k,v 1.53 1997/04/15 06:11:38 scottr Exp $ # Makefile for OpenBSD @@ -55,14 +55,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 - ### for the Motorola 68040 Floating Point Software Product .include "${M68K}/fpsp/Makefile.inc" @@ -93,7 +85,7 @@ NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $< # ${SYSTEM_LD_HEAD} # ${SYSTEM_LD} swapxxx.o # ${SYSTEM_LD_TAIL} -SYSTEM_OBJ= locore.o param.o ioconf.o ${OBJS} ${FPSP} ${LIBKERN} +SYSTEM_OBJ= locore.o ${FPSP} 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; \ @@ -126,6 +118,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} diff --git a/sys/arch/macppc/conf/Makefile.macppc b/sys/arch/macppc/conf/Makefile.macppc index 5b27d0a3bdc..53010eb3bd5 100644 --- a/sys/arch/macppc/conf/Makefile.macppc +++ b/sys/arch/macppc/conf/Makefile.macppc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.macppc,v 1.26 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.macppc,v 1.27 2007/11/25 18:25:28 deraadt Exp $ # # Makefile for OpenBSD PowerPC # @@ -55,14 +55,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 @@ -92,7 +84,7 @@ NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@ # ${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; \ @@ -124,6 +116,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} diff --git a/sys/arch/macppc/stand/Makefile b/sys/arch/macppc/stand/Makefile index 2637b213d74..c7664776f1b 100644 --- a/sys/arch/macppc/stand/Makefile +++ b/sys/arch/macppc/stand/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2005/07/20 19:40:04 deraadt Exp $ +# $OpenBSD: Makefile,v 1.4 2007/11/25 18:25:32 deraadt Exp $ # $NetBSD: Makefile,v 1.1 1996/09/30 16:34:59 ws Exp $ SUBDIR= ofwboot boot.mac mbr tbxidata @@ -13,12 +13,11 @@ USE_LOADFILE=yes .include "Makefile.inc" .include "$S/lib/libz/Makefile.inc" .include "$S/lib/libsa/Makefile.inc" -.include "$S/lib/libkern/Makefile.inc" -all: ${ZLIB} ${SALIB} ${KERNLIB} _SUBDIRUSE +all: ${ZLIB} ${SALIB} _SUBDIRUSE libdep: - @echo ${.OBJDIR}/${SALIB} ${ZLIB} ${KERNLIB} + @echo ${.OBJDIR}/${SALIB} ${ZLIB} ${PROG}: diff --git a/sys/arch/macppc/stand/boot.mac/Makefile b/sys/arch/macppc/stand/boot.mac/Makefile index 524e13c334b..b355ec6c4d0 100644 --- a/sys/arch/macppc/stand/boot.mac/Makefile +++ b/sys/arch/macppc/stand/boot.mac/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2007/06/13 02:17:32 drahn Exp $ +# $OpenBSD: Makefile,v 1.4 2007/11/25 18:25:32 deraadt Exp $ # $NetBSD: Makefile,v 1.1 1996/09/30 16:35:05 ws Exp $ S= ${.CURDIR}/../../../.. @@ -20,6 +20,9 @@ LDFLAGS= -X -Ttext ${RELOC} -e $(ENTRY) -T ${.CURDIR}/elf32_powerpc_merge.x -Bst .PATH: ${S}/stand/boot .PATH: ${S}/lib/libsa +.PATH: ${S}/lib/libkern/arch/powerpc ${S}/lib/libkern +SRCS+= strlcpy.c memcpy.c strlen.c strrchr.c strlcat.c ashrdi3.c + CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. CPPFLAGS+= -DRELOC=0x${RELOC} -DCONSPEED=57600 CPPFLAGS+= -DXCOFF_GLUE # for booting PCI Powermacs diff --git a/sys/arch/macppc/stand/ofwboot/Makefile b/sys/arch/macppc/stand/ofwboot/Makefile index fb3d67ef14f..b9c49aed2ef 100644 --- a/sys/arch/macppc/stand/ofwboot/Makefile +++ b/sys/arch/macppc/stand/ofwboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2007/06/13 02:17:32 drahn Exp $ +# $OpenBSD: Makefile,v 1.5 2007/11/25 18:25:32 deraadt Exp $ # $NetBSD: Makefile,v 1.2 1997/04/17 07:46:24 thorpej Exp $ S= ${.CURDIR}/../../../.. @@ -20,6 +20,9 @@ BINDIR= /usr/mdec .PATH: ${S}/stand/boot .PATH: ${S}/lib/libsa +.PATH: ${S}/lib/libkern/arch/powerpc ${S}/lib/libkern +SRCS+= strlcpy.c memcpy.c strlen.c strrchr.c strlcat.c ashrdi3.c + NEWVERSWHAT= "OpenFirmware Boot" # For now... @@ -32,7 +35,7 @@ CPPFLAGS+= -DRELOC=0x${RELOC} -DCONSPEED=57600 LIBS!= cd $(.CURDIR)/$(R); $(MAKE) libdep -${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} +${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LD} -N -X -Ttext ${RELOC} -e ${ENTRY} -o ${PROG} \ ${OBJS} ${LIBS} diff --git a/sys/arch/mvme68k/conf/Makefile.mvme68k b/sys/arch/mvme68k/conf/Makefile.mvme68k index b754748e0ed..a2a1efa2c73 100644 --- a/sys/arch/mvme68k/conf/Makefile.mvme68k +++ b/sys/arch/mvme68k/conf/Makefile.mvme68k @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.mvme68k,v 1.29 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.mvme68k,v 1.30 2007/11/25 18:25:28 deraadt Exp $ # This makefile is constructed from a machine description: # config machineid @@ -54,14 +54,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 - ### for the Motorola 68040 Floating Point Software Product .include "${M68K}/fpsp/Makefile.inc" @@ -87,7 +79,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} ${FPSP} ${060SP} ${LIBKERN} +SYSTEM_OBJ= locore.o param.o ioconf.o ${OBJS} ${FPSP} ${060SP} SYSTEM_DEP= Makefile ${SYSTEM_OBJ} SYSTEM_LD_HEAD= @rm -f $@ SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \ @@ -120,6 +112,9 @@ param.c: $S/conf/param.c param.o: param.c Makefile ${NORMAL_C} +mcount.o: $S/lib/libkern/mcount.c Makefile + ${NORMAL_C_NOP} + ioconf.o: ioconf.c ${NORMAL_C} diff --git a/sys/arch/mvme88k/conf/Makefile.mvme88k b/sys/arch/mvme88k/conf/Makefile.mvme88k index b0d78b7c7da..8e356b8005b 100644 --- a/sys/arch/mvme88k/conf/Makefile.mvme88k +++ b/sys/arch/mvme88k/conf/Makefile.mvme88k @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.mvme88k,v 1.41 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.mvme88k,v 1.42 2007/11/25 18:25:29 deraadt Exp $ # # Makefile for OpenBSD # @@ -56,14 +56,6 @@ HOSTED_CFLAGS?= ${CFLAGS} ### CPU configuration -### 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 @@ -91,7 +83,7 @@ PROFILE_C= ${CC} -S -c ${CFLAGS} ${CPPFLAGS} $<; \ # ${SYSTEM_LD} swapxxx.o # ${SYSTEM_LD_TAIL} # Kernel is linked as a ZMAGIC executable, with start at 10020 -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; \ @@ -122,6 +114,9 @@ param.c: $S/conf/param.c param.o: param.c Makefile ${NORMAL_C} +mcount.o: $S/lib/libkern/mcount.c Makefile + ${NORMAL_C_NOP} + ioconf.o: ioconf.c ${NORMAL_C} diff --git a/sys/arch/mvmeppc/conf/Makefile.mvmeppc b/sys/arch/mvmeppc/conf/Makefile.mvmeppc index efea50b1815..4920eb15a9f 100644 --- a/sys/arch/mvmeppc/conf/Makefile.mvmeppc +++ b/sys/arch/mvmeppc/conf/Makefile.mvmeppc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.mvmeppc,v 1.24 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.mvmeppc,v 1.25 2007/11/25 18:25:29 deraadt Exp $ # # Makefile for OpenBSD PowerPC # @@ -55,14 +55,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 @@ -92,7 +84,7 @@ NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@ # ${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; \ @@ -124,6 +116,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} diff --git a/sys/arch/powerpc/conf/files.powerpc b/sys/arch/powerpc/conf/files.powerpc index 85d51db5a41..88cb76a7146 100644 --- a/sys/arch/powerpc/conf/files.powerpc +++ b/sys/arch/powerpc/conf/files.powerpc @@ -1,4 +1,4 @@ -# $OpenBSD: files.powerpc,v 1.44 2007/11/14 20:33:32 thib Exp $ +# $OpenBSD: files.powerpc,v 1.45 2007/11/25 18:25:29 deraadt Exp $ # file arch/powerpc/powerpc/setjmp.S ddb @@ -18,3 +18,24 @@ file arch/powerpc/powerpc/intr.c file arch/powerpc/ddb/db_memrw.c ddb file arch/powerpc/ddb/db_disasm.c ddb file arch/powerpc/ddb/db_trace.c ddb + +# quad support is neccessary for 32 bit architectures +file lib/libkern/adddi3.c +file lib/libkern/anddi3.c +file lib/libkern/ashldi3.c +file lib/libkern/ashrdi3.c +file lib/libkern/cmpdi2.c +file lib/libkern/divdi3.c +file lib/libkern/iordi3.c +file lib/libkern/lshldi3.c +file lib/libkern/lshrdi3.c +file lib/libkern/moddi3.c +file lib/libkern/muldi3.c +file lib/libkern/negdi2.c +file lib/libkern/notdi2.c +file lib/libkern/qdivrem.c +file lib/libkern/subdi3.c +file lib/libkern/ucmpdi2.c +file lib/libkern/udivdi3.c +file lib/libkern/umoddi3.c +file lib/libkern/xordi3.c diff --git a/sys/arch/sgi/conf/Makefile.sgi b/sys/arch/sgi/conf/Makefile.sgi index 9ab40a13c2b..5724e394797 100644 --- a/sys/arch/sgi/conf/Makefile.sgi +++ b/sys/arch/sgi/conf/Makefile.sgi @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sgi,v 1.17 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.sgi,v 1.18 2007/11/25 18:25:29 deraadt Exp $ # Makefile for OpenBSD # @@ -61,14 +61,6 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp \ -mno-abicalls ${ABI} -D_LOCORE STRIPFLAGS= -g -X -x -### find out what to use for libkern -.include "$S/lib/libkern/Makefile.inc" -.ifndef PROF -LIBKERN= ${KERNLIB} -.else -LIBKERN= ${KERNLIB_PROF} -.endif - NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $< NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $< @@ -85,7 +77,7 @@ NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@ # ${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= @if [ X${DEBUG} = X-g ]; \ @@ -166,6 +158,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} + newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} sh $S/conf/newvers.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c diff --git a/sys/arch/sgi/stand/boot/Makefile b/sys/arch/sgi/stand/boot/Makefile index 92cdb5fbc72..6d4be9b4d82 100644 --- a/sys/arch/sgi/stand/boot/Makefile +++ b/sys/arch/sgi/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2005/07/21 13:22:53 deraadt Exp $ +# $OpenBSD: Makefile,v 1.6 2007/11/25 18:25:32 deraadt Exp $ PROG= boot @@ -18,6 +18,9 @@ SRCS= start.S boot.c filesystem.c conf.c diskio.c arcbios.c strstr.c CLEANFILES+= machine mips64 +.PATH: ${S}/lib/libkern/arch/mips64 ${S}/lib/libkern +SRCS+= strlcpy.c memcpy.c strlen.c strrchr.c strlcat.c ashrdi3.c + .if !make(libdep) && !make(sadep) && !make(salibdir) && !make(kernlibdir) && !make(obj) .BEGIN: @([ -h machine ] || ln -s ${.CURDIR}/../../include machine) @@ -26,7 +29,7 @@ CLEANFILES+= machine mips64 ${PROG}: $(OBJS) $(LDADD) $(LD) $(LDFLAGS) -o boot $(OBJS) -L${LIBSADIR} ${LIBSA} \ - -L${LIBZDIR} ${LIBZ} -L${LIBKERNDIR} ${LIBKERN} + -L${LIBZDIR} ${LIBZ} install: diff --git a/sys/arch/sgi/stand/libkern/Makefile b/sys/arch/sgi/stand/libkern/Makefile deleted file mode 100644 index e90e17c4408..00000000000 --- a/sys/arch/sgi/stand/libkern/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# $OpenBSD: Makefile,v 1.5 2005/07/21 13:23:01 deraadt Exp $ - -LIB= kern - -.PATH: ${.CURDIR}/../../../../lib/libkern - -CFLAGS= -O2 ${SAABI} -mno-abicalls -D_NO_ABICALLS ${STANDALONE} \ - -nostdinc -I${.CURDIR}/../include -I${.CURDIR}/../../../.. \ - -I${.CURDIR}/../../../../lib/libkern \ - -I${.CURDIR}/../../../../lib/libkern/arch/mips64 -I${.CURDIR} \ - -I${.OBJDIR} - -AFLAGS= -x assembler-with-cpp -traditional-cpp -I${.CURDIR}/../include \ - -I${.CURDIR}/../../../.. -I${.CURDIR}/../../../../lib/libkern \ - -I${.CURDIR}/../../../../lib/libkern/arch/mips64 \ - -I${.OBJDIR} - -# kern routines -SRCS= __main.c ashrdi3.c bzero.c divdi3.c qdivrem.c strlen.c \ - strcmp.c strlcat.c strlcpy.c strncmp.c umoddi3.c udivdi3.c \ - moddi3.c - -${OBJS}: ${.CURDIR}/../Makefile.inc - -CLEANFILES += machine mips64 - -NOPROFILE= -NOPIC= - -.if !make(libdep) && !make(sadep) && !make(salibdir) && !make(kernlibdir) && !make(obj) -.BEGIN: - @([ -h machine ] || ln -s ${.CURDIR}/../../include machine) - @([ -h mips64 ] || ln -s ${.CURDIR}/../../../mips64/include mips64) -.endif - -install: - -.include <bsd.lib.mk> diff --git a/sys/arch/sh/conf/files.sh b/sys/arch/sh/conf/files.sh index 112ffebf172..6884cf955ad 100644 --- a/sys/arch/sh/conf/files.sh +++ b/sys/arch/sh/conf/files.sh @@ -1,4 +1,4 @@ -# $OpenBSD: files.sh,v 1.2 2007/05/01 18:59:40 miod Exp $ +# $OpenBSD: files.sh,v 1.3 2007/11/25 18:25:29 deraadt Exp $ # $NetBSD: files.sh3,v 1.32 2005/12/11 12:18:58 christos Exp $ file arch/sh/sh/cache.c @@ -30,3 +30,29 @@ file arch/sh/sh/in_cksum.S inet file netinet/in4_cksum.c inet file dev/cninit.c + +# quad support is neccessary for 32 bit architectures +file lib/libkern/adddi3.c +file lib/libkern/anddi3.c +file lib/libkern/ashldi3.c +file lib/libkern/ashrdi3.c +file lib/libkern/cmpdi2.c +file lib/libkern/divdi3.c +file lib/libkern/iordi3.c +file lib/libkern/lshldi3.c +file lib/libkern/lshrdi3.c +file lib/libkern/moddi3.c +file lib/libkern/muldi3.c +file lib/libkern/negdi2.c +file lib/libkern/notdi2.c +file lib/libkern/qdivrem.c +file lib/libkern/subdi3.c +file lib/libkern/ucmpdi2.c +file lib/libkern/udivdi3.c +file lib/libkern/umoddi3.c +file lib/libkern/xordi3.c + +file lib/libkern/arch/sh/movstr_i4.S +file lib/libkern/arch/sh/sdivsi3.S +file lib/libkern/arch/sh/udivsi3.S + diff --git a/sys/arch/solbourne/conf/Makefile.solbourne b/sys/arch/solbourne/conf/Makefile.solbourne index caa8bdd1b43..e7d223690eb 100644 --- a/sys/arch/solbourne/conf/Makefile.solbourne +++ b/sys/arch/solbourne/conf/Makefile.solbourne @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.solbourne,v 1.5 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.solbourne,v 1.6 2007/11/25 18:25:29 deraadt Exp $ # Makefile for OpenBSD # @@ -56,14 +56,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 @@ -91,7 +83,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; \ @@ -123,6 +115,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} diff --git a/sys/arch/sparc/conf/Makefile.sparc b/sys/arch/sparc/conf/Makefile.sparc index bc1a6f1a357..485386d9782 100644 --- a/sys/arch/sparc/conf/Makefile.sparc +++ b/sys/arch/sparc/conf/Makefile.sparc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sparc,v 1.40 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.sparc,v 1.41 2007/11/25 18:25:29 deraadt Exp $ # $NetBSD: Makefile.sparc,v 1.32.4.1 1996/06/12 20:26:32 pk Exp $ # Makefile for OpenBSD @@ -62,14 +62,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 @@ -97,7 +89,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; \ @@ -129,6 +121,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} @@ -186,7 +181,6 @@ bwtwo.o cgsix.o cgthree.o cgtwo.o cons.o dma.o esp.o fb.o if_ie.o: Makefile ms.c obio.o zs.c autoconf.o clock.o cpu.o disksubr.o locore.o: Makefile machdep.o mem.o openprom.o pmap.o vm_machdep.o: Makefile - locore.o: ${SPARC}/sparc/locore.s assym.h ${NORMAL_S} diff --git a/sys/arch/sparc/conf/files.sparc b/sys/arch/sparc/conf/files.sparc index 1e4de8736a5..b438c4f483b 100644 --- a/sys/arch/sparc/conf/files.sparc +++ b/sys/arch/sparc/conf/files.sparc @@ -1,4 +1,4 @@ -# $OpenBSD: files.sparc,v 1.79 2007/10/10 15:53:52 art Exp $ +# $OpenBSD: files.sparc,v 1.80 2007/11/25 18:25:29 deraadt Exp $ # $NetBSD: files.sparc,v 1.44 1997/08/31 21:29:16 pk Exp $ # @(#)files.sparc 8.1 (Berkeley) 7/19/93 @@ -387,3 +387,32 @@ include "dev/pcmcia/files.pcmcia" # built-in modem on Tadpole SPARCbook attach com at obio with com_obio file arch/sparc/dev/com_obio.c com_obio + +# machine-dependent libkern component +file lib/libkern/arch/sparc/saveregs.S + +# quad support is neccessary for 32 bit architectures +file lib/libkern/adddi3.c +file lib/libkern/anddi3.c +file lib/libkern/ashldi3.c +file lib/libkern/ashrdi3.c +file lib/libkern/cmpdi2.c +file lib/libkern/divdi3.c +file lib/libkern/iordi3.c +file lib/libkern/lshldi3.c +file lib/libkern/lshrdi3.c +file lib/libkern/moddi3.c +file lib/libkern/muldi3.c +file lib/libkern/negdi2.c +file lib/libkern/notdi2.c +file lib/libkern/qdivrem.c +file lib/libkern/subdi3.c +file lib/libkern/ucmpdi2.c +file lib/libkern/udivdi3.c +file lib/libkern/umoddi3.c +file lib/libkern/xordi3.c + +file lib/libkern/arch/sparc/sdiv.S +file lib/libkern/arch/sparc/udiv.S +file lib/libkern/arch/sparc/urem.S +file lib/libkern/arch/sparc/rem.S diff --git a/sys/arch/sparc/stand/Makefile b/sys/arch/sparc/stand/Makefile index 168ffeb97ff..e81d8408851 100644 --- a/sys/arch/sparc/stand/Makefile +++ b/sys/arch/sparc/stand/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.8 2000/05/27 05:52:31 deraadt Exp $ +# $OpenBSD: Makefile,v 1.9 2007/11/25 18:25:33 deraadt Exp $ # $NetBSD: Makefile,v 1.15 1997/06/01 03:39:03 mrg Exp $ .if ${MACHINE} == "sparc" -SUBDIR= libsa libkern libz boot bootxx binstall +SUBDIR= libsa libz boot bootxx binstall .endif SUBDIR+= installboot diff --git a/sys/arch/sparc/stand/Makefile.inc b/sys/arch/sparc/stand/Makefile.inc index fb22cad1653..4a57998d9c8 100644 --- a/sys/arch/sparc/stand/Makefile.inc +++ b/sys/arch/sparc/stand/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.13 2005/12/30 02:03:49 millert Exp $ +# $OpenBSD: Makefile.inc,v 1.14 2007/11/25 18:25:33 deraadt Exp $ # $NetBSD: Makefile.inc,v 1.5 1996/02/01 22:33:01 mycroft Exp $ BINDIR= /usr/mdec @@ -16,19 +16,6 @@ CFLAGS+= -fno-stack-protector DEFS= -DSTANDALONE -DRELOC=${RELOC} -DSUN4 -DSUN4C -DSUN_BOOTPARAMS -### 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/sparc/stand/boot/Makefile b/sys/arch/sparc/stand/boot/Makefile index 2846ebf7df5..8f8cef36591 100644 --- a/sys/arch/sparc/stand/boot/Makefile +++ b/sys/arch/sparc/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.13 2007/10/30 06:03:16 deraadt Exp $ +# $OpenBSD: Makefile,v 1.14 2007/11/25 18:25:33 deraadt Exp $ # $NetBSD: Makefile,v 1.2 1995/09/30 21:43:38 pk Exp $ .PATH: ${.CURDIR}/../common @@ -7,16 +7,20 @@ PROG= boot NOMAN= noman INSTALL_STRIP= +S= ${.CURDIR}/../../../.. SRCS= srt0.S boot.c conf.c dvma.c net.c netif_sun.c promdev.c version.c SRCS+= loadfile.c +.PATH: ${S}/lib/libkern/arch/sparc ${S}/lib/libkern +SRCS+= bzero.S strlen.c mul.S umul.S strcmp.S sdiv.S urem.S udiv.S rem.S + CFLAGS= -O2 -I${.CURDIR}/../common -I${.CURDIR}/../../../../arch \ -I${.CURDIR}/../../../.. -I${.CURDIR}/../../../../lib/libsa ${DEFS} \ -DSPARC_BOOT_AOUT -DSPARC_BOOT_ELF CLEANFILES+=${PROG}.aout ${PROG}.elf elfclean -LIBS=${LIBSA} ${LIBKERN} ${LIBZ} +LIBS=${LIBSA} ${LIBZ} elfclean: clean-elf.c ${HOSTCC} -o elfclean ${.ALLSRC} diff --git a/sys/arch/sparc/stand/bootxx/Makefile b/sys/arch/sparc/stand/bootxx/Makefile index 161973642b3..359504f3d16 100644 --- a/sys/arch/sparc/stand/bootxx/Makefile +++ b/sys/arch/sparc/stand/bootxx/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.8 2007/10/30 06:03:16 deraadt Exp $ +# $OpenBSD: Makefile,v 1.9 2007/11/25 18:25:33 deraadt Exp $ # $NetBSD: Makefile,v 1.2 1995/09/30 21:43:38 pk Exp $ .PATH: ${.CURDIR}/../common @@ -7,13 +7,14 @@ PROG= bootxx NOMAN= noman INSTALL_STRIP= +S= ${.CURDIR}/../../../.. SRCS= srt0.S bootxx.c closeall.c dvma.c promdev.c CLEANFILES+=${PROG}.aout ${PROG}.elf elfclean -# pre-built bits of libkern -KOBJS= __main.o bzero.o urem.o udiv.o -_KOBJS=${KOBJS:S,^,${LIBKERNOBJDIR}/,g} +.PATH: ${S}/lib/libkern/arch/sparc ${S}/lib/libkern +SRCS+= __main.o bzero.o urem.o udiv.o + # pre-built bits of libsa SOBJS= alloc.o exit.o printf.o memcpy.o memset.o _SOBJS=${SOBJS:S,^,${LIBSAOBJDIR}/,g} @@ -26,7 +27,7 @@ elfclean: clean-elf.c ${HOSTCC} -o elfclean ${.ALLSRC} ${PROG}: ${OBJS} elfclean - ${LD} -N -Ttext ${RELOC} -e start ${OBJS} ${_SOBJS} ${_KOBJS} -o ${.TARGET}.elf + ${LD} -N -Ttext ${RELOC} -e start ${OBJS} ${_SOBJS} -o ${.TARGET}.elf ./elfclean ${.TARGET}.elf objcopy -j .text -j .data -j .bss -O a.out-sparc-netbsd \ ${.TARGET}.elf ${.TARGET}.aout diff --git a/sys/arch/sparc/stand/libkern/Makefile b/sys/arch/sparc/stand/libkern/Makefile deleted file mode 100644 index d739830daef..00000000000 --- a/sys/arch/sparc/stand/libkern/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# $OpenBSD: Makefile,v 1.3 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 -I${.CURDIR}/../include -I${.CURDIR}/../../../.. \ - -I${.CURDIR}/../../../../lib/libkern \ - -I${.CURDIR}/../../../../lib/libkern/arch/sparc - -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 strncmp.c umoddi3.c - -SRCS+= umul.S mul.S rem.S sdiv.S udiv.S urem.S -SRCS+= saveregs.S - -${OBJS}: ${.CURDIR}/../Makefile.inc - -NOPROFILE= -NOPIC= - -install: - -.include <bsd.lib.mk> 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 $< diff --git a/sys/arch/vax/boot/boot/Makefile b/sys/arch/vax/boot/boot/Makefile index 1999af6e674..145d023ba81 100644 --- a/sys/arch/vax/boot/boot/Makefile +++ b/sys/arch/vax/boot/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 2005/07/30 16:36:09 millert Exp $ +# $OpenBSD: Makefile,v 1.7 2007/11/25 18:25:33 deraadt Exp $ # $NetBSD: Makefile,v 1.27 2002/04/07 07:00:25 matt Exp $ S!= cd ${.CURDIR}/../../../../; pwd @@ -32,12 +32,7 @@ CFLAGS+=-I${S}/lib/libsa .include "${S}/lib/libz/Makefile.inc" LIBZ= ${ZLIB} -#KERN_AS=library -#.include "${S}/lib/libkern/Makefile.inc" -#LIBKERN=${KERNLIB} - -# Only need these from libkern -.PATH: ${S}/lib/libkern +.PATH: ${S}/lib/libkern/arch/vax ${S}/lib/libkern SRCS+= moddi3.c negdi2.c .if ${MACHINE} == "vax" @@ -56,9 +51,9 @@ CLEANFILES+= machine ${MACHINE_ARCH} START=nisse #.endif -${PROG}: machine-links ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} +${PROG}: machine-links ${OBJS} ${LIBSA} ${LIBZ} ${LD} -N -Ttext ${RELOC} -e ${START} -o ${PROG}.sym -Llib/sa -L. ${OBJS} \ - ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} + ${LIBSA} ${LIBZ} ${LIBSA} /usr/sbin/mopa.out ${PROG}.sym ${PROG}.mop /bin/cp ${PROG}.sym ${PROG} /usr/bin/strip ${PROG} diff --git a/sys/arch/vax/boot/xxboot/Makefile b/sys/arch/vax/boot/xxboot/Makefile index 3b10714a293..b20744469d5 100644 --- a/sys/arch/vax/boot/xxboot/Makefile +++ b/sys/arch/vax/boot/xxboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 2006/07/04 21:43:53 martin Exp $ +# $OpenBSD: Makefile,v 1.7 2007/11/25 18:25:33 deraadt Exp $ # $NetBSD: Makefile,v 1.12 2002/02/24 01:04:25 matt Exp $ S= ${.CURDIR}/../../../../ @@ -29,10 +29,6 @@ SA_AS= library .include "${S}/lib/libsa/Makefile.inc" LIBSA= ${SALIB} -#KERN_AS=library -#.include "${S}/lib/libkern/Makefile.inc" -#LIBKERN=${KERNLIB} - .if ${MACHINE} == "vax" .PHONY: machine-links beforedepend: machine-links @@ -43,9 +39,8 @@ machine-links: CLEANFILES+= machine ${MACHINE_ARCH} ${PROG}.out .endif -${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} -${PROG}: ${OBJS} ${LIBSA} ${LIBKERN} - ${LD} -N -Ttext 100000 -o ${PROG}.out ${OBJS} ${LIBSA} ${LIBKERN} +${PROG}: ${OBJS} ${LIBSA} + ${LD} -N -Ttext 100000 -o ${PROG}.out ${OBJS} ${LIBSA} /usr/bin/strip ${PROG}.out /usr/bin/size ${PROG}.out /bin/dd if=${PROG}.out of=${PROG} bs=32 skip=1 diff --git a/sys/arch/vax/conf/Makefile.vax b/sys/arch/vax/conf/Makefile.vax index da991ff7aff..5c934e6cfa5 100644 --- a/sys/arch/vax/conf/Makefile.vax +++ b/sys/arch/vax/conf/Makefile.vax @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.vax,v 1.29 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.vax,v 1.30 2007/11/25 18:25:29 deraadt Exp $ # $NetBSD: Makefile.vax,v 1.49 1999/07/26 05:20:49 cgd Exp $ # Makefile for OpenBSD/vax @@ -81,15 +81,6 @@ HOSTED_CC= ${CC} HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//} HOSTED_CFLAGS= ${CFLAGS} -### find out what to use for libkern -KERN_AS= obj -.include "$S/lib/libkern/Makefile.inc" -.ifndef PROF -LIBKERN= ${KERNLIB} -.else -LIBKERN= ${KERNLIB_PROF} -.endif - # compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or # HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file). @@ -104,7 +95,7 @@ HOSTED_C= ${HOSTED_CC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $< # ${SYSTEM_LD_HEAD} # ${SYSTEM_LD} swapxxx.o # ${SYSTEM_LD_TAIL} -SYSTEM_OBJ= intvec.o subr.o param.o ioconf.o ${OBJS} ${LIBKERN} +SYSTEM_OBJ= intvec.o subr.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; \ @@ -136,6 +127,9 @@ param.c: $S/conf/param.c param.o: param.c Makefile ${NORMAL_C} +mcount.o: $S/lib/libkern/mcount.c Makefile + ${NORMAL_C_NOP} + ioconf.o: ioconf.c ${NORMAL_C} diff --git a/sys/arch/vax/conf/files.vax b/sys/arch/vax/conf/files.vax index f0ad81a3583..61c7973ae4e 100644 --- a/sys/arch/vax/conf/files.vax +++ b/sys/arch/vax/conf/files.vax @@ -1,4 +1,4 @@ -# $OpenBSD: files.vax,v 1.43 2007/06/01 22:01:52 maja Exp $ +# $OpenBSD: files.vax,v 1.44 2007/11/25 18:25:29 deraadt Exp $ # $NetBSD: files.vax,v 1.60 1999/08/27 20:04:32 ragge Exp $ # # new style config file for vax architecture @@ -415,3 +415,24 @@ include "compat/vax1k/files.vax1k" #arch/vax/if/if_pcl.c optional pcl device-driver #arch/vax/if/if_vv.c optional vv device-driver #arch/vax/if/raw_hy.c optional hy device-driver + +# quad support is neccessary for 32 bit architectures +file lib/libkern/adddi3.c +file lib/libkern/anddi3.c +file lib/libkern/ashldi3.c +file lib/libkern/ashrdi3.c +file lib/libkern/cmpdi2.c +file lib/libkern/divdi3.c +file lib/libkern/iordi3.c +file lib/libkern/lshldi3.c +file lib/libkern/lshrdi3.c +file lib/libkern/moddi3.c +file lib/libkern/muldi3.c +file lib/libkern/negdi2.c +file lib/libkern/notdi2.c +file lib/libkern/qdivrem.c +file lib/libkern/subdi3.c +file lib/libkern/ucmpdi2.c +file lib/libkern/udivdi3.c +file lib/libkern/umoddi3.c +file lib/libkern/xordi3.c diff --git a/sys/arch/vax/stand/boot/Makefile b/sys/arch/vax/stand/boot/Makefile index 1999af6e674..145d023ba81 100644 --- a/sys/arch/vax/stand/boot/Makefile +++ b/sys/arch/vax/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 2005/07/30 16:36:09 millert Exp $ +# $OpenBSD: Makefile,v 1.7 2007/11/25 18:25:33 deraadt Exp $ # $NetBSD: Makefile,v 1.27 2002/04/07 07:00:25 matt Exp $ S!= cd ${.CURDIR}/../../../../; pwd @@ -32,12 +32,7 @@ CFLAGS+=-I${S}/lib/libsa .include "${S}/lib/libz/Makefile.inc" LIBZ= ${ZLIB} -#KERN_AS=library -#.include "${S}/lib/libkern/Makefile.inc" -#LIBKERN=${KERNLIB} - -# Only need these from libkern -.PATH: ${S}/lib/libkern +.PATH: ${S}/lib/libkern/arch/vax ${S}/lib/libkern SRCS+= moddi3.c negdi2.c .if ${MACHINE} == "vax" @@ -56,9 +51,9 @@ CLEANFILES+= machine ${MACHINE_ARCH} START=nisse #.endif -${PROG}: machine-links ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} +${PROG}: machine-links ${OBJS} ${LIBSA} ${LIBZ} ${LD} -N -Ttext ${RELOC} -e ${START} -o ${PROG}.sym -Llib/sa -L. ${OBJS} \ - ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} + ${LIBSA} ${LIBZ} ${LIBSA} /usr/sbin/mopa.out ${PROG}.sym ${PROG}.mop /bin/cp ${PROG}.sym ${PROG} /usr/bin/strip ${PROG} diff --git a/sys/arch/vax/stand/xxboot/Makefile b/sys/arch/vax/stand/xxboot/Makefile index 3b10714a293..b20744469d5 100644 --- a/sys/arch/vax/stand/xxboot/Makefile +++ b/sys/arch/vax/stand/xxboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 2006/07/04 21:43:53 martin Exp $ +# $OpenBSD: Makefile,v 1.7 2007/11/25 18:25:33 deraadt Exp $ # $NetBSD: Makefile,v 1.12 2002/02/24 01:04:25 matt Exp $ S= ${.CURDIR}/../../../../ @@ -29,10 +29,6 @@ SA_AS= library .include "${S}/lib/libsa/Makefile.inc" LIBSA= ${SALIB} -#KERN_AS=library -#.include "${S}/lib/libkern/Makefile.inc" -#LIBKERN=${KERNLIB} - .if ${MACHINE} == "vax" .PHONY: machine-links beforedepend: machine-links @@ -43,9 +39,8 @@ machine-links: CLEANFILES+= machine ${MACHINE_ARCH} ${PROG}.out .endif -${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} -${PROG}: ${OBJS} ${LIBSA} ${LIBKERN} - ${LD} -N -Ttext 100000 -o ${PROG}.out ${OBJS} ${LIBSA} ${LIBKERN} +${PROG}: ${OBJS} ${LIBSA} + ${LD} -N -Ttext 100000 -o ${PROG}.out ${OBJS} ${LIBSA} /usr/bin/strip ${PROG}.out /usr/bin/size ${PROG}.out /bin/dd if=${PROG}.out of=${PROG} bs=32 skip=1 diff --git a/sys/arch/zaurus/conf/Makefile.zaurus b/sys/arch/zaurus/conf/Makefile.zaurus index 6ea67d220ca..58e3103dd27 100644 --- a/sys/arch/zaurus/conf/Makefile.zaurus +++ b/sys/arch/zaurus/conf/Makefile.zaurus @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.zaurus,v 1.9 2007/11/25 11:23:33 deraadt Exp $ +# $OpenBSD: Makefile.zaurus,v 1.10 2007/11/25 18:25:29 deraadt Exp $ # $NetBSD: Makefile.i386,v 1.67 1996/05/11 16:12:11 mycroft Exp $ # Makefile for OpenBSD @@ -61,14 +61,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 @@ -96,8 +88,7 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $< # ${SYSTEM_LD_HEAD} # ${SYSTEM_LD} swapxxx.o # ${SYSTEM_LD_TAIL} -SYSTEM_OBJ= ${BOARDTYPE}_start.o locore.o \ - param.o ioconf.o ${OBJS} ${LIBKERN} +SYSTEM_OBJ= ${BOARDTYPE}_start.o locore.o param.o ioconf.o ${OBJS} SYSTEM_DEP= Makefile ${SYSTEM_OBJ} SYSTEM_LD_HEAD= rm -f $@ SYSTEM_LD_HEAD+=; \ @@ -136,6 +127,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} diff --git a/sys/arch/zaurus/stand/zboot/Makefile b/sys/arch/zaurus/stand/zboot/Makefile index e8a56816e84..de807b3e8d7 100644 --- a/sys/arch/zaurus/stand/zboot/Makefile +++ b/sys/arch/zaurus/stand/zboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2006/10/30 18:28:57 jmc Exp $ +# $OpenBSD: Makefile,v 1.8 2007/11/25 18:25:33 deraadt Exp $ MAN= boot.8 MANSUBDIR=zaurus @@ -28,7 +28,7 @@ SRCS+= close.c closeall.c cons.c ctime.c disklabel.c dkcksum.c fstat.c \ lseek.c memcmp.c memcpy.c memset.c open.c printf.c read.c \ readdir.c snprintf.c stat.c strerror.c strtol.c ufs.c -# libkern +.PATH: ${S}/lib/libkern/arch/arm ${S}/lib/libkern SRCS+= strcmp.c strlcpy.c strlen.c strncmp.c strncpy.c write.c \ ashrdi3.c divsi3.S @@ -38,8 +38,6 @@ SRCS+= alloc.c cmd.c devopen.c diskprobe.c exec.c exit.c loadfile.c \ .PATH: ${S}/stand/boot .PATH: ${S}/lib/libsa -.PATH: ${S}/lib/libkern -.PATH: ${S}/lib/libkern/arch/arm .else NOPROG= |