On 2021-03-11 10:01, Florian Weimer wrote:
* Oleg Smolsky via Gcc-help:
Clearly the new build is not quite the same as the old one... but
which one is correct for Linux/x86-64? And what controls this
variance? It looks like glibc does not have a flag to control TLS any
more...
You need to figure out why _GLIBCXX_HAVE_TLS was not detected at
configure time. See config/tls.m4. There is likely something in
config.log.
Thank you for the pointers, Florian and Jonathan!
I'm trying to figure out where the new build went awry. So far I have
these crumbs:
$ find . -name config.log | xargs grep _TLS
./gcc-build/x86_64-pc-linux-gnu/libgcc/config.log:set_have_cc_tls='-DHAVE_CC_TLS'
./gcc-build/gcc/config.log:configure:26862: checking assembler for
R_386_TLS_GD_PLT reloc
./gcc-build/gcc/config.log:configure:26904: checking assembler for
R_386_TLS_LDM_PLT reloc
./gcc-build/gcc/config.log:configure:26952: checking assembler for
R_386_TLS_LDM reloc
./gcc-build/gcc/config.log:| #define HAVE_AS_TLS 1
./gcc-build/gcc/config.log:| #define HAVE_AS_IX86_TLSLDMPLT 0
./gcc-build/gcc/config.log:| #define HAVE_AS_IX86_TLSLDM 0
./gcc-build/gcc/config.log:| #define HAVE_AS_IX86_TLS_GET_ADDR_GOT 0
./gcc-build/gcc/config.log:| #define HAVE_AS_TLS 1
./gcc-build/gcc/config.log:| #define HAVE_AS_IX86_TLSLDMPLT 0
./gcc-build/gcc/config.log:| #define HAVE_AS_IX86_TLSLDM 0
./gcc-build/gcc/config.log:| #define HAVE_AS_IX86_TLS_GET_ADDR_GOT 0
./gcc-build/gcc/config.log:#define HAVE_AS_TLS 1
./gcc-build/gcc/config.log:#define HAVE_AS_IX86_TLSLDMPLT 0
./gcc-build/gcc/config.log:#define HAVE_AS_IX86_TLSLDM 0
./gcc-build/gcc/config.log:#define HAVE_AS_IX86_TLS_GET_ADDR_GOT 0
and
$ find . -name config.log | xargs grep tls
./gcc-build/x86_64-pc-linux-gnu/libgomp/config.log:configure:16001:
checking whether the thread-local storage support is from emutls
./gcc-build/x86_64-pc-linux-gnu/libgomp/config.log:gcc_cv_have_tls=no
./gcc-build/x86_64-pc-linux-gnu/libgomp/config.log:gcc_cv_use_emutls=no
./gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/config.log:gcc_cv_have_tls=no
./gcc-build/x86_64-pc-linux-gnu/libgcc/config.log:configure:5460:
checking whether the thread-local storage support is from emutls
./gcc-build/x86_64-pc-linux-gnu/libgcc/config.log:gcc_cv_have_cc_tls=yes
./gcc-build/x86_64-pc-linux-gnu/libgcc/config.log:gcc_cv_use_emutls=no
./gcc-build/x86_64-pc-linux-gnu/libgcc/config.log:set_have_cc_tls='-DHAVE_CC_TLS'
./gcc-build/x86_64-pc-linux-gnu/libgcc/config.log:set_use_emutls=''
./gcc-build/x86_64-pc-linux-gnu/libgcc/config.log:tmake_file='
$(srcdir)/config/t-crtstuff-pic $(srcdir)/config/t-libgcc-pic
$(srcdir)/config/t-eh-dw2-dip $(srcdir)/config/t-slibgcc
$(srcdir)/config/t-slibgcc-gld $(srcdir)/config/t-slibgcc-elf-ver
$(srcdir)/config/t-linux $(srcdir)/config/i386/t-crtpc
$(srcdir)/config/t-crtfm $(srcdir)/config/i386/t-crtstuff
$(srcdir)/config/t-dfprules $(srcdir)/config/i386/t-cpuinfo
$(srcdir)/config/t-tls $(srcdir)/config/i386/t-linux
$(srcdir)/config/i386/t-msabi $(srcdir)/config/t-slibgcc-libgcc
$(srcdir)/config/t-stack $(srcdir)/config/i386/t-stack-i386
$(srcdir)/config/t-softfp-tf $(srcdir)/config/i386/t-softfp
$(srcdir)/config/t-softfp $(srcdir)/config/i386/64/t-softfp-compat'
./gcc-build/x86_64-pc-linux-gnu/libitm/config.log:gcc_cv_have_tls=no
./gcc-build/gcc/config.log:configure:27105: checking assembler for
calling ___tls_get_addr via GOT
./gcc-build/gcc/config.log:gcc_cv_as_ix86_tls_get_addr_via_got=no
That last one does an "as" check... Is that the trigger?
Thanks!
Oleg.