0e8e3df5ff
1) invoke objcopy with --preserve-dates or it will update all the dates in the .a file to the present date. 2) add an invocation of ar-as-ranlib or the object file index ends up with the date in it. (it might also end up with an incorrect index.)
67 lines
2.3 KiB
Makefile
67 lines
2.3 KiB
Makefile
# $NetBSD: Makefile.rump,v 1.36 2009/04/01 17:51:12 perry Exp $
|
|
#
|
|
|
|
WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet
|
|
NOLINT= # kernel code
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
# use kernel ABI instead of rump ABI (needs md code)
|
|
.ifndef RUMPKMOD
|
|
CPPFLAGS:= -I${RUMPTOP}/include ${CPPFLAGS}
|
|
.endif
|
|
|
|
CFLAGS+= -ffreestanding -fno-strict-aliasing
|
|
CPPFLAGS+= -D_RUMPKERNEL
|
|
CPPFLAGS+= -D_KERNEL -DMULTIPROCESSOR -D_MODULE -DMODULAR
|
|
CPPFLAGS+= -DMAXUSERS=32
|
|
CPPFLAGS+= -DDIAGNOSTIC
|
|
CPPFLAGS+= -DCOMPAT_50
|
|
CPPFLAGS+= -I${.CURDIR} -I.
|
|
CPPFLAGS+= -I${RUMPTOP}/../../common/include -I${RUMPTOP}/../arch
|
|
CPPFLAGS+= -I${RUMPTOP}/include
|
|
CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern/opt
|
|
CPPFLAGS+= -nostdinc -I${RUMPTOP}/..
|
|
#CPPFLAGS+= -DDEBUG
|
|
|
|
RUMPKERNEL= This is NetBSD and I am the rump. Good evening.
|
|
|
|
# workaround: evbppc is not a well-defined arch
|
|
.if (${MACHINE} == "evbppc")
|
|
CPPFLAGS+= -DPPC_OEA
|
|
.endif
|
|
|
|
# If this file changes, we need a full rebuild
|
|
DPSRCS+= ${RUMPTOP}/Makefile.rump
|
|
|
|
#
|
|
# Rename library symbols before use. If a symbol does not already belong
|
|
# to a rump namespace ("rump" or "RUMP"), prefix it with "rumpns". This
|
|
# avoids accidentally linking any kernel symbol against host platform
|
|
# libraries. The only non-renamed symbols are linkset delimiters and
|
|
# the GOT, which are more a property of the compiler than the kernel.
|
|
#
|
|
# Some toolchains generate unresolved symbols which are supposed to be
|
|
# satisfied by the toolchain itself when the program is linked.
|
|
# Unfortunately, we do not know which of the symbols are generated by
|
|
# the toolchain. Worse, they vary from platform to platform and
|
|
# toolchain to toolchain. The good news, however, is that this will
|
|
# be detected by a compile-time failure, so we can fairly easily manage
|
|
# a quirktable here.
|
|
.if ${MACHINE_CPU} == "mips"
|
|
_SYMQUIRK='|_gp_disp'
|
|
.elif ${MACHINE_CPU} == "hppa"
|
|
_SYMQUIRK='|\$$\$$'
|
|
.endif
|
|
__archivebuild: .USE
|
|
${_MKTARGET_BUILD}
|
|
rm -f ${.TARGET}
|
|
${AR} ${_ARFL} ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
|
|
${NM} -go ${.TARGET} | ${TOOL_AWK} ' \
|
|
$$NF!~/^(rump|RUMP|__|_GLOBAL_OFFSET_TABLE'${_SYMQUIRK}')/ \
|
|
{printf "%s rumpns_%s\n", $$NF, $$NF}' \
|
|
| sort | uniq > renametab.${.TARGET}
|
|
${OBJCOPY} --preserve-dates --redefine-syms renametab.${.TARGET} ${.TARGET}
|
|
rm -f renametab.${.TARGET}
|
|
${AR} ${_ARRANFL} ${.TARGET}
|