aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/i386/tls-macros.h8
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/sysdeps/i386/tls-macros.h b/sysdeps/i386/tls-macros.h
index 0b85738..053cba0 100644
--- a/sysdeps/i386/tls-macros.h
+++ b/sysdeps/i386/tls-macros.h
@@ -1,3 +1,5 @@
+#include <features.h> /* For __GNUC_PREREQ. */
+
#define TLS_LE(x) \
({ int *__l; \
asm ("movl %%gs:0,%0\n\t" \
@@ -5,7 +7,7 @@
: "=r" (__l)); \
__l; })
-#ifdef PIC
+#if defined PIC && !__GNUC_PREREQ (5,0)
# define TLS_IE(x) \
({ int *__l; \
asm ("movl %%gs:0,%0\n\t" \
@@ -27,7 +29,7 @@
__l; })
#endif
-#ifdef PIC
+#if defined PIC && !__GNUC_PREREQ (5,0)
# define TLS_LD(x) \
({ int *__l, __c, __d; \
asm ("leal " #x "@tlsldm(%%ebx),%%eax\n\t" \
@@ -51,7 +53,7 @@
__l; })
#endif
-#ifdef PIC
+#if defined PIC && !__GNUC_PREREQ (5,0)
# define TLS_GD(x) \
({ int *__l, __c, __d; \
asm ("leal " #x "@tlsgd(%%ebx),%%eax\n\t" \
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
index d751c58..b574418 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -502,7 +502,7 @@ asm (".L__X'%ebx = 1\n\t"
#endif
/* Consistency check for position-independent code. */
-#ifdef __PIC__
+#if defined __PIC__ && !__GNUC_PREREQ (5,0)
# define check_consistency() \
({ int __res; \
__asm__ __volatile__ \