summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2018-10-16 16:39:19 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2018-10-16 16:39:19 +0000
commite00f5cef38b31196b38d75ba293f048140c876b8 (patch)
tree7e169d5d49c9fa28e4174a753653de17efc4bf9e /sys
parentffee34aab2767e188ee69eeea70b181e643b415b (diff)
Add gapdummy logic (already used on other archs) to allow linking with lld.
ok jsg@ phessler@ kettenis@ deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/conf/Makefile.amd6412
-rw-r--r--sys/arch/i386/conf/Makefile.i38612
2 files changed, 16 insertions, 8 deletions
diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64
index e7a3f45ca58..2afdae5472c 100644
--- a/sys/arch/amd64/conf/Makefile.amd64
+++ b/sys/arch/amd64/conf/Makefile.amd64
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.amd64,v 1.104 2018/09/12 04:34:59 jsg Exp $
+# $OpenBSD: Makefile.amd64,v 1.105 2018/10/16 16:39:18 naddy Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -134,12 +134,16 @@ locore.o: assym.h
ld.script: ${_machdir}/conf/ld.script
cp ${_machdir}/conf/ld.script $@
+gapdummy.o:
+ echo 'const char gapdummy;' > gapdummy.c
+ ${CC} -c ${CFLAGS} ${CPPFLAGS} gapdummy.c -o $@
+
makegap.sh:
cp $S/conf/makegap.sh $@
-MAKE_GAP = LD="${LD}" sh makegap.sh 0xcccccccc
+MAKE_GAP = LD="${LD}" sh makegap.sh 0xcccccccc gapdummy.o
-gap.o: Makefile makegap.sh vers.o
+gap.o: Makefile makegap.sh gapdummy.o vers.o
${MAKE_GAP}
vers.o: ${SYSTEM_DEP:Ngap.o}
@@ -153,7 +157,7 @@ kcov.o: $S/dev/kcov.c
clean:
rm -f *bsd *bsd.gdb *.[dio] [a-z]*.s assym.* \
- gap.link ld.script lorder makegap.sh param.c
+ gap.link gapdummy.c ld.script lorder makegap.sh param.c
cleandir: clean
rm -f Makefile *.h ioconf.c options machine ${_mach} vers.c
diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386
index f6d7a0fc416..7ba008c2b37 100644
--- a/sys/arch/i386/conf/Makefile.i386
+++ b/sys/arch/i386/conf/Makefile.i386
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.i386,v 1.127 2018/09/12 04:34:59 jsg Exp $
+# $OpenBSD: Makefile.i386,v 1.128 2018/10/16 16:39:18 naddy Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -130,12 +130,16 @@ ioconf.o: ioconf.c
ld.script: ${_machdir}/conf/ld.script
cp ${_machdir}/conf/ld.script $@
+gapdummy.o:
+ echo 'const char gapdummy;' > gapdummy.c
+ ${CC} -c ${CFLAGS} ${CPPFLAGS} gapdummy.c -o $@
+
makegap.sh:
cp $S/conf/makegap.sh $@
-MAKE_GAP = LD="${LD}" LDFLAGS="${LDFLAGS}" sh makegap.sh 0xcccccccc
+MAKE_GAP = LD="${LD}" LDFLAGS="${LDFLAGS}" sh makegap.sh 0xcccccccc gapdummy.o
-gap.o: Makefile makegap.sh vers.o
+gap.o: Makefile makegap.sh gapdummy.o vers.o
${MAKE_GAP}
vers.o: ${SYSTEM_DEP:Ngap.o}
@@ -149,7 +153,7 @@ kcov.o: $S/dev/kcov.c
clean:
rm -f *bsd *bsd.gdb *.[dio] [a-z]*.s assym.* \
- gap.link ld.script lorder makegap.sh param.c
+ gap.link gapdummy.c ld.script lorder makegap.sh param.c
cleandir: clean
rm -f Makefile *.h ioconf.c options machine ${_mach} vers.c