Control: tags -1 + moreinfo On 12.03.19 21:02, Eduard Bloch wrote: > Package: binutils-x86-64-linux-gnu > Version: 2.32-5 > Severity: normal > > Hi, > > I tried to optimize the build of apt-cacher-ng a little bit, and I found > that I have not used -Wl,threads with gold. So I "fixed" this and then > it started crashing. Apparently linking shared libraries works, but > executables segfaults. Tried with current sid (version 2.31, I think) > and experimental, same problem. > > While trying to reproduce, I run into the following (and not sure why > omiting -Wl,threads makes this go away, but something with -lug looks > fishy).
what is -Wl,threads supposed to do? Should be -Wl,--threads > (gdb) run -plugin /usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so -plug > Starting program: /usr/bin/ld.gold -plugin > /usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so -plug > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". > /usr/bin/ld.gold: error: cannot find -lug I suspect the run line is incomplete.