summaryrefslogtreecommitdiff
path: root/Rules.mak
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2005-10-06 04:03:47 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2005-10-06 04:03:47 +0000
commita648743558a3316884c16b238009754a30527803 (patch)
tree63c08fddfd6327a877d46dbf6beed9aed4f21d05 /Rules.mak
parent2193796a36944a983c86a41c15ef8a9f059965a5 (diff)
Fix broken path for PTDIR which needed a '/' at the end to work. Also brought in the other stuff needed for NPTL. Erik, please cut me some slack again. The option is not in 'extra/Config/Config.in' so it cannot be activated. Besides, take a look at the check in tonight on the branch and the post on the mailing list.
Diffstat (limited to 'Rules.mak')
-rw-r--r--Rules.mak34
1 files changed, 31 insertions, 3 deletions
diff --git a/Rules.mak b/Rules.mak
index f70126e07..68cc43294 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -309,12 +309,40 @@ ifeq ($(strip $(UCLIBC_HAS_THREADS_NATIVE)),y)
else
PTNAME := linuxthreads
endif
-PTDIR := $(TOPDIR)libpthread/$(PTNAME)
+PTDIR := $(TOPDIR)libpthread/$(PTNAME)/
# set up system dependencies include dirs (NOTE: order matters!)
+ifeq ($(strip $(UCLIBC_HAS_THREADS_NATIVE)),y)
+PTINC := -I$(PTDIR)compat \
+ -I$(PTDIR)sysdeps/unix/sysv/linux/$(TARGET_ARCH) \
+ -I$(PTDIR)sysdeps/$(TARGET_ARCH) \
+ -I$(PTDIR)sysdeps/unix/sysv/linux \
+ -I$(PTDIR)sysdeps/pthread \
+ -I$(PTDIR)sysdeps/pthread/bits \
+ -I$(PTDIR)sysdeps/generic \
+ -include $(PTDIR)compat/libc-symbols.h
+#
+# Test for TLS if NPTL support was selected.
+#
+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
+else
# psm: the next 2 are probably incorrect, the generic header will
# win over the arch specific one
-PTINC := -I$(PTDIR)/sysdeps/pthread \
- -I$(PTDIR)/sysdeps/$(TARGET_ARCH)
+PTINC := -I$(PTDIR)sysdeps/pthread \
+ -I$(PTDIR)sysdeps/$(TARGET_ARCH)
+endif
endif
ifeq ($(UCLIBC_BUILD_RELRO),y)