Changeset View
Changeset View
Standalone View
Standalone View
head/sys/conf/kern.pre.mk
Show First 20 Lines • Show All 189 Lines • ▼ Show 20 Lines | |||||
OFED_C= ${OFED_C_NOIMP} ${.IMPSRC} | OFED_C= ${OFED_C_NOIMP} ${.IMPSRC} | ||||
GEN_CFILES= $S/$M/$M/genassym.c ${MFILES:T:S/.m$/.c/} | GEN_CFILES= $S/$M/$M/genassym.c ${MFILES:T:S/.m$/.c/} | ||||
SYSTEM_CFILES= config.c env.c hints.c vnode_if.c | SYSTEM_CFILES= config.c env.c hints.c vnode_if.c | ||||
SYSTEM_DEP= Makefile ${SYSTEM_OBJS} | SYSTEM_DEP= Makefile ${SYSTEM_OBJS} | ||||
SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS} | SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS} | ||||
SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o} | SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o} | ||||
SYSTEM_OBJS+= hack.So | SYSTEM_OBJS+= hack.So | ||||
MD_ROOT_SIZE_CONFIGURED!= grep MD_ROOT_SIZE opt_md.h || true ; echo | |||||
.if ${MFS_IMAGE:Uno} != "no" | .if ${MFS_IMAGE:Uno} != "no" | ||||
.if empty(MD_ROOT_SIZE_CONFIGURED) | |||||
SYSTEM_OBJS+= embedfs_${MFS_IMAGE:T:R}.o | SYSTEM_OBJS+= embedfs_${MFS_IMAGE:T:R}.o | ||||
.endif | .endif | ||||
.endif | |||||
SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} ${_LDFLAGS} --no-warn-mismatch \ | SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} ${_LDFLAGS} --no-warn-mismatch \ | ||||
--warn-common --export-dynamic --dynamic-linker /red/herring \ | --warn-common --export-dynamic --dynamic-linker /red/herring \ | ||||
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o | -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o | ||||
SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \ | SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \ | ||||
${SIZE} ${.TARGET} ; chmod 755 ${.TARGET} | ${SIZE} ${.TARGET} ; chmod 755 ${.TARGET} | ||||
SYSTEM_DEP+= ${LDSCRIPT} | SYSTEM_DEP+= ${LDSCRIPT} | ||||
# Calculate path for .m files early, if needed. | # Calculate path for .m files early, if needed. | ||||
Show All 16 Lines | |||||
.endif | .endif | ||||
.if defined(DEBUG) | .if defined(DEBUG) | ||||
MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" | MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" | ||||
.endif | .endif | ||||
MKMODULESENV+= __MPATH="${__MPATH}" | MKMODULESENV+= __MPATH="${__MPATH}" | ||||
# Architecture and output format arguments for objdump to convert image to | # Architecture and output format arguments for objdump to convert image to | ||||
# object file | # object file | ||||
.if ${MFS_IMAGE:Uno} != "no" | |||||
.if ${MFS_IMAGE:Uno} != "no" | |||||
.if empty(MD_ROOT_SIZE_CONFIGURED) | |||||
.if !defined(EMBEDFS_FORMAT.${MACHINE_ARCH}) | .if !defined(EMBEDFS_FORMAT.${MACHINE_ARCH}) | ||||
EMBEDFS_FORMAT.${MACHINE_ARCH}!= awk -F'"' '/OUTPUT_FORMAT/ {print $$2}' ${LDSCRIPT} | EMBEDFS_FORMAT.${MACHINE_ARCH}!= awk -F'"' '/OUTPUT_FORMAT/ {print $$2}' ${LDSCRIPT} | ||||
.if empty(EMBEDFS_FORMAT.${MACHINE_ARCH}) | .if empty(EMBEDFS_FORMAT.${MACHINE_ARCH}) | ||||
.undef EMBEDFS_FORMAT.${MACHINE_ARCH} | .undef EMBEDFS_FORMAT.${MACHINE_ARCH} | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.if !defined(EMBEDFS_ARCH.${MACHINE_ARCH}) | .if !defined(EMBEDFS_ARCH.${MACHINE_ARCH}) | ||||
EMBEDFS_ARCH.${MACHINE_ARCH}!= sed -n '/OUTPUT_ARCH/s/.*(\(.*\)).*/\1/p' ${LDSCRIPT} | EMBEDFS_ARCH.${MACHINE_ARCH}!= sed -n '/OUTPUT_ARCH/s/.*(\(.*\)).*/\1/p' ${LDSCRIPT} | ||||
.if empty(EMBEDFS_ARCH.${MACHINE_ARCH}) | .if empty(EMBEDFS_ARCH.${MACHINE_ARCH}) | ||||
.undef EMBEDFS_ARCH.${MACHINE_ARCH} | .undef EMBEDFS_ARCH.${MACHINE_ARCH} | ||||
.endif | .endif | ||||
.endif | .endif | ||||
EMBEDFS_FORMAT.arm?= elf32-littlearm | EMBEDFS_FORMAT.arm?= elf32-littlearm | ||||
EMBEDFS_FORMAT.armv6?= elf32-littlearm | EMBEDFS_FORMAT.armv6?= elf32-littlearm | ||||
EMBEDFS_FORMAT.mips?= elf32-tradbigmips | EMBEDFS_FORMAT.mips?= elf32-tradbigmips | ||||
EMBEDFS_FORMAT.mipsel?= elf32-tradlittlemips | EMBEDFS_FORMAT.mipsel?= elf32-tradlittlemips | ||||
EMBEDFS_FORMAT.mips64?= elf64-tradbigmips | EMBEDFS_FORMAT.mips64?= elf64-tradbigmips | ||||
EMBEDFS_FORMAT.mips64el?= elf64-tradlittlemips | EMBEDFS_FORMAT.mips64el?= elf64-tradlittlemips | ||||
EMBEDFS_FORMAT.riscv?= elf64-littleriscv | EMBEDFS_FORMAT.riscv?= elf64-littleriscv | ||||
.endif | |||||
.endif | .endif | ||||
# Detect kernel config options that force stack frames to be turned on. | # Detect kernel config options that force stack frames to be turned on. | ||||
DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo | DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo | ||||
DTR_ENABLED!= grep KDTRACE_FRAME opt_kdtrace.h || true ; echo | DTR_ENABLED!= grep KDTRACE_FRAME opt_kdtrace.h || true ; echo | ||||
HWPMC_ENABLED!= grep HWPMC opt_hwpmc_hooks.h || true ; echo | HWPMC_ENABLED!= grep HWPMC opt_hwpmc_hooks.h || true ; echo |