Subject: make build into empty destdir possibly broken
To: None <current-users@netbsd.org>
From: Tim Rightnour <root@garbled.net>
List: current-users
Date: 04/09/2000 11:57:29
I've been trying to get my crosscompiler running again, which suddenly blasted
itself recently.. and now I think I know why..

bsd.prog.mk 1.111:
        ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET}
        -nostdlib -L${DESTDIR}/usr/lib
-R${DESTDIR}/usr/lib
        ${LIBCRT0} ${LIBCRTBEGIN} ${OBJS} ${LDADD}
        -lgcc -lc -lgcc ${LIBCRTEND}

building profiled c library
/build/alpha/tools/usr/bin/ranlib libc_p.a
building shared object c library
/build/alpha/tools/usr/bin/ranlib libc_pic.a
make: don't know how to make /build/alpha/root/usr/lib/crtbeginS.o. Stop
giauzar# 

The old bsd.prog.mk did soemthing like the following:
/build/prep/tools/usr/bin/ranlib libc_pic.a
building shared c library (version 12.58)
/build/prep/tools/usr/bin/ld -nostdlib -x -shared -soname libc.so.12 -o libc.so.
12.58  /build/prep/root/usr/lib/crtbeginS.o  --whole-archive libc_pic.a  -L/buil
d/prep/root/usr/lib -R/usr/lib  --no-whole-archive   /build/prep/root/usr/lib/cr
tendS.o

So now.. it would appear.. that because it does the -R${DESTDIR}/usr/lib, its
looing for crtbeginS.o in /build/alpha/root/usr/lib/ and blwing up when it
doesn't find it there.  Of course, this file doesn't arrive there until the
make install stage from what I can tell..  so the fix for this isn't obvious to
me.

---
Tim Rightnour <root@garbled.net>
NetBSD: Free multi-architecture OS http://www.netbsd.org/
NetBSD Mailing lists on the web: http://mail-index.netbsd.org/