Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/conf Fix the build: provide compatibility with ports tha...
details: https://anonhg.NetBSD.org/src/rev/34486cea3c34
branches: trunk
changeset: 340143:34486cea3c34
user: christos <christos%NetBSD.org@localhost>
date: Mon Aug 24 18:02:55 2015 +0000
description:
Fix the build: provide compatibility with ports that define KERNLDSCRIPT to
a file?
diffstat:
sys/conf/Makefile.kern.inc | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (35 lines):
diff -r a919aef7544e -r 34486cea3c34 sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc Mon Aug 24 17:37:10 2015 +0000
+++ b/sys/conf/Makefile.kern.inc Mon Aug 24 18:02:55 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.kern.inc,v 1.188 2015/08/24 15:50:47 uebayasi Exp $
+# $NetBSD: Makefile.kern.inc,v 1.189 2015/08/24 18:02:55 christos Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -230,8 +230,12 @@
.endif
SYSTEM_DEP+= Makefile ${SYSTEM_OBJ} .gdbinit
.if defined(KERNLDSCRIPT)
+.if exists(${KERNLDSCRIPT})
+SYSTEM_DEP+= -T ${KERNLDSCRIPT}
+.else
SYSTEM_DEP+= ${.TARGET}.ldscript
.endif
+.endif
.if defined(CTFMERGE)
SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
.else
@@ -256,8 +260,12 @@
${k}.ldscript: ${KERNLDSCRIPT}
${CPP} ${KERNLDSCRIPT} | grep -v '^#' >$@
.endfor
+.if exists(${KERNLDSCRIPT})
+LINKSCRIPT= -T ${KERNLDSCRIPT}
+.else
LINKSCRIPT= -T ${.TARGET}.ldscript
.endif
+.endif
TEXTADDR?= ${LOADADDRESS} # backwards compatibility
LINKTEXT?= ${TEXTADDR:C/.+/-Ttext &/}
Home |
Main Index |
Thread Index |
Old Index