I've ok'd this type of diff from visa@ before. This piece is worth
doing.
However there are further problems to be resolved in this area, it is
not sufficient for all the problems. lld/binutils have a pile of
problems in this area.
Also, please don't send diffs which fix only one architecture, but
require fixes on all architectures.
>quite certain i won't come up w/anything better than what i have now,
>can't get over my loathe towards Makefiles&co..
>
>So, given above, i guess this is just for the archives, but if anyone is
>up for fixing it for real, you'll have my thanks. :)
>-Artturi
>
>
>diff --git a/sys/conf/makegap.sh b/sys/conf/makegap.sh
>index e104163fb48..4142c1e0dd0 100644
>--- a/sys/conf/makegap.sh
>+++ b/sys/conf/makegap.sh
>@@ -68,4 +68,4 @@ SECTIONS {
> }
> __EOF__
>
>-ld -r gap.link $GAPDUMMY -o gap.o
>+${LD} -r gap.link $GAPDUMMY -o gap.o
>diff --git a/sys/arch/amd64/conf/Makefile.amd64
>b/sys/arch/amd64/conf/Makefile.amd64
>index 9234ad69f20..711f58da7e9 100644
>--- a/sys/arch/amd64/conf/Makefile.amd64
>+++ b/sys/arch/amd64/conf/Makefile.amd64
>@@ -128,7 +128,7 @@ makegap.sh:
> cp $S/conf/makegap.sh $@
>
> gap.o: Makefile makegap.sh
>- sh makegap.sh 0xcccccccc
>+ LD=${LD} sh makegap.sh 0xcccccccc
>
> vers.o: ${SYSTEM_DEP:Ngap.o}
> sh $S/conf/newvers.sh
>diff --git a/sys/arch/armv7/conf/Makefile.armv7
>b/sys/arch/armv7/conf/Makefile.armv7
>index 3d874f06593..677424a8298 100644
>--- a/sys/arch/armv7/conf/Makefile.armv7
>+++ b/sys/arch/armv7/conf/Makefile.armv7
>@@ -130,7 +130,7 @@ makegap.sh:
> cp $S/conf/makegap.sh $@
>
> gap.o: Makefile makegap.sh gapdummy.o
>- sh makegap.sh 0xffffffff gapdummy.o
>+ LD=${LD} sh makegap.sh 0xffffffff gapdummy.o
>
> vers.o: ${SYSTEM_DEP:Ngap.o}
> sh $S/conf/newvers.sh
>
>