summaryrefslogtreecommitdiff
path: root/sysdeps/i386/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/Makefile')
-rw-r--r--sysdeps/i386/Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
index 52faaa3109..e192b91dbd 100644
--- a/sysdeps/i386/Makefile
+++ b/sysdeps/i386/Makefile
@@ -8,7 +8,7 @@ long-double-fcts = yes
ifeq ($(subdir),csu)
# On i686 we must avoid generating the trampoline functions generated
# to get the GOT pointer.
-CFLAGS-initfini.s += -march=i386 -mcpu=i386
+CFLAGS-initfini.s += -march=i386 -mtune=i386
endif
ifeq ($(subdir),gmon)
@@ -61,3 +61,15 @@ CFLAGS-dlopenold.c += -mpreferred-stack-boundary=4
CFLAGS-dlclose.c += -mpreferred-stack-boundary=4
CFLAGS-dlerror.c += -mpreferred-stack-boundary=4
endif
+
+ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS)))
+defines += -DNO_TLS_DIRECT_SEG_REFS
+else
+# .a libraries are not performance critical and so we
+# build them without direct TLS segment references
+# always.
+CPPFLAGS-.o += -DNO_TLS_DIRECT_SEG_REFS
+CFLAGS-.o += -mno-tls-direct-seg-refs
+CPPFLAGS-.oS += -DNO_TLS_DIRECT_SEG_REFS
+CFLAGS-.oS += -mno-tls-direct-seg-refs
+endif