summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/conf/kern.pre.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index 5aabf31..925c7cd 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -12,6 +12,8 @@ SRCCONF?= /etc/src.conf
KERNEL_KO?= kernel
KERNEL?= kernel
KODIR?= /boot/${KERNEL}
+LDSCRIPT_NAME?= ldscript.$M
+LDSCRIPT?= $S/conf/${LDSCRIPT_NAME}
M= ${MACHINE_ARCH}
@@ -132,12 +134,12 @@ SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS}
SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o}
SYSTEM_OBJS+= hack.So
-SYSTEM_LD= @${LD} -Bdynamic -T $S/conf/ldscript.$M \
+SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} \
-warn-common -export-dynamic -dynamic-linker /red/herring \
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \
${SIZE} ${.TARGET} ; chmod 755 ${.TARGET}
-SYSTEM_DEP+= $S/conf/ldscript.$M
+SYSTEM_DEP+= ${LDSCRIPT}
# MKMODULESENV is set here so that port makefiles can augment
# them.
OpenPOWER on IntegriCloud