Libraries updates and cleanup

* Updating common/lib
 * Updating lib/csu
 * Updating lib/libc
 * Updating libexec/ld.elf_so
 * Corrected test on __minix in featuretest to actually follow the
   meaning of the comment.
 * Cleaned up _REENTRANT-related defintions.
 * Disabled -D_REENTRANT for libfetch
 * Removing some unneeded __NBSD_LIBC defines and tests

Change-Id: Ic1394baef74d11b9f86b312f5ff4bbc3cbf72ce2
This commit is contained in:
2012-11-15 12:06:41 +01:00
parent f6aac1c3b5
commit f14fb60209
1285 changed files with 44244 additions and 14308 deletions

View File

@@ -1,6 +1,8 @@
# Makefile for kernel
.include <bsd.own.mk>
BINDIR= /usr/sbin
MAN=
PROG= kernel
.include "arch/${MACHINE_ARCH}/Makefile.inc"
@@ -8,29 +10,28 @@ PROG= kernel
SRCS+= clock.c cpulocals.c interrupt.c main.c proc.c system.c \
table.c utility.c usermapped_data.c
LINKERSCRIPT=${.CURDIR}/arch/${MACHINE_ARCH}/kernel.lds
DPADD+= ${LIBTIMERS} ${LIBSYS} ${LIBEXEC} ${LIBMINLIB}
LDADD+= -ltimers -lsys -lexec -lminlib -L/usr/lib
DPADD+= ${LIBTIMERS} ${LIBSYS} ${LIBEXEC} ${LINKERSCRIPT}
LDADD+= -ltimers -lsys -lexec
LINKERSCRIPT= ${.CURDIR}/arch/${MACHINE_ARCH}/kernel.lds
CFLAGS += -D__kernel__
CPPFLAGS+= -fno-stack-protector -D_NETBSD_SOURCE -D_MINIX
LDFLAGS+= -T ${LINKERSCRIPT}
LDFLAGS+= -nostdlib -L${DESTDIR}/${LIBDIR}
LDADD+= -lminlib
DPADD+= ${LIBMINLIB}
.if !empty(CC:M*gcc)
LDADD+= -lgcc -lsys -lgcc -lminc
.elif !empty(CC:M*clang)
LDADD+= -L/usr/pkg/compiler-rt/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic -lminc
DPADD+= ${LIBC}
.endif
LDFLAGS+= -nostdlib
CFLAGS += -fno-stack-protector
CPPFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH}/include -I${NETBSDSRCDIR}
CPPFLAGS+= -D_NETBSD_SOURCE -D_MINIX -D__kernel__
BINDIR= /usr/sbin
MAN=
# kernel headers are always called through kernel/*.h
CPPFLAGS+= -I${NETBSDSRCDIR}
# kernel headers are always called through kernel/*.hi, this
# time for generated headers, during cross compilation
CPPFLAGS+= -I${.OBJDIR}/..
# Machine-dependent headers, order is important!
CPPFLAGS+= -I${.CURDIR}/arch/${MACHINE_ARCH}
CPPFLAGS+= -I${.CURDIR}/arch/${MACHINE_ARCH}/include
CPPFLAGS+= -I${NETBSDSRCDIR}/include/arch/${MACHINE_ARCH}/include
.include "system/Makefile.inc"
@@ -69,12 +70,10 @@ CPPFLAGS+= -DUSE_STATECTL
CPPFLAGS+= -DUSE_TRACE
.endif
.include <bsd.prog.mk>
CLEANFILES+=extracted-errno.h extracted-mfield.h extracted-mtype.h procoffsets.h
debug.d: extracted-errno.h extracted-mfield.h extracted-mtype.h
CLEANFILES+=extracted-errno.h extracted-mfield.h extracted-mtype.h procoffsets.h
extracted-errno.h: extract-errno.sh ../include/errno.h
${_MKTARGET_CREATE}
cd ${.CURDIR} ; ${HOST_SH} extract-errno.sh > ${.OBJDIR}/extracted-errno.h
@@ -87,7 +86,4 @@ extracted-mtype.h: extract-mtype.sh ../include/minix/com.h
${_MKTARGET_CREATE}
cd ${.CURDIR} ; ${HOST_SH} extract-mtype.sh > ${.OBJDIR}/extracted-mtype.h
clean:
rm -f extracted-errno.h extracted-mfield.h extracted-mtype.h
.include <minix.bootprog.mk>