diff options
author | 2018-10-16 16:39:18 +0000 | |
---|---|---|
committer | 2018-10-16 16:39:18 +0000 | |
commit | d48a038337785fe59d3ae327400a9d06f00f5493 (patch) | |
tree | 70145c41c25bc3f89e863af73a9f5e41809d923a | |
parent | document FETCH_PACKAGES as well (diff) | |
download | wireguard-openbsd-d48a038337785fe59d3ae327400a9d06f00f5493.tar.xz wireguard-openbsd-d48a038337785fe59d3ae327400a9d06f00f5493.zip |
Add gapdummy logic (already used on other archs) to allow linking with lld.
ok jsg@ phessler@ kettenis@ deraadt@
-rw-r--r-- | sys/arch/amd64/conf/Makefile.amd64 | 12 | ||||
-rw-r--r-- | sys/arch/i386/conf/Makefile.i386 | 12 |
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 |