Changeset View
Changeset View
Standalone View
Standalone View
sys/conf/kmod.mk
Show First 20 Lines • Show All 204 Lines • ▼ Show 20 Lines | ${OBJCOPY} --strip-debug --add-gnu-debuglink=${PROG}.debug \ | ||||
${FULLPROG} ${.TARGET} | ${FULLPROG} ${.TARGET} | ||||
${PROG}.debug: ${FULLPROG} | ${PROG}.debug: ${FULLPROG} | ||||
${OBJCOPY} --only-keep-debug ${FULLPROG} ${.TARGET} | ${OBJCOPY} --only-keep-debug ${FULLPROG} ${.TARGET} | ||||
.endif | .endif | ||||
.if ${__KLD_SHARED} == yes | .if ${__KLD_SHARED} == yes | ||||
${FULLPROG}: ${KMOD}.kld | ${FULLPROG}: ${KMOD}.kld | ||||
.if ${MACHINE_CPUARCH} != "aarch64" | .if ${MACHINE_CPUARCH} != "aarch64" | ||||
${LD} -Bshareable ${_LDFLAGS} -o ${.TARGET} ${KMOD}.kld | ${LD} -m ${LD_EMULATION} -Bshareable ${_LDFLAGS} -o ${.TARGET} \ | ||||
${KMOD}.kld | |||||
.else | .else | ||||
#XXXKIB Relocatable linking in aarch64 ld from binutils 2.25.1 does | #XXXKIB Relocatable linking in aarch64 ld from binutils 2.25.1 does | ||||
# not work. The linker corrupts the references to the external | # not work. The linker corrupts the references to the external | ||||
# symbols which are defined by other object in the linking set | # symbols which are defined by other object in the linking set | ||||
# and should therefore loose the GOT entry. The problem seems | # and should therefore loose the GOT entry. The problem seems | ||||
# to be fixed in the binutils-gdb git HEAD as of 2015-10-04. Hack | # to be fixed in the binutils-gdb git HEAD as of 2015-10-04. Hack | ||||
# below allows to get partially functioning modules for now. | # below allows to get partially functioning modules for now. | ||||
${LD} -Bshareable ${_LDFLAGS} -o ${.TARGET} ${OBJS} | ${LD} -m ${LD_EMULATION} -Bshareable ${_LDFLAGS} -o ${.TARGET} ${OBJS} | ||||
.endif | .endif | ||||
.if !defined(DEBUG_FLAGS) | .if !defined(DEBUG_FLAGS) | ||||
${OBJCOPY} --strip-debug ${.TARGET} | ${OBJCOPY} --strip-debug ${.TARGET} | ||||
.endif | .endif | ||||
.endif | .endif | ||||
EXPORT_SYMS?= NO | EXPORT_SYMS?= NO | ||||
.if ${EXPORT_SYMS} != YES | .if ${EXPORT_SYMS} != YES | ||||
CLEANFILES+= export_syms | CLEANFILES+= export_syms | ||||
.endif | .endif | ||||
.if ${__KLD_SHARED} == yes | .if ${__KLD_SHARED} == yes | ||||
${KMOD}.kld: ${OBJS} | ${KMOD}.kld: ${OBJS} | ||||
.else | .else | ||||
${FULLPROG}: ${OBJS} | ${FULLPROG}: ${OBJS} | ||||
.endif | .endif | ||||
${LD} ${_LDFLAGS} -r -d -o ${.TARGET} ${OBJS} | ${LD} -m ${LD_EMULATION} ${_LDFLAGS} -r -d -o ${.TARGET} ${OBJS} | ||||
.if ${MK_CTF} != "no" | .if ${MK_CTF} != "no" | ||||
${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} | ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} | ||||
.endif | .endif | ||||
.if defined(EXPORT_SYMS) | .if defined(EXPORT_SYMS) | ||||
.if ${EXPORT_SYMS} != YES | .if ${EXPORT_SYMS} != YES | ||||
.if ${EXPORT_SYMS} == NO | .if ${EXPORT_SYMS} == NO | ||||
:> export_syms | :> export_syms | ||||
.elif !exists(${.CURDIR}/${EXPORT_SYMS}) | .elif !exists(${.CURDIR}/${EXPORT_SYMS}) | ||||
▲ Show 20 Lines • Show All 239 Lines • Show Last 20 Lines |