summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2008-02-02 07:52:24 +0000
committerimp <imp@FreeBSD.org>2008-02-02 07:52:24 +0000
commit5c71f02efc21c1c1ab56b88f7d7ac74775bd7350 (patch)
tree546cf3a16e71ab9aafe8f9bf354d316510e936f1
parent2c8230f498bfc28ed59a140e3031a78c7dbda32e (diff)
downloadFreeBSD-src-5c71f02efc21c1c1ab56b88f7d7ac74775bd7350.zip
FreeBSD-src-5c71f02efc21c1c1ab56b88f7d7ac74775bd7350.tar.gz
Some platforms that are currently under development have to cope with
a variety of bootloaders. This sometimes means that different loader scripts are required within one ${MACHINE_ARCH}, which makes the current practice of using ldscript.${MACHINE_ARCH} unsuitable. Instead, make the default the current convention and allow the ld scripts to be overridden as necessary.
-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