diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-08-30 04:37:35 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-08-30 04:37:35 +0000 |
commit | 99ddd2cd7bcfabaafb1b0ed06b915d1bd30412a9 (patch) | |
tree | b93f802d45221012417caab5a78c0099894e2206 | |
parent | 4f110eab804beca747435b9b7b0c117814e0ac8d (diff) | |
download | uClibc-alpine-99ddd2cd7bcfabaafb1b0ed06b915d1bd30412a9.tar.bz2 uClibc-alpine-99ddd2cd7bcfabaafb1b0ed06b915d1bd30412a9.tar.xz |
Add in checking the capability of gcc to use TLS if the NPTL thread model is being enabled. I know someone is going to try to compile NPTL with tools that don't support TLS. Hopefully this will trim down idiot questions.
-rw-r--r-- | Rules.mak | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -331,6 +331,27 @@ endif PTCOBJST := $(TOPDIR)libc/obj-pthread-libc PTCOBJSH := $(TOPDIR)libc/obj-pthread-libc_shared +# +# Test for TLS if NPTL support was selected. +# +ifeq ($(PTHREADS_NATIVE),y) +GCC_HAS_TLS=$(shell \ + echo "extern __thread int foo;" | $(CC) -o /dev/null -S -xc - 2>&1) +ifneq ($(GCC_HAS_TLS),) +gcc_tls_test_fail: + @echo "####"; + @echo "#### Your compiler does not support TLS and you are trying to build uClibc"; + @echo "#### with NPTL support. Upgrade your binutils and gcc to versions which"; + @echo "#### support TLS for your architecture. Do not contact uClibc maintainers"; + @echo "#### about this problem."; + @echo "####"; + @echo "#### Exiting..."; + @echo "####"; + @exit 1; +endif +endif + + ifeq ($(UCLIBC_BUILD_RELRO),y) LDFLAGS+=-z relro endif |