https://sourceware.org/bugzilla/show_bug.cgi?id=27206
--- Comment #6 from Tom Kacvinsky <tkacvins at gmail dot com> --- For compatibility reasons, I want to update my automated build machine, but build GCC and auxiliary support libraries in such a fashion that we can target older Linux distributions That is, build on a machine with a newer glibc, but still be able to run the resulting binaries on a system with an older glibc, which is reverse of building on an older system and running on a newer system. So, I first went to build GCC 8.3.0 on a newer system (CentOS 7) using a custom assembly file (one that contains a .symver for each older version symbol we want, to target older versions of glibc). That is injected into compiler generated assembly files via an indirect assembler - named as, which opens any .s/.S files on the command line, inserts the custom assembly file into them, then calls gas, the _real_ assembler. But libgcc.so.1 failed to build with the pthread_key_create error I mentioned in this bug. The reproducer I sent is a stripped down version of the code from libgcc. This is why I am somewhat concerned about the link map trick, etc... It would create many problems while trying to sort out the GCC build configuration and code. The code in GCC that utilizes pthread_key_create marks it as extern and weak, which is different from what is in pthread.h. And the reason for that, as commented in the libgcc code, is so that pthread_key_create is weak, which leads libggc.so.1 not having a run time dependency on libpthread.so.0. Tom -- You are receiving this mail because: You are on the CC list for the bug.