* Charles Wilson wrote on Fri, Aug 06, 2010 at 02:47:59PM CEST: > On 8/6/2010 1:19 AM, Ralf Wildenhues wrote: > > Wrt. lib and lib32, lib64, can we find out all files GCC needs by asking > > it several -print-* questions? Plus maybe optimistically searching for > > libc and ld*.so? > > Well, if the test is skipped for $build=w32, maybe we can rely on ldd? > That is, use the system compiler to build a hello world all, use ldd to > figure out what libs it is linked to, and where they come from?
Sounds like a good idea, and not a big limitation. Note that there are non-binutils ldd tools out there (Solaris, IRIX, Tru64) where output differs at least in the amount of whitespace and possibly additional empty lines; and AIX ldd may print things like: $ ldd /bin/ls /bin/ls needs: /usr/lib/libc.a(shr.o) /unix /usr/lib/libcrypt.a(shr.o) and BSD ldd prepends "$prog:\n" etc.; in case of doubt looking at gnulib/m4/ldd.m4 (or just ignoring all tools that don't look like GNU; or just using the gnulib ldd.m4; however you like) helps. Thanks, Ralf