On Tue, 17 Mar 2020 13:23:28 -0400
George Koehler <kern...@gmail.com> wrote:

> clang -static -L.  -nopie -o instbin instbin.o dd.lo ...
> /usr/bin/ld: dd.lo(.text+0x14): R_PPC_PLTREL24 reloc against local symbol
> 
> ...
> 
> Passing -M to crunchgen(8), as we do on {longsoon,octeon,sgi}, might
> work around the problem, but I haven't tried it, and I don't know
> whether this is the only problem.

crunchgen -M worked and I got a bsd.rd from clang, while I had the
%L0 and noinline stuff in /sys.  (I didn't build a release.  I did
need to build a few other things before bsd.rd.)

Index: Makefile
===================================================================
RCS file: /cvs/src/distrib/macppc/ramdisk/Makefile,v
retrieving revision 1.46
diff -u -p -r1.46 Makefile
--- Makefile    3 May 2019 20:03:58 -0000       1.46
+++ Makefile    19 Mar 2020 03:12:47 -0000
@@ -55,7 +55,7 @@ mr.fs: instbin
        makefs ${MRMAKEFSARGS} $@ $@.d
 
 instbin.mk instbin.cache instbin.c: instbin.conf
-       crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib \
+       crunchgen -E -M -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib \
            -c instbin.c -e instbin -m instbin.mk instbin.conf
 
 instbin: instbin.mk instbin.cache instbin.c

Reply via email to