On Wed, 2020-08-12 at 16:53 +0100, Jonathan Wakely wrote: > On Wed, 12 Aug 2020 at 14:33, Paul Smith <p...@mad-scientist.net> > wrote: > > > I'm not talking about PREFIX/lib, though. As can be seen from my > > question I'm talking about PREFIX/<vendor>/<triplet>/lib. This is > > where GCC keeps its own internal libraries, > > Not by default, it isn't. I'm not sure what directory that is, but > none of my builds have it. > > Is this a cross-compiler? Mine have PREFIX/<triplet>/lib instead, and > it's not empty (for a 64-bit --disable-multlib build)
Sorry, you're right, the <vendor> above is part of the PREFIX I provided; my mistake. The path is indeed PREFIX/<triplet>/lib. However, the lib directory is empty in my build. What lives in your version of lib? $ cd <PREFIX> $ ls -1 bin/ include/ lib/ lib64/ libexec/ share/ x86_64-unknown-linux-gnu/ $ ls -1 x86_64-unknown-linux-gnu/ bin/ include/ lib/ lib64/ $ ls -1 x86_64-unknown-linux-gnu/lib/ $ I am invoking configure like this (with some flags etc. removed for simplicity): .../gcc-10.2.0/configure \ --prefix=<prefix> --with-local-prefix=<prefix> \ --target=x86_64-unknown-linux-gnu --with-sysroot=<sysroot> \ --enable-languages=c,c++ --disable-nls --disable-werror \ --disable-multilib --disable-libgomp --disable-libvtv \ --disable-libstdcxx-dual-abi --with-build-config=bootstrap-lto \ --enable-bootstrap --with-gnu-as --with-gnu-ld --enable-gold so yes, it's a "cross compiler" because I'm setting --target even though the target is really the same architecture. I want to ensure that the entire build both of GCC, and also the binaries built with this GCC, uses only the sysroot and not any local content. Maybe that's overkill, I dunno... it works! :)