From bad58c9c5145c5fa2a65ce5ca37ceebbbd315e2d Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Thu, 28 Aug 2014 17:35:17 +0200 Subject: [PATCH] merge libminlib with libc Change-Id: I79cc4ea90c378a1da3dac16487b53034953827a7 --- distrib/sets/lists/minix/mi | 16 ++++----- lib/Makefile | 2 -- lib/libc/gen/Makefile.inc | 7 ++++ lib/libc/pkgconfig/libc.pc | 2 +- minix/commands/Makefile.inc | 2 +- minix/drivers/Makefile.inc | 3 -- minix/drivers/audio/Makefile.inc | 4 +-- minix/drivers/storage/ramdisk/Makefile | 1 - minix/drivers/storage/ramdisk/proto.common.dynamic | 1 - minix/drivers/usb/usb_storage/Makefile | 4 +-- minix/drivers/usb/usbd/base/earm/Makefile | 4 +-- minix/fs/Makefile.inc | 3 -- minix/fs/ext2/Makefile | 4 +-- minix/fs/iso9660fs/Makefile | 4 +-- minix/fs/procfs/Makefile | 4 +-- minix/kernel/Makefile | 2 +- minix/kernel/arch/earm/Makefile.inc | 4 +-- minix/kernel/arch/i386/Makefile.inc | 8 ++--- minix/lib/Makefile | 3 -- minix/lib/libc/Makefile.inc | 2 ++ minix/lib/libc/arch/arm/Makefile.inc | 5 +++ .../lib/{libminlib/earm => libc/arch/arm}/get_bp.S | 0 .../{libminlib/earm => libc/arch/arm}/read_tsc.c | 1 + minix/lib/libc/arch/i386/Makefile.inc | 11 +++++++ .../{libminlib => libc/arch}/i386/_cpufeature.c | 0 minix/lib/{libminlib => libc/arch}/i386/_cpuid.S | 0 minix/lib/{libminlib => libc/arch}/i386/get_bp.S | 0 .../{libminlib => libc/arch}/i386/getprocessor.S | 0 minix/lib/{libminlib => libc/arch}/i386/read_tsc.S | 0 minix/lib/{libminlib => libc/gen}/dhcp_gettag.c | 0 minix/lib/{libminlib => libc/gen}/dhcp_settag.c | 0 minix/lib/{libminlib => libc/gen}/fslib.c | 3 +- minix/lib/{libminlib => libc/gen}/fsversion.c | 0 minix/lib/{libminlib => libc/gen}/gcov.c | 0 minix/lib/{libminlib => libc/gen}/gcov_flush.c | 0 minix/lib/{libminlib => libc/gen}/itoa.c | 0 minix/lib/{libminlib => libc/gen}/oneC_sum.c | 0 minix/lib/{libminlib => libc/gen}/paramvalue.c | 0 minix/lib/{libminlib => libc/gen}/read_tsc_64.c | 0 minix/lib/{libminlib => libc/gen}/servxcheck.c | 0 minix/lib/libc/sys/Makefile.inc | 3 +- .../libc/sys/{gcov_flush.c => gcov_flush_sys.c} | 0 minix/lib/libminc/Makefile | 9 +++-- minix/lib/libminixfs/Makefile | 2 +- minix/lib/libminlib/Makefile | 38 ---------------------- minix/lib/libminlib/earm/Makefile.inc | 1 - minix/lib/libminlib/i386/Makefile.inc | 2 -- minix/lib/libminlib/pkgconfig/Makefile | 9 ----- minix/lib/libminlib/pkgconfig/minlib.pc | 6 ---- minix/lib/libminlib/shlib_version | 2 -- minix/net/Makefile.inc | 3 -- minix/servers/Makefile.inc | 3 -- minix/servers/devman/Makefile | 4 +-- minix/tests/Makefile | 2 +- minix/tests/blocktest/Makefile.inc | 2 -- minix/tests/ddekit/Makefile | 4 +-- minix/tests/ds/Makefile.inc | 2 -- minix/tests/kernel/sys_vumap/Makefile.inc | 2 -- minix/tests/safecopy/Makefile | 4 +-- minix/usr.sbin/mkfs.mfs/Makefile.mkfs | 6 ---- minix/usr.sbin/mkproto/Makefile | 3 -- share/mk/bsd.lib.mk | 2 +- share/mk/bsd.prog.mk | 1 - 63 files changed, 75 insertions(+), 135 deletions(-) create mode 100644 minix/lib/libc/arch/arm/Makefile.inc rename minix/lib/{libminlib/earm => libc/arch/arm}/get_bp.S (100%) rename minix/lib/{libminlib/earm => libc/arch/arm}/read_tsc.c (95%) create mode 100644 minix/lib/libc/arch/i386/Makefile.inc rename minix/lib/{libminlib => libc/arch}/i386/_cpufeature.c (100%) rename minix/lib/{libminlib => libc/arch}/i386/_cpuid.S (100%) rename minix/lib/{libminlib => libc/arch}/i386/get_bp.S (100%) rename minix/lib/{libminlib => libc/arch}/i386/getprocessor.S (100%) rename minix/lib/{libminlib => libc/arch}/i386/read_tsc.S (100%) rename minix/lib/{libminlib => libc/gen}/dhcp_gettag.c (100%) rename minix/lib/{libminlib => libc/gen}/dhcp_settag.c (100%) rename minix/lib/{libminlib => libc/gen}/fslib.c (97%) rename minix/lib/{libminlib => libc/gen}/fsversion.c (100%) rename minix/lib/{libminlib => libc/gen}/gcov.c (100%) rename minix/lib/{libminlib => libc/gen}/gcov_flush.c (100%) rename minix/lib/{libminlib => libc/gen}/itoa.c (100%) rename minix/lib/{libminlib => libc/gen}/oneC_sum.c (100%) rename minix/lib/{libminlib => libc/gen}/paramvalue.c (100%) rename minix/lib/{libminlib => libc/gen}/read_tsc_64.c (100%) rename minix/lib/{libminlib => libc/gen}/servxcheck.c (100%) rename minix/lib/libc/sys/{gcov_flush.c => gcov_flush_sys.c} (100%) delete mode 100644 minix/lib/libminlib/Makefile delete mode 100644 minix/lib/libminlib/earm/Makefile.inc delete mode 100644 minix/lib/libminlib/i386/Makefile.inc delete mode 100644 minix/lib/libminlib/pkgconfig/Makefile delete mode 100644 minix/lib/libminlib/pkgconfig/minlib.pc delete mode 100644 minix/lib/libminlib/shlib_version diff --git a/distrib/sets/lists/minix/mi b/distrib/sets/lists/minix/mi index 7beb005b9..6f3ad627b 100644 --- a/distrib/sets/lists/minix/mi +++ b/distrib/sets/lists/minix/mi @@ -1885,8 +1885,8 @@ ./usr/lib/bc/libmenu.a minix-sys bitcode ./usr/lib/bc/libminc.a minix-sys bitcode ./usr/lib/bc/libminixfs.a minix-sys bitcode -./usr/lib/bc/libminlib.a minix-sys bitcode -./usr/lib/bc/libmthread.a minix-sys bitcode +./usr/lib/bc/libminlib.a minix-sys bitcode obsolete +./usr/lib/bc/libmthread.a minix-sys bitcode ./usr/lib/bc/libnetdriver.a minix-sys bitcode ./usr/lib/bc/libnetsock.a minix-sys bitcode ./usr/lib/bc/libopcodes.a minix-sys bitcode,binutils @@ -2089,11 +2089,11 @@ ./usr/lib/libminc.a minix-sys ./usr/lib/libminixfs.a minix-sys ./usr/lib/libminixfs_pic.a minix-sys -./usr/lib/libminlib.a minix-sys -./usr/lib/libminlib_pic.a minix-sys -./usr/lib/libminlib.so.0.0 minix-sys -./usr/lib/libminlib.so.0 minix-sys -./usr/lib/libminlib.so minix-sys +./usr/lib/libminlib.a minix-sys obsolete +./usr/lib/libminlib_pic.a minix-sys obsolete +./usr/lib/libminlib.so.0.0 minix-sys obsolete +./usr/lib/libminlib.so.0 minix-sys obsolete +./usr/lib/libminlib.so minix-sys obsolete ./usr/lib/libm_pic.a minix-sys ./usr/lib/libm.so.0 minix-sys ./usr/lib/libm.so.0.10 minix-sys @@ -2184,7 +2184,7 @@ ./usr/lib/lua/5.1/gpio.so minix-sys ./usr/lib/lua/5.1/sqlite.so minix-sys ./usr/lib/lua/5.1/syslog.so minix-sys -./usr/lib/minlib.pc minix-sys +./usr/lib/minlib.pc minix-sys obsolete ./usr/lib/pkgconfig minix-sys ./usr/lib/pkgconfig/atf-c.pc minix-sys atf ./usr/lib/pkgconfig/atf-c++.pc minix-sys atf diff --git a/lib/Makefile b/lib/Makefile index be825604a..65e3ae4ca 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -21,9 +21,7 @@ SUBDIR+= ../external/gpl3/gcc/lib/libgcc .WAIT .if defined(__MINIX) #LSC MINIX libc depends on -# - libminlib because of minix/lib/libc/malloc-debug.c # - libmthread because of sys/lib/libunwind -SUBDIR+= ../minix/lib/libminlib SUBDIR+= .WAIT SUBDIR+= ../minix/lib/libsys diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index b44e1401c..4543a1a2f 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -4,6 +4,13 @@ # gen sources .if defined(__MINIX) .PATH: ${NETBSDSRCDIR}/minix/lib/libc/gen + +CPPFLAGS.fslib.c+= -I${NETBSDSRCDIR}/minix/fs +CPPFLAGS.fsversion.c+= -I${NETBSDSRCDIR}/minix/fs + +SRCS+= dhcp_gettag.c dhcp_settag.c fsversion.c gcov.c gcov_flush.c itoa.c \ + oneC_sum.c paramvalue.c read_tsc_64.c servxcheck.c fslib.c + .endif # defined(__MINIX) .PATH: ${ARCHDIR}/gen ${.CURDIR}/gen diff --git a/lib/libc/pkgconfig/libc.pc b/lib/libc/pkgconfig/libc.pc index 415f4d29f..7b2f1e8b9 100644 --- a/lib/libc/pkgconfig/libc.pc +++ b/lib/libc/pkgconfig/libc.pc @@ -1,4 +1,4 @@ Name: c Description: NetBSD C Library Version: 1.0 -Libs: -lc -lminlib +Libs: -lc diff --git a/minix/commands/Makefile.inc b/minix/commands/Makefile.inc index 70ce47200..5c8747be1 100644 --- a/minix/commands/Makefile.inc +++ b/minix/commands/Makefile.inc @@ -1,7 +1,7 @@ # Only include Minix-specific libraries when compiling # for non-Minix, i.e. not natively in a crossbuild. .if !defined(HOSTPROGNAME) -LDADD+= -lminlib -lasyn -lterminfo +LDADD+= -lasyn -lterminfo .endif BINDIR?=/usr/bin diff --git a/minix/drivers/Makefile.inc b/minix/drivers/Makefile.inc index f9a17bb73..2fe960cd1 100644 --- a/minix/drivers/Makefile.inc +++ b/minix/drivers/Makefile.inc @@ -1,7 +1,4 @@ BINDIR?= /service MAN?= -LDADD+= -lminlib -DPADD+= ${LIBMINLIB} - .include "../Makefile.inc" diff --git a/minix/drivers/audio/Makefile.inc b/minix/drivers/audio/Makefile.inc index 9af54d4af..d32baf393 100644 --- a/minix/drivers/audio/Makefile.inc +++ b/minix/drivers/audio/Makefile.inc @@ -1,7 +1,7 @@ BINDIR?= /service MAN?= -DPADD+= ${LIBAUDIODRIVER} ${LIBCHARDRIVER} ${LIBSYS} ${LIBMINLIB} -LDADD+= -laudiodriver -lchardriver -lsys -lminlib +DPADD+= ${LIBAUDIODRIVER} ${LIBCHARDRIVER} ${LIBSYS} +LDADD+= -laudiodriver -lchardriver -lsys .include "../Makefile.inc" diff --git a/minix/drivers/storage/ramdisk/Makefile b/minix/drivers/storage/ramdisk/Makefile index 1c843aa85..3e2a7f448 100644 --- a/minix/drivers/storage/ramdisk/Makefile +++ b/minix/drivers/storage/ramdisk/Makefile @@ -98,7 +98,6 @@ dir.mmc:= minix/drivers/storage/mmc RAMDISK_DYNAMIC= 1 PROGRAMS+= ld.elf_so PROG_LIBS+= libc -PROG_MINIXLIBS+= libminlib PROG_MINIXLIBS+= libterminfo .endif diff --git a/minix/drivers/storage/ramdisk/proto.common.dynamic b/minix/drivers/storage/ramdisk/proto.common.dynamic index c411a0daf..27bf79170 100644 --- a/minix/drivers/storage/ramdisk/proto.common.dynamic +++ b/minix/drivers/storage/ramdisk/proto.common.dynamic @@ -4,7 +4,6 @@ usr d--755 0 0 lib d--755 0 0 libc.so.0 ---755 0 0 libc.so.0 - libminlib.so.0 ---755 0 0 libminlib.so.0 libterminfo.so.0 ---755 0 0 libterminfo.so.0 $ $ diff --git a/minix/drivers/usb/usb_storage/Makefile b/minix/drivers/usb/usb_storage/Makefile index b3a667aad..6c37a9c42 100644 --- a/minix/drivers/usb/usb_storage/Makefile +++ b/minix/drivers/usb/usb_storage/Makefile @@ -6,8 +6,8 @@ FILES= $(PROG).conf FILESNAME= $(PROG) FILESDIR= /etc/system.conf.d -DPADD+= ${LIBBLOCKDRIVER} ${LIBDDEKIT_USB_CLIENT} ${LIBSYS} ${LIBMINLIB} ${LIBDDEKIT} ${LIBUSB} -LDADD+= -lblockdriver -lddekit_usb_client -lsys -lminlib -lddekit -lusb +DPADD+= ${LIBBLOCKDRIVER} ${LIBDDEKIT_USB_CLIENT} ${LIBSYS} ${LIBDDEKIT} ${LIBUSB} +LDADD+= -lblockdriver -lddekit_usb_client -lsys -lddekit -lusb #For easier debugging, uncomment: #LDADD+= -Wl,-Ttext=0x800000 diff --git a/minix/drivers/usb/usbd/base/earm/Makefile b/minix/drivers/usb/usbd/base/earm/Makefile index 59425a2c5..c5c7e1726 100644 --- a/minix/drivers/usb/usbd/base/earm/Makefile +++ b/minix/drivers/usb/usbd/base/earm/Makefile @@ -9,7 +9,7 @@ BINDIR= /service CPPFLAGS+= -I${.CURDIR}/../../include -DPADD+= ${LIBDDEKIT} ${LIBDDEKIT_USB_SERVER} ${LIBDEVMAN} ${LIBUSB} ${LIBMINC} ${LIBCLKCONF} ${LIBSYS} ${LIBMINLIB} -LDADD+= -lddekit -lddekit_usb_server -ldevman -lusb -lminc -lclkconf -lsys -lminlib +DPADD+= ${LIBDDEKIT} ${LIBDDEKIT_USB_SERVER} ${LIBDEVMAN} ${LIBUSB} ${LIBMINC} ${LIBCLKCONF} ${LIBSYS} +LDADD+= -lddekit -lddekit_usb_server -ldevman -lusb -lminc -lclkconf -lsys .include diff --git a/minix/fs/Makefile.inc b/minix/fs/Makefile.inc index f9a17bb73..2fe960cd1 100644 --- a/minix/fs/Makefile.inc +++ b/minix/fs/Makefile.inc @@ -1,7 +1,4 @@ BINDIR?= /service MAN?= -LDADD+= -lminlib -DPADD+= ${LIBMINLIB} - .include "../Makefile.inc" diff --git a/minix/fs/ext2/Makefile b/minix/fs/ext2/Makefile index 44f289c30..abbe5b54e 100644 --- a/minix/fs/ext2/Makefile +++ b/minix/fs/ext2/Makefile @@ -5,8 +5,8 @@ SRCS= balloc.c link.c \ stadir.c table.c time.c utility.c \ write.c ialloc.c inode.c main.c path.c \ super.c -DPADD+= ${LIBMINIXFS} ${LIBBDEV} ${LIBSYS} ${LIBMINLIB} -LDADD+= -lminixfs -lbdev -lsys -lminlib +DPADD+= ${LIBMINIXFS} ${LIBBDEV} ${LIBSYS} +LDADD+= -lminixfs -lbdev -lsys WARNS=3 diff --git a/minix/fs/iso9660fs/Makefile b/minix/fs/iso9660fs/Makefile index ecdc7c568..d95cfd17a 100644 --- a/minix/fs/iso9660fs/Makefile +++ b/minix/fs/iso9660fs/Makefile @@ -3,8 +3,8 @@ PROG= isofs SRCS= main.c table.c mount.c super.c inode.c \ utility.c misc.c path.c read.c stadir.c -DPADD+= ${LIBBDEV} ${LIBSYS} ${LIBMINLIB} -LDADD+= -lbdev -lsys -lc -lminixfs -lminlib +DPADD+= ${LIBBDEV} ${LIBSYS} +LDADD+= -lbdev -lsys -lc -lminixfs CPPFLAGS+= -DNR_BUFS=100 diff --git a/minix/fs/procfs/Makefile b/minix/fs/procfs/Makefile index 8f18ef205..04b619601 100644 --- a/minix/fs/procfs/Makefile +++ b/minix/fs/procfs/Makefile @@ -8,7 +8,7 @@ CPPFLAGS+= -I${NETBSDSRCDIR}/minix CPPFLAGS+= -I${NETBSDSRCDIR}/minix/fs CPPFLAGS+= -I${NETBSDSRCDIR}/minix/servers -DPADD+= ${LIBVTREEFS} ${LIBMINLIB} -LDADD+= -lvtreefs -lminlib +DPADD+= ${LIBVTREEFS} ${LIBMINIXFS} +LDADD+= -lvtreefs -lminixfs .include diff --git a/minix/kernel/Makefile b/minix/kernel/Makefile index 2363f63e5..eee010077 100644 --- a/minix/kernel/Makefile +++ b/minix/kernel/Makefile @@ -10,7 +10,7 @@ MAN= SRCS+= clock.c cpulocals.c interrupt.c main.c proc.c system.c \ table.c utility.c usermapped_data.c -LDADD+= -ltimers -lsys -lexec -lminlib +LDADD+= -ltimers -lsys -lexec LINKERSCRIPT= ${.CURDIR}/arch/${MACHINE_ARCH}/kernel.lds diff --git a/minix/kernel/arch/earm/Makefile.inc b/minix/kernel/arch/earm/Makefile.inc index 1b671011b..eb56e80c5 100644 --- a/minix/kernel/arch/earm/Makefile.inc +++ b/minix/kernel/arch/earm/Makefile.inc @@ -4,9 +4,9 @@ HERE=${.CURDIR}/arch/${MACHINE_ARCH} .PATH: ${HERE} -# objects we want unpaged from -lminlib +# objects we want unpaged from -lc MINLIB_OBJS_UNPAGED= get_bp.o -get_bp.o: ${NETBSDSRCDIR}/minix/lib/libminlib/${MACHINE_ARCH}/get_bp.S +get_bp.o: ${NETBSDSRCDIR}/minix/lib/libc/arch/arm/get_bp.S # objects we want unpaged from -lsys SYS_OBJS_UNPAGED=assert.o stacktrace.o diff --git a/minix/kernel/arch/i386/Makefile.inc b/minix/kernel/arch/i386/Makefile.inc index f5fe8b360..a32a4c9a5 100644 --- a/minix/kernel/arch/i386/Makefile.inc +++ b/minix/kernel/arch/i386/Makefile.inc @@ -4,11 +4,11 @@ HERE=${.CURDIR}/arch/${MACHINE_ARCH} .PATH: ${HERE} -# objects we want unpaged from -lminlib +# objects we want unpaged from -lc MINLIB_OBJS_UNPAGED= _cpufeature.o _cpuid.o get_bp.o -_cpufeature.o: ${NETBSDSRCDIR}/minix/lib/libminlib/${MACHINE_ARCH}/_cpufeature.c -_cpuid.o: ${NETBSDSRCDIR}/minix/lib/libminlib/${MACHINE_ARCH}/_cpuid.S -get_bp.o: ${NETBSDSRCDIR}/minix/lib/libminlib/${MACHINE_ARCH}/get_bp.S +_cpufeature.o: ${NETBSDSRCDIR}/minix/lib/libc/arch/${MACHINE_ARCH}/_cpufeature.c +_cpuid.o: ${NETBSDSRCDIR}/minix/lib/libc/arch/${MACHINE_ARCH}/_cpuid.S +get_bp.o: ${NETBSDSRCDIR}/minix/lib/libc/arch/${MACHINE_ARCH}/get_bp.S # objects we want unpaged from -lsys SYS_OBJS_UNPAGED=assert.o stacktrace.o diff --git a/minix/lib/Makefile b/minix/lib/Makefile index d0d2f3f0d..40b0fc7da 100644 --- a/minix/lib/Makefile +++ b/minix/lib/Makefile @@ -1,8 +1,5 @@ .include -SUBDIR+= libminlib -SUBDIR+= .WAIT - SUBDIR+= libsys SUBDIR+= libmthread SUBDIR+= .WAIT diff --git a/minix/lib/libc/Makefile.inc b/minix/lib/libc/Makefile.inc index 54710cca8..2e7443f2a 100644 --- a/minix/lib/libc/Makefile.inc +++ b/minix/lib/libc/Makefile.inc @@ -1,6 +1,8 @@ # MINIX Specifics sources .PATH: ${NETBSDSRCDIR}/minix/lib/libc +CPPFLAGS.fslib.c+= -I${NETBSDSRCDIR}/minix/fs + SRCS+= minix-malloc.c minix-calloc.c SRCS+= minix-malloc-debug.c SRCS+= configfile.c mtab.c stderr.c diff --git a/minix/lib/libc/arch/arm/Makefile.inc b/minix/lib/libc/arch/arm/Makefile.inc new file mode 100644 index 000000000..dfa289c9b --- /dev/null +++ b/minix/lib/libc/arch/arm/Makefile.inc @@ -0,0 +1,5 @@ +C_HERE=${NETBSDSRCDIR}/minix/lib/libc/arch/${ARCHSUBDIR} +.PATH: ${C_HERE} + +SRCS+= get_bp.S \ + read_tsc.c diff --git a/minix/lib/libminlib/earm/get_bp.S b/minix/lib/libc/arch/arm/get_bp.S similarity index 100% rename from minix/lib/libminlib/earm/get_bp.S rename to minix/lib/libc/arch/arm/get_bp.S diff --git a/minix/lib/libminlib/earm/read_tsc.c b/minix/lib/libc/arch/arm/read_tsc.c similarity index 95% rename from minix/lib/libminlib/earm/read_tsc.c rename to minix/lib/libc/arch/arm/read_tsc.c index 2252615dd..de829f8b0 100644 --- a/minix/lib/libminlib/earm/read_tsc.c +++ b/minix/lib/libc/arch/arm/read_tsc.c @@ -1,4 +1,5 @@ #include +#include void read_tsc(u32_t *hi, u32_t *lo) diff --git a/minix/lib/libc/arch/i386/Makefile.inc b/minix/lib/libc/arch/i386/Makefile.inc new file mode 100644 index 000000000..9b4457a93 --- /dev/null +++ b/minix/lib/libc/arch/i386/Makefile.inc @@ -0,0 +1,11 @@ +C_HERE=${NETBSDSRCDIR}/minix/lib/libc/arch/${ARCHSUBDIR} +.PATH: ${C_HERE} + +.warning looking into ${C_HERE} + +SRCS+= _cpuid.S \ + get_bp.S \ + getprocessor.S \ + read_tsc.S \ + _cpufeature.c + diff --git a/minix/lib/libminlib/i386/_cpufeature.c b/minix/lib/libc/arch/i386/_cpufeature.c similarity index 100% rename from minix/lib/libminlib/i386/_cpufeature.c rename to minix/lib/libc/arch/i386/_cpufeature.c diff --git a/minix/lib/libminlib/i386/_cpuid.S b/minix/lib/libc/arch/i386/_cpuid.S similarity index 100% rename from minix/lib/libminlib/i386/_cpuid.S rename to minix/lib/libc/arch/i386/_cpuid.S diff --git a/minix/lib/libminlib/i386/get_bp.S b/minix/lib/libc/arch/i386/get_bp.S similarity index 100% rename from minix/lib/libminlib/i386/get_bp.S rename to minix/lib/libc/arch/i386/get_bp.S diff --git a/minix/lib/libminlib/i386/getprocessor.S b/minix/lib/libc/arch/i386/getprocessor.S similarity index 100% rename from minix/lib/libminlib/i386/getprocessor.S rename to minix/lib/libc/arch/i386/getprocessor.S diff --git a/minix/lib/libminlib/i386/read_tsc.S b/minix/lib/libc/arch/i386/read_tsc.S similarity index 100% rename from minix/lib/libminlib/i386/read_tsc.S rename to minix/lib/libc/arch/i386/read_tsc.S diff --git a/minix/lib/libminlib/dhcp_gettag.c b/minix/lib/libc/gen/dhcp_gettag.c similarity index 100% rename from minix/lib/libminlib/dhcp_gettag.c rename to minix/lib/libc/gen/dhcp_gettag.c diff --git a/minix/lib/libminlib/dhcp_settag.c b/minix/lib/libc/gen/dhcp_settag.c similarity index 100% rename from minix/lib/libminlib/dhcp_settag.c rename to minix/lib/libc/gen/dhcp_settag.c diff --git a/minix/lib/libminlib/fslib.c b/minix/lib/libc/gen/fslib.c similarity index 97% rename from minix/lib/libminlib/fslib.c rename to minix/lib/libc/gen/fslib.c index 07901d13c..0613d5933 100644 --- a/minix/lib/libminlib/fslib.c +++ b/minix/lib/libc/gen/fslib.c @@ -3,6 +3,7 @@ #include /* for unused stuff in :-( */ #include #include +#include #include #include #include /* for unshort :-( */ @@ -54,6 +55,6 @@ uint8_t fs_mode_to_type(mode_t mode) else if(S_ISFIFO(mode)) return DT_FIFO; else if(S_ISSOCK(mode)) return DT_SOCK; - panic("unknown type, mode 0x%x", mode); + assert(0 && "unknown type"); } diff --git a/minix/lib/libminlib/fsversion.c b/minix/lib/libc/gen/fsversion.c similarity index 100% rename from minix/lib/libminlib/fsversion.c rename to minix/lib/libc/gen/fsversion.c diff --git a/minix/lib/libminlib/gcov.c b/minix/lib/libc/gen/gcov.c similarity index 100% rename from minix/lib/libminlib/gcov.c rename to minix/lib/libc/gen/gcov.c diff --git a/minix/lib/libminlib/gcov_flush.c b/minix/lib/libc/gen/gcov_flush.c similarity index 100% rename from minix/lib/libminlib/gcov_flush.c rename to minix/lib/libc/gen/gcov_flush.c diff --git a/minix/lib/libminlib/itoa.c b/minix/lib/libc/gen/itoa.c similarity index 100% rename from minix/lib/libminlib/itoa.c rename to minix/lib/libc/gen/itoa.c diff --git a/minix/lib/libminlib/oneC_sum.c b/minix/lib/libc/gen/oneC_sum.c similarity index 100% rename from minix/lib/libminlib/oneC_sum.c rename to minix/lib/libc/gen/oneC_sum.c diff --git a/minix/lib/libminlib/paramvalue.c b/minix/lib/libc/gen/paramvalue.c similarity index 100% rename from minix/lib/libminlib/paramvalue.c rename to minix/lib/libc/gen/paramvalue.c diff --git a/minix/lib/libminlib/read_tsc_64.c b/minix/lib/libc/gen/read_tsc_64.c similarity index 100% rename from minix/lib/libminlib/read_tsc_64.c rename to minix/lib/libc/gen/read_tsc_64.c diff --git a/minix/lib/libminlib/servxcheck.c b/minix/lib/libc/gen/servxcheck.c similarity index 100% rename from minix/lib/libminlib/servxcheck.c rename to minix/lib/libc/gen/servxcheck.c diff --git a/minix/lib/libc/sys/Makefile.inc b/minix/lib/libc/sys/Makefile.inc index b54699a10..38fa56033 100644 --- a/minix/lib/libc/sys/Makefile.inc +++ b/minix/lib/libc/sys/Makefile.inc @@ -4,7 +4,7 @@ SRCS+= accept.c access.c adjtime.c bind.c brk.c sbrk.c m_closefrom.c getsid.c \ chdir.c chmod.c fchmod.c chown.c fchown.c chroot.c close.c \ clock_getres.c clock_gettime.c clock_settime.c \ connect.c dup.c dup2.c execve.c fcntl.c flock.c fpathconf.c fork.c \ - fstatfs.c fstatvfs.c fsync.c ftruncate.c gcov_flush.c getdents.c \ + fstatfs.c fstatvfs.c fsync.c ftruncate.c gcov_flush_sys.c getdents.c \ getegid.c getgid.c \ getgroups.c getitimer.c setitimer.c __getlogin.c getpeername.c \ getpgrp.c getpid.c getppid.c priority.c getrlimit.c getsockname.c \ @@ -33,3 +33,4 @@ lchown.o lchown.pico lchown.bc: ${NETBSDSRCDIR}/tools/compat/lchown.c lchmod.o lchmod.pico lchmod.bc: ${NETBSDSRCDIR}/tools/compat/lchmod.c .include "${NETBSDSRCDIR}/minix/lib/libc/arch/${ARCHSUBDIR}/sys/Makefile.inc" +.include "${NETBSDSRCDIR}/minix/lib/libc/arch/${ARCHSUBDIR}/Makefile.inc" diff --git a/minix/lib/libc/sys/gcov_flush.c b/minix/lib/libc/sys/gcov_flush_sys.c similarity index 100% rename from minix/lib/libc/sys/gcov_flush.c rename to minix/lib/libc/sys/gcov_flush_sys.c diff --git a/minix/lib/libminc/Makefile b/minix/lib/libminc/Makefile index 781f0cf18..4d3093460 100644 --- a/minix/lib/libminc/Makefile +++ b/minix/lib/libminc/Makefile @@ -61,6 +61,8 @@ CLEANFILES+= ${f:C/\.o/.bc/} .endif # ${USE_BITCODE:Uno} == "yes" .endfor +CPPFLAGS.fslib.c+= -I${NETBSDSRCDIR}/minix/fs + # LSC: I would like not to have to copy te file, but I can't # have libsa appear first in the .PATH, for a lot of files # would be taken from there, which is not the intention ATM. @@ -181,7 +183,7 @@ CLEANFILES+= errlist.c .for f in \ _errno.o \ getprogname.o setprogname.o execle.o sleep.o time.o \ - ctype_.o tolower_.o toupper_.o usleep.o sigsetops.o + ctype_.o tolower_.o toupper_.o usleep.o sigsetops.o ${f} ${f:C/\.o/.bc/}: ${LIBCDIR}/gen/${f:C/\.o/.c/} OBJS+= ${f} CLEANFILES+= ${f} @@ -198,7 +200,7 @@ CPPFLAGS.tolower_.c+= -I${LIBCDIR}/locale CPPFLAGS.toupper_.c+= -I${LIBCDIR}/locale .for f in \ - waitpid.o + waitpid.o read_tsc_64.o fslib.o itoa.o ${f} ${f:C/\.o/.bc/}: ${LIBMINIXCDIR}/gen/${f:C/\.o/.c/} OBJS+= ${f} CLEANFILES+= ${f} @@ -297,4 +299,7 @@ CLEANFILES+= ${f:C/\.o/.bc/} .endif # ${USE_BITCODE:Uno} == "yes" .endfor +ARCHSUBDIR=${MACHINE_CPU} +.include "${NETBSDSRCDIR}/minix/lib/libc/arch/${MACHINE_CPU}/Makefile.inc" + .include diff --git a/minix/lib/libminixfs/Makefile b/minix/lib/libminixfs/Makefile index f714dfebf..53a5cf1e3 100644 --- a/minix/lib/libminixfs/Makefile +++ b/minix/lib/libminixfs/Makefile @@ -6,6 +6,6 @@ CPPFLAGS+= -D_MINIX_SYSTEM .include LIB= minixfs -SRCS= fetch_credentials.c cache.c +SRCS= fetch_credentials.c cache.c .include diff --git a/minix/lib/libminlib/Makefile b/minix/lib/libminlib/Makefile deleted file mode 100644 index 1eb7d2533..000000000 --- a/minix/lib/libminlib/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -NOGCCERROR=yes -NOCLANGERROR=yes - -.include - -.PATH: ${.CURDIR} ${.CURDIR}/${MACHINE_ARCH} -.include "${MACHINE_ARCH}/Makefile.inc" - -INCSDIR= /usr/include -LIB= minlib - -USE_SHLIBDIR= yes - -CPPFLAGS.fslib.c+= -I${NETBSDSRCDIR}/minix/fs -CPPFLAGS.fsversion.c+= -I${NETBSDSRCDIR}/minix/fs -SRCS+= fslib.c fsversion.c - -# DHCP get/set tags. -SRCS+= dhcp_gettag.c dhcp_settag.c - -# Gcov support. -SRCS+= gcov.c gcov_flush.c - -# Various utils -SRCS+= itoa.c read_tsc_64.c - -# servxcheck -SRCS+= servxcheck.c - -# queryparam -SRCS+= paramvalue.c - -SRCS+= oneC_sum.c - -SUBDIR+= pkgconfig - -.include -.include diff --git a/minix/lib/libminlib/earm/Makefile.inc b/minix/lib/libminlib/earm/Makefile.inc deleted file mode 100644 index e9852c42b..000000000 --- a/minix/lib/libminlib/earm/Makefile.inc +++ /dev/null @@ -1 +0,0 @@ -SRCS+= get_bp.S read_tsc.c diff --git a/minix/lib/libminlib/i386/Makefile.inc b/minix/lib/libminlib/i386/Makefile.inc deleted file mode 100644 index 34e821681..000000000 --- a/minix/lib/libminlib/i386/Makefile.inc +++ /dev/null @@ -1,2 +0,0 @@ -SRCS+= _cpufeature.c _cpuid.S get_bp.S getprocessor.S \ - read_tsc.S diff --git a/minix/lib/libminlib/pkgconfig/Makefile b/minix/lib/libminlib/pkgconfig/Makefile deleted file mode 100644 index fa821dc7c..000000000 --- a/minix/lib/libminlib/pkgconfig/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -.include - -NOOBJ= # defined - -FILES=minlib.pc -FILESDIR=/usr/lib -FILESMODE=444 - -.include diff --git a/minix/lib/libminlib/pkgconfig/minlib.pc b/minix/lib/libminlib/pkgconfig/minlib.pc deleted file mode 100644 index de98a5370..000000000 --- a/minix/lib/libminlib/pkgconfig/minlib.pc +++ /dev/null @@ -1,6 +0,0 @@ -Name: minlib -Description: Minix Compatibility Library -Version: 1.0 -Libs: -lminlib -Cflags: - diff --git a/minix/lib/libminlib/shlib_version b/minix/lib/libminlib/shlib_version deleted file mode 100644 index 97c9f92d6..000000000 --- a/minix/lib/libminlib/shlib_version +++ /dev/null @@ -1,2 +0,0 @@ -major=0 -minor=0 diff --git a/minix/net/Makefile.inc b/minix/net/Makefile.inc index 6e52d1428..2fe960cd1 100644 --- a/minix/net/Makefile.inc +++ b/minix/net/Makefile.inc @@ -1,7 +1,4 @@ BINDIR?= /service MAN?= -LDADD+= -lminlib -DPADD+= ${LIBMINLIB} - .include "../Makefile.inc" diff --git a/minix/servers/Makefile.inc b/minix/servers/Makefile.inc index f9a17bb73..2fe960cd1 100644 --- a/minix/servers/Makefile.inc +++ b/minix/servers/Makefile.inc @@ -1,7 +1,4 @@ BINDIR?= /service MAN?= -LDADD+= -lminlib -DPADD+= ${LIBMINLIB} - .include "../Makefile.inc" diff --git a/minix/servers/devman/Makefile b/minix/servers/devman/Makefile index 02186db08..84d67e654 100644 --- a/minix/servers/devman/Makefile +++ b/minix/servers/devman/Makefile @@ -1,7 +1,7 @@ PROG = devman SRCS = main.c device.c buf.c bind.c -DPADD+= ${LIBSYS} ${LIBMINLIB} -LDADD = -lvtreefs -lsys -lminlib +DPADD+= ${LIBSYS} +LDADD = -lvtreefs -lsys .include diff --git a/minix/tests/Makefile b/minix/tests/Makefile index 3cf2a91a5..6a9d8d898 100644 --- a/minix/tests/Makefile +++ b/minix/tests/Makefile @@ -53,7 +53,7 @@ LDADD.test72+= -lminixfs PROGS += testvm OBJS.testvm+= testcache.o LDSTATIC.testvm= -static -LDADD.testvm+= -lsys -ltimers -lminlib +LDADD.testvm+= -lsys -ltimers FILES += testvm.conf diff --git a/minix/tests/blocktest/Makefile.inc b/minix/tests/blocktest/Makefile.inc index cbeb43b83..3ce23832e 100644 --- a/minix/tests/blocktest/Makefile.inc +++ b/minix/tests/blocktest/Makefile.inc @@ -1,4 +1,2 @@ # Copied from drivers/Makefile.inc, and slightly edited. -LDADD+= -lminlib -DPADD+= ${LIBMINLIB} BINDIR?=/usr/sbin diff --git a/minix/tests/ddekit/Makefile b/minix/tests/ddekit/Makefile index c3ccb30ea..d23b432c7 100644 --- a/minix/tests/ddekit/Makefile +++ b/minix/tests/ddekit/Makefile @@ -6,8 +6,8 @@ SCRIPTS= ddekittest.sh #uncomment the following for proper debugging #CFLAGS+=-g #LDFLAGS+= -Ttext=0x4000000 -LDADD+= -lsys -lddekit -lminlib -DPADD+= ${LIBSYS} ${LIBDDEKIT} ${LIBMINLIB} +LDADD+= -lsys -lddekit +DPADD+= ${LIBSYS} ${LIBDDEKIT} MAN= diff --git a/minix/tests/ds/Makefile.inc b/minix/tests/ds/Makefile.inc index 950d4e92a..9bff3c5de 100644 --- a/minix/tests/ds/Makefile.inc +++ b/minix/tests/ds/Makefile.inc @@ -1,4 +1,2 @@ # Copied from drivers/Makefile.inc -LDADD+= -lminlib -DPADD+= ${LIBMINLIB} BINDIR?=/usr/sbin diff --git a/minix/tests/kernel/sys_vumap/Makefile.inc b/minix/tests/kernel/sys_vumap/Makefile.inc index 83e42085b..9bff3c5de 100644 --- a/minix/tests/kernel/sys_vumap/Makefile.inc +++ b/minix/tests/kernel/sys_vumap/Makefile.inc @@ -1,4 +1,2 @@ # Copied from drivers/Makefile.inc -LDADD+= -lminlib -DPADD+= ${LIBMINLIB} BINDIR?=/usr/sbin diff --git a/minix/tests/safecopy/Makefile b/minix/tests/safecopy/Makefile index 3a6921cf1..477c05895 100644 --- a/minix/tests/safecopy/Makefile +++ b/minix/tests/safecopy/Makefile @@ -2,10 +2,10 @@ all: requestor grantor 1fifo 2fifo chmod +x down run requestor: requestor.c inc.h - cc -static -o $@ $< -lsys -lminlib + cc -static -o $@ $< -lsys grantor: grantor.c inc.h - cc -static -o $@ $< -lsys -lminlib + cc -static -o $@ $< -lsys 1fifo 2fifo: mkfifo $@ diff --git a/minix/usr.sbin/mkfs.mfs/Makefile.mkfs b/minix/usr.sbin/mkfs.mfs/Makefile.mkfs index 3dbdba0d2..06c4ed939 100644 --- a/minix/usr.sbin/mkfs.mfs/Makefile.mkfs +++ b/minix/usr.sbin/mkfs.mfs/Makefile.mkfs @@ -9,12 +9,6 @@ MAN?= CPPFLAGS+= -I${.CURDIR} -.if ${HOST_OSTYPE:C/\-.*//:U} == "Minix" || !defined(HOSTPROGNAME) -#LSC: FIXME This should not be required, more so only on Minix... -LDADD+= -lminlib -DPADD+= ${MINLIB} ${COMPAT_MINIX} -.endif - NOGCCERROR?= yes NOCLANGERROR?= yes diff --git a/minix/usr.sbin/mkproto/Makefile b/minix/usr.sbin/mkproto/Makefile index 57ebb8898..4803ffb5c 100644 --- a/minix/usr.sbin/mkproto/Makefile +++ b/minix/usr.sbin/mkproto/Makefile @@ -1,9 +1,6 @@ PROG= mkproto MAN= -LDADD+= -lminlib -DPADD+= ${LIBMINLIB} - NOGCCERROR?= yes NOCLANGERROR?= yes diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 95af8dd95..08e3ec2ae 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -628,7 +628,7 @@ DPLIBC ?= ${DESTDIR}${LIBC_SO} .endif .else .if ${LIB} != "c" && ${LIB:Mgcc*} == "" \ - && ${LIB} != "minlib" && ${LIB} != "sys" && ${LIB} != "minc" && ${LIB} != "mthread" # Minix-specific libs + && ${LIB} != "sys" && ${LIB} != "minc" && ${LIB} != "mthread" # Minix-specific libs .if !empty(LIBC_SO) DPLIBC ?= ${DESTDIR}${LIBC_SO} .endif diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index fea244b01..64c807b77 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -229,7 +229,6 @@ LIB${_lib:tu}= ${DESTDIR}/usr/lib/lib${_lib:S/xx/++/:S/atf_c/atf-c/}.a lwip \ minc \ minixfs \ - minlib \ mthread \ netdriver \ netsock \ -- 2.11.4.GIT