summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-11-18 01:17:38 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-11-18 01:17:38 +0000
commitd219bd78432b35acf206f963198b3ee8381dca44 (patch)
tree8fb1d2392ea88e10fcc0616d6f591140f2524d95
parent15c2dd2768cab5e369a3264da0ee5847bbc29f1b (diff)
(except for the arm architectures...) unify the way the ld.script is
used and depended, mimicking new changes by guenther to amd64.
-rw-r--r--sys/arch/alpha/conf/Makefile.alpha7
-rw-r--r--sys/arch/aviion/conf/Makefile.aviion8
-rw-r--r--sys/arch/hppa/conf/Makefile.hppa8
-rw-r--r--sys/arch/hppa64/conf/Makefile.hppa648
-rw-r--r--sys/arch/loongson/conf/Makefile.loongson8
-rw-r--r--sys/arch/luna88k/conf/Makefile.luna88k8
-rw-r--r--sys/arch/octeon/conf/Makefile.octeon8
-rw-r--r--sys/arch/sgi/conf/Makefile.sgi8
-rw-r--r--sys/arch/solbourne/conf/Makefile.solbourne8
-rw-r--r--sys/arch/sparc/conf/Makefile.sparc7
-rw-r--r--sys/arch/sparc64/conf/Makefile.sparc647
11 files changed, 44 insertions, 41 deletions
diff --git a/sys/arch/alpha/conf/Makefile.alpha b/sys/arch/alpha/conf/Makefile.alpha
index 18d6e04f27f..74280e9202b 100644
--- a/sys/arch/alpha/conf/Makefile.alpha
+++ b/sys/arch/alpha/conf/Makefile.alpha
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.alpha,v 1.84 2014/10/04 18:10:14 brad Exp $
+# $OpenBSD: Makefile.alpha,v 1.85 2014/11/18 01:17:36 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -38,7 +38,8 @@ CMACHFLAGS+= -fno-stack-protector
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
-LINKFLAGS= -T ${_machdir}/conf/ld.script -X -N -G 4 --warn-common -nopie
+LDSCRIPT= ${_machdir}/conf/ld.script
+LINKFLAGS= -T ${LDSCRIPT} -X -N -G 4 --warn-common -nopie
.if ${IDENT:M-DDDB_STRUCT}
DB_STRUCTINFO= db_structinfo.h
@@ -68,7 +69,7 @@ NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_HEAD= locore.o param.o ioconf.o
SYSTEM_OBJ= ${SYSTEM_HEAD} ${OBJS}
-SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
+SYSTEM_DEP= Makefile ${SYSTEM_OBJ} ${LDSCRIPT}
SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS}
diff --git a/sys/arch/aviion/conf/Makefile.aviion b/sys/arch/aviion/conf/Makefile.aviion
index 04d9a56ccd8..8d6fbbfa5ed 100644
--- a/sys/arch/aviion/conf/Makefile.aviion
+++ b/sys/arch/aviion/conf/Makefile.aviion
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.aviion,v 1.48 2014/10/04 18:10:14 brad Exp $
+# $OpenBSD: Makefile.aviion,v 1.49 2014/11/18 01:17:36 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -38,8 +38,8 @@ CMACHFLAGS+= -fno-stack-protector
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
-LINKFLAGS= -T ${_machdir}/conf/ld.script \
- -Ttext 0x80000 -e __start -X -N --warn-common -nopie
+LDSCRIPT= ${_machdir}/conf/ld.script
+LINKFLAGS= -T ${LDSCRIPT} -Ttext 0x80000 -e __start -X -N --warn-common -nopie
.if ${IDENT:M-DDDB_STRUCT}
DB_STRUCTINFO= db_structinfo.h
@@ -73,7 +73,7 @@ PROFILE_C= ${CC} -S -c ${CFLAGS} ${CPPFLAGS} $<; \
# ${SYSTEM_LD_TAIL}
SYSTEM_HEAD= locore.o param.o ioconf.o
SYSTEM_OBJ= ${SYSTEM_HEAD} ${OBJS}
-SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
+SYSTEM_DEP= Makefile ${SYSTEM_OBJ} ${LDSCRIPT}
SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS}
diff --git a/sys/arch/hppa/conf/Makefile.hppa b/sys/arch/hppa/conf/Makefile.hppa
index 420332ee849..184904a7020 100644
--- a/sys/arch/hppa/conf/Makefile.hppa
+++ b/sys/arch/hppa/conf/Makefile.hppa
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.hppa,v 1.77 2014/10/04 18:10:14 brad Exp $
+# $OpenBSD: Makefile.hppa,v 1.78 2014/11/18 01:17:36 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -36,8 +36,8 @@ CMACHFLAGS+= -fno-stack-protector
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
-LINKFLAGS= -X -T ${_machdir}/conf/ld.script -Ttext 80000 --warn-common \
- -nopie
+LDSCRIPT= ${_machdir}/conf/ld.script
+LINKFLAGS= -X -T ${LDSCRIPT} -Ttext 80000 --warn-common -nopie
.if ${IDENT:M-DDDB} != ""
CFLAGS+= -fno-omit-frame-pointer
@@ -79,7 +79,7 @@ NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_HEAD= locore.o param.o ioconf.o
SYSTEM_OBJ= ${SYSTEM_HEAD} ${OBJS}
-SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
+SYSTEM_DEP= Makefile ${SYSTEM_OBJ} ${LDSCRIPT}
SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS}
diff --git a/sys/arch/hppa64/conf/Makefile.hppa64 b/sys/arch/hppa64/conf/Makefile.hppa64
index 2a76409f1ba..355e5290850 100644
--- a/sys/arch/hppa64/conf/Makefile.hppa64
+++ b/sys/arch/hppa64/conf/Makefile.hppa64
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.hppa64,v 1.49 2014/10/04 18:10:14 brad Exp $
+# $OpenBSD: Makefile.hppa64,v 1.50 2014/11/18 01:17:36 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -36,8 +36,8 @@ CMACHFLAGS+= -fno-stack-protector
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
-LINKFLAGS= -X -T ${_machdir}/conf/ld.script -Ttext 80000 --warn-common \
- -nopie
+LDSCRIPT= ${_machdir}/conf/ld.script
+LINKFLAGS= -X -T ${LDSCRIPT} -Ttext 80000 --warn-common -nopie
.if ${IDENT:M-DDDB} != ""
CFLAGS+= -fno-omit-frame-pointer
@@ -71,7 +71,7 @@ NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_HEAD= locore.o param.o ioconf.o
SYSTEM_OBJ= ${SYSTEM_HEAD} ${OBJS}
-SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
+SYSTEM_DEP= Makefile ${SYSTEM_OBJ} ${LDSCRIPT}
SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS}
diff --git a/sys/arch/loongson/conf/Makefile.loongson b/sys/arch/loongson/conf/Makefile.loongson
index 025cab3b0b4..b5a146ddb6d 100644
--- a/sys/arch/loongson/conf/Makefile.loongson
+++ b/sys/arch/loongson/conf/Makefile.loongson
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.loongson,v 1.42 2014/10/04 18:10:14 brad Exp $
+# $OpenBSD: Makefile.loongson,v 1.43 2014/11/18 01:17:37 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -45,8 +45,8 @@ CMACHFLAGS+= -fno-stack-protector
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
-LINKFLAGS= -e start -T ${_machdir}/conf/ld.script -Ttext=${LINK_ADDRESS} \
- -warn-common -nopie
+LDSCRIPT= ${_machdir}/conf/ld.script
+LINKFLAGS= -e start -T ${LDSCRIPT} -Ttext=${LINK_ADDRESS} -warn-common -nopie
.if ${IDENT:M-DDDB_STRUCT}
DB_STRUCTINFO= db_structinfo.h
@@ -76,7 +76,7 @@ NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_HEAD= locore.o param.o ioconf.o
SYSTEM_OBJ= ${SYSTEM_HEAD} ${OBJS}
-SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
+SYSTEM_DEP= Makefile ${SYSTEM_OBJ} ${LDSCRIPT}
SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS}
diff --git a/sys/arch/luna88k/conf/Makefile.luna88k b/sys/arch/luna88k/conf/Makefile.luna88k
index efad37232da..54f95b0c5db 100644
--- a/sys/arch/luna88k/conf/Makefile.luna88k
+++ b/sys/arch/luna88k/conf/Makefile.luna88k
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.luna88k,v 1.56 2014/10/04 18:10:14 brad Exp $
+# $OpenBSD: Makefile.luna88k,v 1.57 2014/11/18 01:17:37 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -38,8 +38,8 @@ CMACHFLAGS+= -fno-stack-protector
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
-LINKFLAGS= -T ${_machdir}/conf/ld.script \
- -Ttext 0x80000 -e __start -X -N --warn-common -nopie
+LDSCRIPT= ${_machdir}/conf/ld.script
+LINKFLAGS= -T ${LDSCRIPT} -Ttext 0x80000 -e __start -X -N --warn-common -nopie
.if ${IDENT:M-DDDB_STRUCT}
DB_STRUCTINFO= db_structinfo.h
@@ -73,7 +73,7 @@ PROFILE_C= ${CC} -S -c ${CFLAGS} ${CPPFLAGS} $<; \
# ${SYSTEM_LD_TAIL}
SYSTEM_HEAD= locore.o param.o ioconf.o
SYSTEM_OBJ= ${SYSTEM_HEAD} ${OBJS}
-SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
+SYSTEM_DEP= Makefile ${SYSTEM_OBJ} ${LDSCRIPT}
SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS}
diff --git a/sys/arch/octeon/conf/Makefile.octeon b/sys/arch/octeon/conf/Makefile.octeon
index 452cdff1bad..b0b27bb2d41 100644
--- a/sys/arch/octeon/conf/Makefile.octeon
+++ b/sys/arch/octeon/conf/Makefile.octeon
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.octeon,v 1.18 2014/10/04 18:10:14 brad Exp $
+# $OpenBSD: Makefile.octeon,v 1.19 2014/11/18 01:17:37 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -45,8 +45,8 @@ CMACHFLAGS+= -fno-stack-protector
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
-LINKFLAGS= -e start -T ${_machdir}/conf/ld.script -Ttext=${LINK_ADDRESS} \
- -nopie
+LDSCRIPT= ${_machdir}/conf/ld.script
+LINKFLAGS= -e start -T ${LDSCRIPT} -Ttext=${LINK_ADDRESS} -nopie
STRIPFLAGS= -g -x
.if ${IDENT:M-DDDB_STRUCT}
@@ -77,7 +77,7 @@ NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_HEAD= locore.o param.o ioconf.o
SYSTEM_OBJ= ${SYSTEM_HEAD} ${OBJS}
-SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
+SYSTEM_DEP= Makefile ${SYSTEM_OBJ} ${LDSCRIPT}
SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS}
diff --git a/sys/arch/sgi/conf/Makefile.sgi b/sys/arch/sgi/conf/Makefile.sgi
index d8f684b0305..4c2d8dc4c46 100644
--- a/sys/arch/sgi/conf/Makefile.sgi
+++ b/sys/arch/sgi/conf/Makefile.sgi
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.sgi,v 1.66 2014/10/04 18:10:14 brad Exp $
+# $OpenBSD: Makefile.sgi,v 1.67 2014/11/18 01:17:37 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -45,8 +45,8 @@ CMACHFLAGS+= -fno-stack-protector
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
-LINKFLAGS= -e start -T ${_machdir}/conf/ld.script -Ttext=${LINK_ADDRESS} \
- --warn-common -nopie
+LDSCRIPT= ${_machdir}/conf/ld.script
+LINKFLAGS= -e start -T ${LDSCRIPT} -Ttext=${LINK_ADDRESS} --warn-common -nopie
.if ${IDENT:M-DDDB_STRUCT}
DB_STRUCTINFO= db_structinfo.h
@@ -76,7 +76,7 @@ NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_HEAD= locore.o param.o ioconf.o
SYSTEM_OBJ= ${SYSTEM_HEAD} ${OBJS}
-SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
+SYSTEM_DEP= Makefile ${SYSTEM_OBJ} ${LDSCRIPT}
SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS}
diff --git a/sys/arch/solbourne/conf/Makefile.solbourne b/sys/arch/solbourne/conf/Makefile.solbourne
index d2eee945b9d..5f2ed6a424f 100644
--- a/sys/arch/solbourne/conf/Makefile.solbourne
+++ b/sys/arch/solbourne/conf/Makefile.solbourne
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.solbourne,v 1.44 2014/10/04 18:10:14 brad Exp $
+# $OpenBSD: Makefile.solbourne,v 1.45 2014/11/18 01:17:37 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -38,8 +38,8 @@ CMACHFLAGS+= -fno-stack-protector
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
-LINKFLAGS= -N -e start -T ${_machdir}/conf/ld.script -Ttext FD084000 \
- --warn-common -nopie
+LDSCRIPT= ${_machdir}/conf/ld.script
+LINKFLAGS= -N -e start -T ${LDSCRIPT} -Ttext FD084000 --warn-common -nopie
.if ${IDENT:M-DDDB_STRUCT}
DB_STRUCTINFO= db_structinfo.h
@@ -69,7 +69,7 @@ NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_HEAD= locore.o param.o ioconf.o
SYSTEM_OBJ= ${SYSTEM_HEAD} ${OBJS}
-SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
+SYSTEM_DEP= Makefile ${SYSTEM_OBJ} ${LDSCRIPT}
SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS}
diff --git a/sys/arch/sparc/conf/Makefile.sparc b/sys/arch/sparc/conf/Makefile.sparc
index 00dd53de7c1..0b468f00f00 100644
--- a/sys/arch/sparc/conf/Makefile.sparc
+++ b/sys/arch/sparc/conf/Makefile.sparc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.sparc,v 1.81 2014/10/04 18:10:14 brad Exp $
+# $OpenBSD: Makefile.sparc,v 1.82 2014/11/18 01:17:37 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -41,7 +41,8 @@ CMACHFLAGS+= -fno-stack-protector
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
-LINKFLAGS= -N -e start -T ${_machdir}/conf/ld.script --warn-common -nopie
+LDSCRIPT= ${_machdir}/conf/ld.script
+LINKFLAGS= -N -e start -T ${LDSCRIPT} --warn-common -nopie
.if ${IDENT:M-DDDB_STRUCT}
DB_STRUCTINFO= db_structinfo.h
@@ -71,7 +72,7 @@ NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_HEAD= locore.o param.o ioconf.o
SYSTEM_OBJ= ${SYSTEM_HEAD} ${OBJS}
-SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
+SYSTEM_DEP= Makefile ${SYSTEM_OBJ} ${LDSCRIPT}
SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS}
diff --git a/sys/arch/sparc64/conf/Makefile.sparc64 b/sys/arch/sparc64/conf/Makefile.sparc64
index d57f7dcfd27..7d68c034158 100644
--- a/sys/arch/sparc64/conf/Makefile.sparc64
+++ b/sys/arch/sparc64/conf/Makefile.sparc64
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.sparc64,v 1.69 2014/10/04 18:10:14 brad Exp $
+# $OpenBSD: Makefile.sparc64,v 1.70 2014/11/18 01:17:37 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -38,7 +38,8 @@ CMACHFLAGS+= -fno-stack-protector
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
-LINKFLAGS= -n -T ${_machdir}/conf/ld.script --warn-common -nopie
+LDSCRIPT= ${_machdir}/conf/ld.script
+LINKFLAGS= -n -T ${LDSCRIPT} --warn-common -nopie
.if ${IDENT:M-DDDB_STRUCT}
DB_STRUCTINFO= db_structinfo.h
@@ -68,7 +69,7 @@ NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_HEAD= locore.o param.o ioconf.o
SYSTEM_OBJ= ${SYSTEM_HEAD} ${OBJS}
-SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
+SYSTEM_DEP= Makefile ${SYSTEM_OBJ} ${LDSCRIPT}
SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS}