Hi Joseph, hi Jakub, (a) For the driver route: On 10/15/20 12:22 AM, Joseph Myers wrote: > I think it should be somewhere in the expansion of %(link_gcc_c_sequence) > (i.e. LINK_GCC_C_SEQUENCE_SPEC, which has various target-specific > definitions), since that's what expands to something like -lgcc -lc -lgcc. > Maybe after the first -lgcc and before the -lc, since libatomic has > references to libc functions. Lightly tested draft patch attached. (--enable-autolink-libatomic is 'no' by default) Does this make sense, in principle? When trying the patch, one runs into the problem that -latomic fails in the target configure for libgomp ("error: C compiler cannot create executables"). Any suggestion? (That's on x86_64-gnu-linux.) (b) I start thinking that putting it into libgomp.spec – possibly with the new configure --enable... flag and/or only for nvptx (which uses libatomic via ../libgomp/config/nvptx/atomic.c) – is the better solution. Thoughts? Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter