Changeset View
Changeset View
Standalone View
Standalone View
sys/conf/kern.post.mk
Show First 20 Lines • Show All 340 Lines • ▼ Show 20 Lines | |||||
.endif # !exists(${_depfile}) | .endif # !exists(${_depfile}) | ||||
.endfor | .endfor | ||||
.NOPATH: .depend ${DEPENDFILES} | .NOPATH: .depend ${DEPENDFILES} | ||||
.depend: .PRECIOUS ${SRCS} | .depend: .PRECIOUS ${SRCS} | ||||
_MAP_DEBUG_PREFIX= yes | _MAP_DEBUG_PREFIX= yes | ||||
.if ${MK_REPRODUCIBLE_BUILD} != "no" | |||||
_sysroot=${CC:M--sysroot=*:[-1]:S,--sysroot=,,} | |||||
_map_sysdir=${REPRODUCIBLE_SYSDIR} | |||||
CFLAGS+= -ffile-prefix-map=${_sysroot}/=/ | |||||
CFLAGS+= -ffile-prefix-map=${SYSDIR}=${_map_sysdir} | |||||
.if defined(REPRODUCIBLE_KOBJDIR) && \ | |||||
"${REPRODUCIBLE_KOBJDIR}" != "${.OBJDIR}" | |||||
CFLAGS+= -ffile-prefix-map=${.OBJDIR}=${REPRODUCIBLE_KOBJDIR} | |||||
.endif | |||||
.else | |||||
_map_sysdir=${SYSDIR} | |||||
.endif | |||||
_ILINKS= machine | _ILINKS= machine | ||||
.if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64" | .if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64" | ||||
_ILINKS+= ${MACHINE_CPUARCH} | _ILINKS+= ${MACHINE_CPUARCH} | ||||
.endif | .endif | ||||
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" | .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" | ||||
_ILINKS+= x86 | _ILINKS+= x86 | ||||
.endif | .endif | ||||
# Ensure that the link exists without depending on it when it exists. | # Ensure that the link exists without depending on it when it exists. | ||||
# Ensure that debug info references the path in the source tree. | # Ensure that debug info references the path in the source tree. | ||||
.for _link in ${_ILINKS} | .for _link in ${_ILINKS} | ||||
.if !exists(${.OBJDIR}/${_link}) | .if !exists(${.OBJDIR}/${_link}) | ||||
${SRCS} ${DEPENDOBJS}: ${_link} | ${SRCS} ${DEPENDOBJS}: ${_link} | ||||
.endif | .endif | ||||
.if defined(_MAP_DEBUG_PREFIX) | .if defined(_MAP_DEBUG_PREFIX) | ||||
.if ${_link} == "machine" | .if ${_link} == "machine" | ||||
CFLAGS+= -fdebug-prefix-map=./machine=${SYSDIR}/${MACHINE}/include | CFLAGS+= -ffile-prefix-map=./machine=${_map_sysdir}/${MACHINE}/include | ||||
.else | .else | ||||
CFLAGS+= -fdebug-prefix-map=./${_link}=${SYSDIR}/${_link}/include | CFLAGS+= -ffile-prefix-map=./${_link}=${_map_sysdir}/${_link}/include | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.endfor | .endfor | ||||
${_ILINKS}: | ${_ILINKS}: | ||||
@case ${.TARGET} in \ | @case ${.TARGET} in \ | ||||
machine) \ | machine) \ | ||||
path=${S}/${MACHINE}/include ;; \ | path=${S}/${MACHINE}/include ;; \ | ||||
▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines |