Makes the linker generate a correct i386 gap.o file.
ok kettenis@, deraadt@
-# $OpenBSD: Makefile.i386,v 1.120 2017/11/04 16:04:16 florian Exp $
+# $OpenBSD: Makefile.i386,v 1.121 2018/01/25 14:09:52 mpi Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
.if ${MACHINE} == "amd64"
CFLAGS+= -m32
AFLAGS+= -m32
-LINKFLAGS+= -melf_i386_obsd
+LDFLAGS= -melf_i386_obsd
+LINKFLAGS+= ${LDFLAGS}
.endif
HOSTCC?= ${CC}
makegap.sh:
cp $S/conf/makegap.sh $@
-MAKE_GAP = LD="${LD}" sh makegap.sh 0xcccccccc
+MAKE_GAP = LD="${LD}" LDFLAGS="${LDFLAGS}" sh makegap.sh 0xcccccccc
gap.o: Makefile makegap.sh vers.o
${MAKE_GAP}
}
__EOF__
-$LD -r gap.link $GAPDUMMY -o gap.o
+$LD $LDFLAGS -r gap.link $GAPDUMMY -o gap.o