https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100293
Tom de Vries <vries at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vries at gcc dot gnu.org --- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> --- If I do: ... $ cat conftest.c int main () { return 0; } ... and copy the corresponding command from libatomic/config.log, and add -v -Wl,-v, I get: ... /home/vries/oacc/trunk/build-gcc-offload-nvptx-none/./gcc/collect2 -L/home/vries/oacc/trunk/build-gcc-offload-nvptx-none/./gcc -L/home/vries/oacc/trunk/build-gcc-offload-nvptx-none/nvptx-none/newlib -L/home/vries/oacc/trunk/install/offload-nvptx-none/nvptx-none/lib -L/home/vries/oacc/trunk/install/offload-nvptx-none/nvptx-none/usr/lib /tmp/ccQ2YOg0.o -v -lgcc -lg -lc -lgcc collect2 version 12.0.0 20210420 (experimental) /home/vries/oacc/trunk/build-gcc-offload-nvptx-none/./gcc/collect-ld -L/home/vries/oacc/trunk/build-gcc-offload-nvptx-none/./gcc -L/home/vries/oacc/trunk/build-gcc-offload-nvptx-none/nvptx-none/newlib -L/home/vries/oacc/trunk/install/offload-nvptx-none/nvptx-none/lib -L/home/vries/oacc/trunk/install/offload-nvptx-none/nvptx-none/usr/lib /tmp/ccQ2YOg0.o -v -lgcc -lg -lc -lgcc Linking /tmp/ccQ2YOg0.o as 0 trying lib libc.a trying lib libg.a trying lib libgcc.a ... Looking into collect-ld, it has: ... ORIGINAL_LD_FOR_TARGET="/home/vries/oacc/trunk/install/offload-nvptx-none/nvptx-none/bin/ld" ... which is a link to nvptx-none-ld: ... $ /home/vries/oacc/trunk/install/offload-nvptx-none/nvptx-none/bin/ld --help Usage: nvptx-none-ld [option...] [files] Options: -o FILE Write output to FILE -v Be verbose -l LIBRARY Link with LIBRARY -L DIR Search for libraries in DIR --help Print this help and exit --version Print version number and exit Report bugs to <https://github.com/MentorEmbedded/nvptx-tools/issues>. ... Can you do the same: create conftest.c, copy command from config.log, add -Wl,-v -v. Then do you see collect-ld being called? If so, does collect-ld have the correct linker hardcoded in there?