diff options
| author | Warner Losh <imp@FreeBSD.org> | 2017-10-12 14:56:28 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2017-10-12 14:56:28 +0000 |
| commit | 4eb1313ff2ab43011d091b7560cd688c7838e142 (patch) | |
| tree | 52c1487244ff26dbe95f6afcaac77b591ff84ae4 | |
| parent | 93f4c41f2807d5cbc4050afa47cd72b5ae282a6a (diff) | |
Notes
| -rw-r--r-- | lib/libstand/Makefile | 163 | ||||
| -rw-r--r-- | sys/boot/libsa/Makefile | 159 | ||||
| -rw-r--r-- | sys/boot/libsa/Makefile.depend (renamed from lib/libstand/Makefile.depend) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/__main.c (renamed from lib/libstand/__main.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/amd64/_setjmp.S (renamed from lib/libstand/amd64/_setjmp.S) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/arp.c (renamed from lib/libstand/arp.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/assert.c (renamed from lib/libstand/assert.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/bcd.c (renamed from lib/libstand/bcd.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/bootp.c (renamed from lib/libstand/bootp.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/bootp.h (renamed from lib/libstand/bootp.h) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/bootparam.c (renamed from lib/libstand/bootparam.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/bootparam.h (renamed from lib/libstand/bootparam.h) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/bzipfs.c (renamed from lib/libstand/bzipfs.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/cd9660.c (renamed from lib/libstand/cd9660.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/close.c (renamed from lib/libstand/close.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/closeall.c (renamed from lib/libstand/closeall.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/dev.c (renamed from lib/libstand/dev.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/dosfs.c (renamed from lib/libstand/dosfs.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/dosfs.h (renamed from lib/libstand/dosfs.h) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/environment.c (renamed from lib/libstand/environment.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/ether.c (renamed from lib/libstand/ether.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/ext2fs.c (renamed from lib/libstand/ext2fs.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/fstat.c (renamed from lib/libstand/fstat.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/getopt.c (renamed from lib/libstand/getopt.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/gets.c (renamed from lib/libstand/gets.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/globals.c (renamed from lib/libstand/globals.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/gzipfs.c (renamed from lib/libstand/gzipfs.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/i386/_setjmp.S (renamed from lib/libstand/i386/_setjmp.S) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/in_cksum.c (renamed from lib/libstand/in_cksum.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/inet_ntoa.c (renamed from lib/libstand/inet_ntoa.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/ioctl.c (renamed from lib/libstand/ioctl.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/iodesc.h (renamed from lib/libstand/iodesc.h) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/ip.c (renamed from lib/libstand/ip.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/libstand.3 (renamed from lib/libstand/libstand.3) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/lseek.c (renamed from lib/libstand/lseek.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/mips/_setjmp.S (renamed from lib/libstand/mips/_setjmp.S) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/nandfs.c (renamed from lib/libstand/nandfs.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/net.c (renamed from lib/libstand/net.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/net.h (renamed from lib/libstand/net.h) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/netif.c (renamed from lib/libstand/netif.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/netif.h (renamed from lib/libstand/netif.h) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/nfs.c (renamed from lib/libstand/nfs.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/nfsv2.h (renamed from lib/libstand/nfsv2.h) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/nullfs.c (renamed from lib/libstand/nullfs.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/open.c (renamed from lib/libstand/open.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/pager.c (renamed from lib/libstand/pager.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/pkgfs.c (renamed from lib/libstand/pkgfs.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/powerpc/_setjmp.S (renamed from lib/libstand/powerpc/_setjmp.S) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/powerpc/syncicache.c (renamed from lib/libstand/powerpc/syncicache.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/printf.c (renamed from lib/libstand/printf.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/qdivrem.c (renamed from lib/libstand/qdivrem.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/quad.h (renamed from lib/libstand/quad.h) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/random.c (renamed from lib/libstand/random.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/rarp.c (renamed from lib/libstand/rarp.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/read.c (renamed from lib/libstand/read.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/readdir.c (renamed from lib/libstand/readdir.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/rpc.c (renamed from lib/libstand/rpc.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/rpc.h (renamed from lib/libstand/rpc.h) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/rpcv2.h (renamed from lib/libstand/rpcv2.h) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/saioctl.h (renamed from lib/libstand/saioctl.h) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/sbrk.c (renamed from lib/libstand/sbrk.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/sparc64/_setjmp.S (renamed from lib/libstand/sparc64/_setjmp.S) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/splitfs.c (renamed from lib/libstand/splitfs.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/stand.h (renamed from lib/libstand/stand.h) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/stat.c (renamed from lib/libstand/stat.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/strcasecmp.c (renamed from lib/libstand/strcasecmp.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/strdup.c (renamed from lib/libstand/strdup.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/strerror.c (renamed from lib/libstand/strerror.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/strtol.c (renamed from lib/libstand/strtol.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/strtoul.c (renamed from lib/libstand/strtoul.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/tftp.c (renamed from lib/libstand/tftp.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/tftp.h (renamed from lib/libstand/tftp.h) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/twiddle.c (renamed from lib/libstand/twiddle.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/udp.c (renamed from lib/libstand/udp.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/ufs.c (renamed from lib/libstand/ufs.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/uuid_from_string.c (renamed from lib/libstand/uuid_from_string.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/uuid_to_string.c (renamed from lib/libstand/uuid_to_string.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/write.c (renamed from lib/libstand/write.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/zalloc.c (renamed from lib/libstand/zalloc.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/zalloc_defs.h (renamed from lib/libstand/zalloc_defs.h) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/zalloc_malloc.c (renamed from lib/libstand/zalloc_malloc.c) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/zalloc_mem.h (renamed from lib/libstand/zalloc_mem.h) | 0 | ||||
| -rw-r--r-- | sys/boot/libsa/zalloc_protos.h (renamed from lib/libstand/zalloc_protos.h) | 0 | ||||
| -rw-r--r-- | sys/boot/libstand32/Makefile | 2 | ||||
| -rw-r--r-- | sys/boot/userboot/libstand/Makefile | 9 |
85 files changed, 155 insertions, 178 deletions
diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile deleted file mode 100644 index 3654ec351fa1..000000000000 --- a/lib/libstand/Makefile +++ /dev/null @@ -1,163 +0,0 @@ -# $FreeBSD$ -# Originally from $NetBSD: Makefile,v 1.21 1997/10/26 22:08:38 lukem Exp $ -# -# Notes: -# - We don't use the libc strerror/sys_errlist because the string table is -# quite large. -# - -PACKAGE=lib${LIB} -MK_PROFILE= no -MK_SSP= no - -.include <src.opts.mk> - -LIBSTAND_SRC?= ${.CURDIR} -LIBSTAND_CPUARCH?=${MACHINE_CPUARCH} -LIBC_SRC= ${LIBSTAND_SRC}/../libc - -LIB= stand -NO_PIC= -INCS?= stand.h -MAN?= libstand.3 - -WARNS?= 0 - -CFLAGS+= -I${LIBSTAND_SRC} - -# standalone components and stuff we have modified locally -SRCS+= gzguts.h zutil.h __main.c assert.c bcd.c environment.c getopt.c gets.c \ - globals.c pager.c printf.c strdup.c strerror.c strtol.c strtoul.c random.c \ - sbrk.c twiddle.c zalloc.c zalloc_malloc.c - -# private (pruned) versions of libc string functions -SRCS+= strcasecmp.c - -.PATH: ${LIBC_SRC}/net - -SRCS+= ntoh.c - -# string functions from libc -.PATH: ${LIBC_SRC}/string -SRCS+= bcmp.c bcopy.c bzero.c ffs.c fls.c \ - memccpy.c memchr.c memcmp.c memcpy.c memmove.c memset.c \ - qdivrem.c strcat.c strchr.c strcmp.c strcpy.c stpcpy.c stpncpy.c \ - strcspn.c strlcat.c strlcpy.c strlen.c strncat.c strncmp.c strncpy.c \ - strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c -.if ${MACHINE_CPUARCH} == "arm" -.PATH: ${LIBC_SRC}/arm/gen - -# Do not generate movt/movw, because the relocation fixup for them does not -# translate to the -Bsymbolic -pie format required by self_reloc() in loader(8). -# Also, the fpu is not available in a standalone environment. -.if ${COMPILER_VERSION} < 30800 -CFLAGS.clang+= -mllvm -arm-use-movt=0 -.else -CFLAGS.clang+= -mno-movt -.endif -CFLAGS.clang+= -mfpu=none - -# Compiler support functions -.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/builtins/ -# __clzsi2 and ctzsi2 for various builtin functions -SRCS+= clzsi2.c ctzsi2.c -# Divide and modulus functions called by the compiler -SRCS+= divmoddi4.c divmodsi4.c divdi3.c divsi3.c moddi3.c modsi3.c -SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c - -.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/builtins/arm/ -SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S -SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S -.endif - -.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv" -.PATH: ${LIBC_SRC}/${MACHINE_CPUARCH}/gen -.endif - -.if ${MACHINE_CPUARCH} == "powerpc" -.PATH: ${LIBC_SRC}/quad -SRCS+= ashldi3.c ashrdi3.c -SRCS+= syncicache.c -.endif - -# uuid functions from libc -.PATH: ${LIBC_SRC}/uuid -SRCS+= uuid_create_nil.c uuid_equal.c uuid_from_string.c uuid_is_nil.c uuid_to_string.c - -# _setjmp/_longjmp -.PATH: ${LIBSTAND_SRC}/${LIBSTAND_CPUARCH} -SRCS+= _setjmp.S - -# decompression functionality from libbz2 -# NOTE: to actually test this functionality after libbz2 upgrade compile -# loader(8) with LOADER_BZIP2_SUPPORT defined -.PATH: ${LIBSTAND_SRC}/../../contrib/bzip2 -CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS -SRCS+= libstand_bzlib_private.h - -.for file in bzlib.c crctable.c decompress.c huffman.c randtable.c -SRCS+= _${file} -CLEANFILES+= _${file} - -_${file}: ${file} - sed "s|bzlib_private\.h|libstand_bzlib_private.h|" \ - ${.ALLSRC} > ${.TARGET} -.endfor - -CLEANFILES+= libstand_bzlib_private.h -libstand_bzlib_private.h: bzlib_private.h - sed -e 's|<stdlib.h>|"stand.h"|' \ - ${.ALLSRC} > ${.TARGET} - -# decompression functionality from zlib -.PATH: ${LIBSTAND_SRC}/../../contrib/zlib -CFLAGS+=-DHAVE_MEMCPY -I${LIBSTAND_SRC}/../../contrib/zlib -SRCS+= adler32.c crc32.c libstand_zutil.h libstand_gzguts.h - -.for file in infback.c inffast.c inflate.c inftrees.c zutil.c -SRCS+= _${file} -CLEANFILES+= _${file} - -_${file}: ${file} - sed -e "s|zutil\.h|libstand_zutil.h|" \ - -e "s|gzguts\.h|libstand_gzguts.h|" \ - ${.ALLSRC} > ${.TARGET} -.endfor - -# depend on stand.h being able to be included multiple times -.for file in zutil.h gzguts.h -CLEANFILES+= libstand_${file} -libstand_${file}: ${file} - sed -e 's|<fcntl.h>|"stand.h"|' \ - -e 's|<stddef.h>|"stand.h"|' \ - -e 's|<string.h>|"stand.h"|' \ - -e 's|<stdio.h>|"stand.h"|' \ - -e 's|<stdlib.h>|"stand.h"|' \ - ${.ALLSRC} > ${.TARGET} -.endfor - -# io routines -SRCS+= closeall.c dev.c ioctl.c nullfs.c stat.c \ - fstat.c close.c lseek.c open.c read.c write.c readdir.c - -# network routines -SRCS+= arp.c ether.c ip.c inet_ntoa.c in_cksum.c net.c udp.c netif.c rpc.c - -# network info services: -SRCS+= bootp.c rarp.c bootparam.c - -# boot filesystems -SRCS+= ufs.c nfs.c cd9660.c tftp.c gzipfs.c bzipfs.c -SRCS+= dosfs.c ext2fs.c -SRCS+= splitfs.c -SRCS+= pkgfs.c -.if ${MK_NAND} != "no" -SRCS+= nandfs.c -.endif - -# explicit_bzero -.PATH: ${SRCTOP}/sys/libkern -SRCS+= explicit_bzero.c - -.include <bsd.stand.mk> -.include <bsd.lib.mk> diff --git a/sys/boot/libsa/Makefile b/sys/boot/libsa/Makefile index 5b7397936c10..83238e8215f7 100644 --- a/sys/boot/libsa/Makefile +++ b/sys/boot/libsa/Makefile @@ -1,14 +1,161 @@ # $FreeBSD$ +# Originally from $NetBSD: Makefile,v 1.21 1997/10/26 22:08:38 lukem Exp $ +# +# Notes: +# - We don't use the libc strerror/sys_errlist because the string table is +# quite large. +# + +MK_PROFILE= no +MK_SSP= no .include <src.opts.mk> .include "../Makefile.inc" -LIBSTAND_SRC= ${SASRC} -LIBC_SRC= ${SRCTOP}/lib/libc INTERNALLIB= -INCS= -MAN= -.PATH: ${SASRC} +LIBSTAND_CPUARCH?=${MACHINE_CPUARCH} +LIBC_SRC= ${SRCTOP}/lib/libc + +LIB?= stand +NO_PIC= +WARNS?= 0 + +CFLAGS+= -I${SASRC} + +# standalone components and stuff we have modified locally +SRCS+= gzguts.h zutil.h __main.c assert.c bcd.c environment.c getopt.c gets.c \ + globals.c pager.c printf.c strdup.c strerror.c strtol.c strtoul.c random.c \ + sbrk.c twiddle.c zalloc.c zalloc_malloc.c + +# private (pruned) versions of libc string functions +SRCS+= strcasecmp.c + +.PATH: ${LIBC_SRC}/net + +SRCS+= ntoh.c + +# string functions from libc +.PATH: ${LIBC_SRC}/string +SRCS+= bcmp.c bcopy.c bzero.c ffs.c fls.c \ + memccpy.c memchr.c memcmp.c memcpy.c memmove.c memset.c \ + qdivrem.c strcat.c strchr.c strcmp.c strcpy.c stpcpy.c stpncpy.c \ + strcspn.c strlcat.c strlcpy.c strlen.c strncat.c strncmp.c strncpy.c \ + strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c +.if ${MACHINE_CPUARCH} == "arm" +.PATH: ${LIBC_SRC}/arm/gen + +# Do not generate movt/movw, because the relocation fixup for them does not +# translate to the -Bsymbolic -pie format required by self_reloc() in loader(8). +# Also, the fpu is not available in a standalone environment. +.if ${COMPILER_VERSION} < 30800 +CFLAGS.clang+= -mllvm -arm-use-movt=0 +.else +CFLAGS.clang+= -mno-movt +.endif +CFLAGS.clang+= -mfpu=none + +# Compiler support functions +.PATH: ${SRCTOP}/contrib/compiler-rt/lib/builtins/ +# __clzsi2 and ctzsi2 for various builtin functions +SRCS+= clzsi2.c ctzsi2.c +# Divide and modulus functions called by the compiler +SRCS+= divmoddi4.c divmodsi4.c divdi3.c divsi3.c moddi3.c modsi3.c +SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c + +.PATH: ${SRCTOP}/contrib/compiler-rt/lib/builtins/arm/ +SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S +SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S +.endif + +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv" +.PATH: ${LIBC_SRC}/${MACHINE_CPUARCH}/gen +.endif + +.if ${MACHINE_CPUARCH} == "powerpc" +.PATH: ${LIBC_SRC}/quad +SRCS+= ashldi3.c ashrdi3.c +SRCS+= syncicache.c +.endif + +# uuid functions from libc +.PATH: ${LIBC_SRC}/uuid +SRCS+= uuid_create_nil.c uuid_equal.c uuid_from_string.c uuid_is_nil.c uuid_to_string.c + +# _setjmp/_longjmp +.PATH: ${SASRC}/${LIBSTAND_CPUARCH} +SRCS+= _setjmp.S + +# decompression functionality from libbz2 +# NOTE: to actually test this functionality after libbz2 upgrade compile +# loader(8) with LOADER_BZIP2_SUPPORT defined +.PATH: ${SRCTOP}/contrib/bzip2 +CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS +SRCS+= libstand_bzlib_private.h + +.for file in bzlib.c crctable.c decompress.c huffman.c randtable.c +SRCS+= _${file} +CLEANFILES+= _${file} + +_${file}: ${file} + sed "s|bzlib_private\.h|libstand_bzlib_private.h|" \ + ${.ALLSRC} > ${.TARGET} +.endfor + +CLEANFILES+= libstand_bzlib_private.h +libstand_bzlib_private.h: bzlib_private.h + sed -e 's|<stdlib.h>|"stand.h"|' \ + ${.ALLSRC} > ${.TARGET} + +# decompression functionality from zlib +.PATH: ${SRCTOP}/contrib/zlib +CFLAGS+=-DHAVE_MEMCPY -I${SRCTOP}/contrib/zlib +SRCS+= adler32.c crc32.c libstand_zutil.h libstand_gzguts.h + +.for file in infback.c inffast.c inflate.c inftrees.c zutil.c +SRCS+= _${file} +CLEANFILES+= _${file} + +_${file}: ${file} + sed -e "s|zutil\.h|libstand_zutil.h|" \ + -e "s|gzguts\.h|libstand_gzguts.h|" \ + ${.ALLSRC} > ${.TARGET} +.endfor + +# depend on stand.h being able to be included multiple times +.for file in zutil.h gzguts.h +CLEANFILES+= libstand_${file} +libstand_${file}: ${file} + sed -e 's|<fcntl.h>|"stand.h"|' \ + -e 's|<stddef.h>|"stand.h"|' \ + -e 's|<string.h>|"stand.h"|' \ + -e 's|<stdio.h>|"stand.h"|' \ + -e 's|<stdlib.h>|"stand.h"|' \ + ${.ALLSRC} > ${.TARGET} +.endfor + +# io routines +SRCS+= closeall.c dev.c ioctl.c nullfs.c stat.c \ + fstat.c close.c lseek.c open.c read.c write.c readdir.c + +# network routines +SRCS+= arp.c ether.c ip.c inet_ntoa.c in_cksum.c net.c udp.c netif.c rpc.c + +# network info services: +SRCS+= bootp.c rarp.c bootparam.c + +# boot filesystems +SRCS+= ufs.c nfs.c cd9660.c tftp.c gzipfs.c bzipfs.c +SRCS+= dosfs.c ext2fs.c +SRCS+= splitfs.c +SRCS+= pkgfs.c +.if ${MK_NAND} != "no" +SRCS+= nandfs.c +.endif + +# explicit_bzero +.PATH: ${SRCTOP}/sys/libkern +SRCS+= explicit_bzero.c -.include "${SASRC}/Makefile" +.include <bsd.stand.mk> +.include <bsd.lib.mk> diff --git a/lib/libstand/Makefile.depend b/sys/boot/libsa/Makefile.depend index 1d86fce1441d..1d86fce1441d 100644 --- a/lib/libstand/Makefile.depend +++ b/sys/boot/libsa/Makefile.depend diff --git a/lib/libstand/__main.c b/sys/boot/libsa/__main.c index e38f33865c05..e38f33865c05 100644 --- a/lib/libstand/__main.c +++ b/sys/boot/libsa/__main.c diff --git a/lib/libstand/amd64/_setjmp.S b/sys/boot/libsa/amd64/_setjmp.S index 6d9a5fa13f8d..6d9a5fa13f8d 100644 --- a/lib/libstand/amd64/_setjmp.S +++ b/sys/boot/libsa/amd64/_setjmp.S diff --git a/lib/libstand/arp.c b/sys/boot/libsa/arp.c index 841010c3195c..841010c3195c 100644 --- a/lib/libstand/arp.c +++ b/sys/boot/libsa/arp.c diff --git a/lib/libstand/assert.c b/sys/boot/libsa/assert.c index 8eec63a4729a..8eec63a4729a 100644 --- a/lib/libstand/assert.c +++ b/sys/boot/libsa/assert.c diff --git a/lib/libstand/bcd.c b/sys/boot/libsa/bcd.c index 7bd67c91620a..7bd67c91620a 100644 --- a/lib/libstand/bcd.c +++ b/sys/boot/libsa/bcd.c diff --git a/lib/libstand/bootp.c b/sys/boot/libsa/bootp.c index d770bf3bf516..d770bf3bf516 100644 --- a/lib/libstand/bootp.c +++ b/sys/boot/libsa/bootp.c diff --git a/lib/libstand/bootp.h b/sys/boot/libsa/bootp.h index 2e7049b872af..2e7049b872af 100644 --- a/lib/libstand/bootp.h +++ b/sys/boot/libsa/bootp.h diff --git a/lib/libstand/bootparam.c b/sys/boot/libsa/bootparam.c index 1de2d53d77fe..1de2d53d77fe 100644 --- a/lib/libstand/bootparam.c +++ b/sys/boot/libsa/bootparam.c diff --git a/lib/libstand/bootparam.h b/sys/boot/libsa/bootparam.h index 9c9f50ea434d..9c9f50ea434d 100644 --- a/lib/libstand/bootparam.h +++ b/sys/boot/libsa/bootparam.h diff --git a/lib/libstand/bzipfs.c b/sys/boot/libsa/bzipfs.c index ff1514efeed3..ff1514efeed3 100644 --- a/lib/libstand/bzipfs.c +++ b/sys/boot/libsa/bzipfs.c diff --git a/lib/libstand/cd9660.c b/sys/boot/libsa/cd9660.c index c5618838e4a6..c5618838e4a6 100644 --- a/lib/libstand/cd9660.c +++ b/sys/boot/libsa/cd9660.c diff --git a/lib/libstand/close.c b/sys/boot/libsa/close.c index 142982b88444..142982b88444 100644 --- a/lib/libstand/close.c +++ b/sys/boot/libsa/close.c diff --git a/lib/libstand/closeall.c b/sys/boot/libsa/closeall.c index 9693130ebf9b..9693130ebf9b 100644 --- a/lib/libstand/closeall.c +++ b/sys/boot/libsa/closeall.c diff --git a/lib/libstand/dev.c b/sys/boot/libsa/dev.c index 20f3100852e7..20f3100852e7 100644 --- a/lib/libstand/dev.c +++ b/sys/boot/libsa/dev.c diff --git a/lib/libstand/dosfs.c b/sys/boot/libsa/dosfs.c index 68762842eaee..68762842eaee 100644 --- a/lib/libstand/dosfs.c +++ b/sys/boot/libsa/dosfs.c diff --git a/lib/libstand/dosfs.h b/sys/boot/libsa/dosfs.h index 5b11e0fc375a..5b11e0fc375a 100644 --- a/lib/libstand/dosfs.h +++ b/sys/boot/libsa/dosfs.h diff --git a/lib/libstand/environment.c b/sys/boot/libsa/environment.c index 291e33004430..291e33004430 100644 --- a/lib/libstand/environment.c +++ b/sys/boot/libsa/environment.c diff --git a/lib/libstand/ether.c b/sys/boot/libsa/ether.c index 3616777e7955..3616777e7955 100644 --- a/lib/libstand/ether.c +++ b/sys/boot/libsa/ether.c diff --git a/lib/libstand/ext2fs.c b/sys/boot/libsa/ext2fs.c index 348fdecc5c11..348fdecc5c11 100644 --- a/lib/libstand/ext2fs.c +++ b/sys/boot/libsa/ext2fs.c diff --git a/lib/libstand/fstat.c b/sys/boot/libsa/fstat.c index cb2df8cbf0ac..cb2df8cbf0ac 100644 --- a/lib/libstand/fstat.c +++ b/sys/boot/libsa/fstat.c diff --git a/lib/libstand/getopt.c b/sys/boot/libsa/getopt.c index ead2ee56267c..ead2ee56267c 100644 --- a/lib/libstand/getopt.c +++ b/sys/boot/libsa/getopt.c diff --git a/lib/libstand/gets.c b/sys/boot/libsa/gets.c index 9172ffc1328f..9172ffc1328f 100644 --- a/lib/libstand/gets.c +++ b/sys/boot/libsa/gets.c diff --git a/lib/libstand/globals.c b/sys/boot/libsa/globals.c index 8fb56cf23e6b..8fb56cf23e6b 100644 --- a/lib/libstand/globals.c +++ b/sys/boot/libsa/globals.c diff --git a/lib/libstand/gzipfs.c b/sys/boot/libsa/gzipfs.c index 6057c2835fec..6057c2835fec 100644 --- a/lib/libstand/gzipfs.c +++ b/sys/boot/libsa/gzipfs.c diff --git a/lib/libstand/i386/_setjmp.S b/sys/boot/libsa/i386/_setjmp.S index 95b0ea8037f5..95b0ea8037f5 100644 --- a/lib/libstand/i386/_setjmp.S +++ b/sys/boot/libsa/i386/_setjmp.S diff --git a/lib/libstand/in_cksum.c b/sys/boot/libsa/in_cksum.c index 97782152d71d..97782152d71d 100644 --- a/lib/libstand/in_cksum.c +++ b/sys/boot/libsa/in_cksum.c diff --git a/lib/libstand/inet_ntoa.c b/sys/boot/libsa/inet_ntoa.c index f675a0ff7736..f675a0ff7736 100644 --- a/lib/libstand/inet_ntoa.c +++ b/sys/boot/libsa/inet_ntoa.c diff --git a/lib/libstand/ioctl.c b/sys/boot/libsa/ioctl.c index 807b308e5e50..807b308e5e50 100644 --- a/lib/libstand/ioctl.c +++ b/sys/boot/libsa/ioctl.c diff --git a/lib/libstand/iodesc.h b/sys/boot/libsa/iodesc.h index 37ae044af9d9..37ae044af9d9 100644 --- a/lib/libstand/iodesc.h +++ b/sys/boot/libsa/iodesc.h diff --git a/lib/libstand/ip.c b/sys/boot/libsa/ip.c index 541cabc4bdd8..541cabc4bdd8 100644 --- a/lib/libstand/ip.c +++ b/sys/boot/libsa/ip.c diff --git a/lib/libstand/libstand.3 b/sys/boot/libsa/libstand.3 index 42289c1bce41..42289c1bce41 100644 --- a/lib/libstand/libstand.3 +++ b/sys/boot/libsa/libstand.3 diff --git a/lib/libstand/lseek.c b/sys/boot/libsa/lseek.c index df2591acd76d..df2591acd76d 100644 --- a/lib/libstand/lseek.c +++ b/sys/boot/libsa/lseek.c diff --git a/lib/libstand/mips/_setjmp.S b/sys/boot/libsa/mips/_setjmp.S index 0289b0ec9274..0289b0ec9274 100644 --- a/lib/libstand/mips/_setjmp.S +++ b/sys/boot/libsa/mips/_setjmp.S diff --git a/lib/libstand/nandfs.c b/sys/boot/libsa/nandfs.c index b3e72243e995..b3e72243e995 100644 --- a/lib/libstand/nandfs.c +++ b/sys/boot/libsa/nandfs.c diff --git a/lib/libstand/net.c b/sys/boot/libsa/net.c index ae6e74511e12..ae6e74511e12 100644 --- a/lib/libstand/net.c +++ b/sys/boot/libsa/net.c diff --git a/lib/libstand/net.h b/sys/boot/libsa/net.h index cc946c15ff5c..cc946c15ff5c 100644 --- a/lib/libstand/net.h +++ b/sys/boot/libsa/net.h diff --git a/lib/libstand/netif.c b/sys/boot/libsa/netif.c index 105f9a31ab5d..105f9a31ab5d 100644 --- a/lib/libstand/netif.c +++ b/sys/boot/libsa/netif.c diff --git a/lib/libstand/netif.h b/sys/boot/libsa/netif.h index 44165ab0d88a..44165ab0d88a 100644 --- a/lib/libstand/netif.h +++ b/sys/boot/libsa/netif.h diff --git a/lib/libstand/nfs.c b/sys/boot/libsa/nfs.c index 7e2e1ababacc..7e2e1ababacc 100644 --- a/lib/libstand/nfs.c +++ b/sys/boot/libsa/nfs.c diff --git a/lib/libstand/nfsv2.h b/sys/boot/libsa/nfsv2.h index 09b2428b8012..09b2428b8012 100644 --- a/lib/libstand/nfsv2.h +++ b/sys/boot/libsa/nfsv2.h diff --git a/lib/libstand/nullfs.c b/sys/boot/libsa/nullfs.c index 7773d16a82f6..7773d16a82f6 100644 --- a/lib/libstand/nullfs.c +++ b/sys/boot/libsa/nullfs.c diff --git a/lib/libstand/open.c b/sys/boot/libsa/open.c index 2ae17314bc54..2ae17314bc54 100644 --- a/lib/libstand/open.c +++ b/sys/boot/libsa/open.c diff --git a/lib/libstand/pager.c b/sys/boot/libsa/pager.c index a966b0bd7992..a966b0bd7992 100644 --- a/lib/libstand/pager.c +++ b/sys/boot/libsa/pager.c diff --git a/lib/libstand/pkgfs.c b/sys/boot/libsa/pkgfs.c index fda7f607087d..fda7f607087d 100644 --- a/lib/libstand/pkgfs.c +++ b/sys/boot/libsa/pkgfs.c diff --git a/lib/libstand/powerpc/_setjmp.S b/sys/boot/libsa/powerpc/_setjmp.S index 7c7c24b1237c..7c7c24b1237c 100644 --- a/lib/libstand/powerpc/_setjmp.S +++ b/sys/boot/libsa/powerpc/_setjmp.S diff --git a/lib/libstand/powerpc/syncicache.c b/sys/boot/libsa/powerpc/syncicache.c index 434dcec63416..434dcec63416 100644 --- a/lib/libstand/powerpc/syncicache.c +++ b/sys/boot/libsa/powerpc/syncicache.c diff --git a/lib/libstand/printf.c b/sys/boot/libsa/printf.c index d0c409ded53c..d0c409ded53c 100644 --- a/lib/libstand/printf.c +++ b/sys/boot/libsa/printf.c diff --git a/lib/libstand/qdivrem.c b/sys/boot/libsa/qdivrem.c index 9e7696de3853..9e7696de3853 100644 --- a/lib/libstand/qdivrem.c +++ b/sys/boot/libsa/qdivrem.c diff --git a/lib/libstand/quad.h b/sys/boot/libsa/quad.h index 3450a7a1afe4..3450a7a1afe4 100644 --- a/lib/libstand/quad.h +++ b/sys/boot/libsa/quad.h diff --git a/lib/libstand/random.c b/sys/boot/libsa/random.c index a4b4d5020642..a4b4d5020642 100644 --- a/lib/libstand/random.c +++ b/sys/boot/libsa/random.c diff --git a/lib/libstand/rarp.c b/sys/boot/libsa/rarp.c index b7e3ea486079..b7e3ea486079 100644 --- a/lib/libstand/rarp.c +++ b/sys/boot/libsa/rarp.c diff --git a/lib/libstand/read.c b/sys/boot/libsa/read.c index e48a4d864212..e48a4d864212 100644 --- a/lib/libstand/read.c +++ b/sys/boot/libsa/read.c diff --git a/lib/libstand/readdir.c b/sys/boot/libsa/readdir.c index e49d93d15ed6..e49d93d15ed6 100644 --- a/lib/libstand/readdir.c +++ b/sys/boot/libsa/readdir.c diff --git a/lib/libstand/rpc.c b/sys/boot/libsa/rpc.c index 932fdc98b903..932fdc98b903 100644 --- a/lib/libstand/rpc.c +++ b/sys/boot/libsa/rpc.c diff --git a/lib/libstand/rpc.h b/sys/boot/libsa/rpc.h index 5efe83210142..5efe83210142 100644 --- a/lib/libstand/rpc.h +++ b/sys/boot/libsa/rpc.h diff --git a/lib/libstand/rpcv2.h b/sys/boot/libsa/rpcv2.h index 4f1f016333a0..4f1f016333a0 100644 --- a/lib/libstand/rpcv2.h +++ b/sys/boot/libsa/rpcv2.h diff --git a/lib/libstand/saioctl.h b/sys/boot/libsa/saioctl.h index 5124f86187c9..5124f86187c9 100644 --- a/lib/libstand/saioctl.h +++ b/sys/boot/libsa/saioctl.h diff --git a/lib/libstand/sbrk.c b/sys/boot/libsa/sbrk.c index 471e78ecf6df..471e78ecf6df 100644 --- a/lib/libstand/sbrk.c +++ b/sys/boot/libsa/sbrk.c diff --git a/lib/libstand/sparc64/_setjmp.S b/sys/boot/libsa/sparc64/_setjmp.S index 8df29e6ba750..8df29e6ba750 100644 --- a/lib/libstand/sparc64/_setjmp.S +++ b/sys/boot/libsa/sparc64/_setjmp.S diff --git a/lib/libstand/splitfs.c b/sys/boot/libsa/splitfs.c index af28704bc465..af28704bc465 100644 --- a/lib/libstand/splitfs.c +++ b/sys/boot/libsa/splitfs.c diff --git a/lib/libstand/stand.h b/sys/boot/libsa/stand.h index 8973a32d0bc9..8973a32d0bc9 100644 --- a/lib/libstand/stand.h +++ b/sys/boot/libsa/stand.h diff --git a/lib/libstand/stat.c b/sys/boot/libsa/stat.c index 9875372b441d..9875372b441d 100644 --- a/lib/libstand/stat.c +++ b/sys/boot/libsa/stat.c diff --git a/lib/libstand/strcasecmp.c b/sys/boot/libsa/strcasecmp.c index f8131019384c..f8131019384c 100644 --- a/lib/libstand/strcasecmp.c +++ b/sys/boot/libsa/strcasecmp.c diff --git a/lib/libstand/strdup.c b/sys/boot/libsa/strdup.c index de6c4def8bc6..de6c4def8bc6 100644 --- a/lib/libstand/strdup.c +++ b/sys/boot/libsa/strdup.c diff --git a/lib/libstand/strerror.c b/sys/boot/libsa/strerror.c index e08ca0a7f175..e08ca0a7f175 100644 --- a/lib/libstand/strerror.c +++ b/sys/boot/libsa/strerror.c diff --git a/lib/libstand/strtol.c b/sys/boot/libsa/strtol.c index e15339a60d41..e15339a60d41 100644 --- a/lib/libstand/strtol.c +++ b/sys/boot/libsa/strtol.c diff --git a/lib/libstand/strtoul.c b/sys/boot/libsa/strtoul.c index 0c7147c2ab67..0c7147c2ab67 100644 --- a/lib/libstand/strtoul.c +++ b/sys/boot/libsa/strtoul.c diff --git a/lib/libstand/tftp.c b/sys/boot/libsa/tftp.c index 9bef4643d25f..9bef4643d25f 100644 --- a/lib/libstand/tftp.c +++ b/sys/boot/libsa/tftp.c diff --git a/lib/libstand/tftp.h b/sys/boot/libsa/tftp.h index c56fb81aafaa..c56fb81aafaa 100644 --- a/lib/libstand/tftp.h +++ b/sys/boot/libsa/tftp.h diff --git a/lib/libstand/twiddle.c b/sys/boot/libsa/twiddle.c index 31828542f7f3..31828542f7f3 100644 --- a/lib/libstand/twiddle.c +++ b/sys/boot/libsa/twiddle.c diff --git a/lib/libstand/udp.c b/sys/boot/libsa/udp.c index 02ac62571fb7..02ac62571fb7 100644 --- a/lib/libstand/udp.c +++ b/sys/boot/libsa/udp.c diff --git a/lib/libstand/ufs.c b/sys/boot/libsa/ufs.c index e0ceed804d9a..e0ceed804d9a 100644 --- a/lib/libstand/ufs.c +++ b/sys/boot/libsa/ufs.c diff --git a/lib/libstand/uuid_from_string.c b/sys/boot/libsa/uuid_from_string.c index 7a59b4189ead..7a59b4189ead 100644 --- a/lib/libstand/uuid_from_string.c +++ b/sys/boot/libsa/uuid_from_string.c diff --git a/lib/libstand/uuid_to_string.c b/sys/boot/libsa/uuid_to_string.c index d878af495aca..d878af495aca 100644 --- a/lib/libstand/uuid_to_string.c +++ b/sys/boot/libsa/uuid_to_string.c diff --git a/lib/libstand/write.c b/sys/boot/libsa/write.c index 6c65dd331245..6c65dd331245 100644 --- a/lib/libstand/write.c +++ b/sys/boot/libsa/write.c diff --git a/lib/libstand/zalloc.c b/sys/boot/libsa/zalloc.c index 4d1ec6291210..4d1ec6291210 100644 --- a/lib/libstand/zalloc.c +++ b/sys/boot/libsa/zalloc.c diff --git a/lib/libstand/zalloc_defs.h b/sys/boot/libsa/zalloc_defs.h index 7f2cc1202c9b..7f2cc1202c9b 100644 --- a/lib/libstand/zalloc_defs.h +++ b/sys/boot/libsa/zalloc_defs.h diff --git a/lib/libstand/zalloc_malloc.c b/sys/boot/libsa/zalloc_malloc.c index b9a295fb3850..b9a295fb3850 100644 --- a/lib/libstand/zalloc_malloc.c +++ b/sys/boot/libsa/zalloc_malloc.c diff --git a/lib/libstand/zalloc_mem.h b/sys/boot/libsa/zalloc_mem.h index 26d388dfc75e..26d388dfc75e 100644 --- a/lib/libstand/zalloc_mem.h +++ b/sys/boot/libsa/zalloc_mem.h diff --git a/lib/libstand/zalloc_protos.h b/sys/boot/libsa/zalloc_protos.h index 53a40e400dcd..53a40e400dcd 100644 --- a/lib/libstand/zalloc_protos.h +++ b/sys/boot/libsa/zalloc_protos.h diff --git a/sys/boot/libstand32/Makefile b/sys/boot/libstand32/Makefile index ace4189ee29b..a2013cf77480 100644 --- a/sys/boot/libstand32/Makefile +++ b/sys/boot/libstand32/Makefile @@ -9,8 +9,6 @@ LIBSTAND_CPUARCH=i386 .else LIBSTAND_CPUARCH=${MACHINE_CPUARCH} .endif -LIBSTAND_SRC= ${SASRC} -LIBC_SRC= ${SRCTOP}/lib/libc INTERNALLIB= INCS= MAN= diff --git a/sys/boot/userboot/libstand/Makefile b/sys/boot/userboot/libstand/Makefile index 74ae890bbc81..c5c79862cce9 100644 --- a/sys/boot/userboot/libstand/Makefile +++ b/sys/boot/userboot/libstand/Makefile @@ -3,11 +3,6 @@ .include <src.opts.mk> .include "../Makefile.inc" -LIBSTAND_SRC= ${SASRC} +.PATH: ${SASRC} -INTERNALLIB= -INCS= -MAN= -.PATH: ${LIBSTAND_SRC} - -.include "${LIBSTAND_SRC}/Makefile" +.include "${SASRC}/Makefile" |
