Annotation of src/sys/rump/Makefile.rump, Revision 1.6.6.3
1.6.6.1 mjf 1: # $NetBSD$
1.1 pooka 2: #
3:
4: WARNS?= 4
1.6.6.2 mjf 5: NOLINT= # kernel code
1.1 pooka 6:
1.6.6.3 ! mjf 7: .include <bsd.own.mk>
! 8:
! 9: # use kernel ABI instead of rump ABI (needs md code)
! 10: .ifndef(RUMPKMOD)
1.6.6.2 mjf 11: CPPFLAGS:= -I${RUMPTOP}/include ${CPPFLAGS}
1.6.6.3 ! mjf 12: .endif
! 13:
! 14: CFLAGS+= -ffreestanding -fno-strict-aliasing
! 15: CPPFLAGS+= -D_RUMPKERNEL # XXX: this should die
! 16: CPPFLAGS+= -D_KERNEL -DMULTIPROCESSOR -D_MODULE -DMODULAR
! 17: CPPFLAGS+= -DMAXUSERS=32
! 18: CPPFLAGS+= -DDIAGNOSTIC
! 19: CPPFLAGS+= -I${.CURDIR} -I.
! 20: CPPFLAGS+= -I${RUMPTOP}/../../common/include -I${RUMPTOP}/../arch
! 21: CPPFLAGS+= -I${RUMPTOP}/include
! 22: CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern/opt
1.6.6.2 mjf 23: CPPFLAGS+= -nostdinc -I${RUMPTOP}/..
24: #CPPFLAGS+= -DDEBUG
1.1 pooka 25:
1.6.6.2 mjf 26: RUMPKERNEL= This is NetBSD and I am the rump. Good evening.
1.4 pooka 27:
1.6.6.3 ! mjf 28: # workaround: evbppc is not a well-defined arch
! 29: .if (${MACHINE} == "evbppc")
! 30: CPPFLAGS+= -DPPC_OEA
! 31: .endif
! 32:
! 33: # If this file changes, we need a full rebuild
! 34: DPSRCS+= ${RUMPTOP}/Makefile.rump
! 35:
! 36: #
! 37: # Rename library symbols before use. If a symbol does not already belong
! 38: # to a rump namespace ("rump" or "RUMP"), prefix it with "rumpns". This
! 39: # avoids accidentally linking any kernel symbol against host platform
! 40: # libraries. The only non-renamed symbols are linkset delimiters and
! 41: # the GOT, which are more a property of the compiler than the kernel.
! 42: #
! 43: # Some toolchains generate unresolved symbols which are supposed to be
! 44: # satisfied by the toolchain itself when the program is linked.
! 45: # Unfortunately, we do not know which of the symbols are generated by
! 46: # the toolchain. Worse, they vary from platform to platform and
! 47: # toolchain to toolchain. The good news, however, is that this will
! 48: # be detected by a compile-time failure, so we can fairly easily manage
! 49: # a quirktable here.
! 50: .if ${MACHINE_CPU} == "mips"
! 51: _SYMQUIRK='|_gp_disp'
! 52: .elif ${MACHINE_CPU} == "hppa"
! 53: _SYMQUIRK='|\$$\$$'
! 54: .endif
! 55: __archivebuild: .USE
! 56: ${_MKTARGET_BUILD}
! 57: rm -f ${.TARGET}
! 58: ${AR} cq ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
! 59: ${NM} -go ${.TARGET} | ${TOOL_AWK} ' \
! 60: $$NF!~/^(rump|RUMP|__|_GLOBAL_OFFSET_TABLE'${_SYMQUIRK}')/ \
! 61: {printf "%s rumpns_%s\n", $$NF, $$NF}' \
! 62: | sort | uniq > renametab.${.TARGET}
! 63: ${OBJCOPY} --redefine-syms renametab.${.TARGET} ${.TARGET}
! 64: rm -f renametab.${.TARGET}
! 65: ${RANLIB} ${.TARGET}
CVSweb <webmaster@jp.NetBSD.org>