]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
i386: Remove build support for GCC older than GCC 6
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 7 Apr 2020 13:44:37 +0000 (06:44 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 7 Apr 2020 13:44:37 +0000 (06:44 -0700)
Since GCC 6.2 or later is required to build glibc, remove build support
for GCC older than GCC 6.

Testd with GCC 6.4 and GCC 9.3.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
sysdeps/i386/sysdep.h
sysdeps/i386/tls-macros.h
sysdeps/unix/sysv/linux/i386/sysdep.h

index 6094af8fec912c345afc225070cf17ffc0fe1975..2f786a251bc10fef333ebd58ab8f8d9c00e204db 100644 (file)
@@ -18,8 +18,6 @@
 
 #include <sysdeps/x86/sysdep.h>
 
-#include <features.h> /* For __GNUC_PREREQ.  */
-
 /* It is desirable that the names of PIC thunks match those used by
    GCC so that multiple copies are eliminated by the linker.  Because
    GCC 4.6 and earlier use __i686 in the names, it is necessary to
index 053cba05d1694fb7ba87ddbb8c2e822ad92edfae..9c1303dc459cb0888a5ef190e4d78c5ba74e96aa 100644 (file)
@@ -1,5 +1,3 @@
-#include <features.h> /* For __GNUC_PREREQ.  */
-
 #define TLS_LE(x) \
   ({ int *__l;                                                               \
      asm ("movl %%gs:0,%0\n\t"                                               \
@@ -7,15 +5,7 @@
          : "=r" (__l));                                                      \
      __l; })
 
-#if defined PIC && !__GNUC_PREREQ (5,0)
-# define TLS_IE(x) \
-  ({ int *__l;                                                               \
-     asm ("movl %%gs:0,%0\n\t"                                               \
-         "subl " #x "@gottpoff(%%ebx),%0"                                    \
-         : "=r" (__l));                                                      \
-     __l; })
-#else
-# define TLS_IE(x) \
+#define TLS_IE(x) \
   ({ int *__l, __b;                                                          \
      asm ("call 1f\n\t"                                                              \
          ".subsection 1\n"                                                   \
          "subl " #x "@gottpoff(%%ebx),%0"                                    \
          : "=r" (__l), "=&b" (__b));                                         \
      __l; })
-#endif
 
-#if defined PIC && !__GNUC_PREREQ (5,0)
-# define TLS_LD(x) \
-  ({ int *__l, __c, __d;                                                     \
-     asm ("leal " #x "@tlsldm(%%ebx),%%eax\n\t"                                      \
-         "call ___tls_get_addr@plt\n\t"                                      \
-         "leal " #x "@dtpoff(%%eax), %%eax"                                  \
-         : "=a" (__l), "=&c" (__c), "=&d" (__d));                            \
-     __l; })
-#else
-# define TLS_LD(x) \
+#define TLS_LD(x) \
   ({ int *__l, __b, __c, __d;                                                \
      asm ("call 1f\n\t"                                                              \
          ".subsection 1\n"                                                   \
          "leal " #x "@dtpoff(%%eax), %%eax"                                  \
          : "=a" (__l), "=&b" (__b), "=&c" (__c), "=&d" (__d));               \
      __l; })
-#endif
 
-#if defined PIC && !__GNUC_PREREQ (5,0)
-# define TLS_GD(x) \
-  ({ int *__l, __c, __d;                                                     \
-     asm ("leal " #x "@tlsgd(%%ebx),%%eax\n\t"                               \
-         "call ___tls_get_addr@plt\n\t"                                      \
-         "nop"                                                               \
-         : "=a" (__l), "=&c" (__c), "=&d" (__d));                            \
-     __l; })
-#else
-# define TLS_GD(x) \
+#define TLS_GD(x) \
   ({ int *__l, __b, __c, __d;                                                \
      asm ("call 1f\n\t"                                                              \
          ".subsection 1\n"                                                   \
@@ -75,4 +45,3 @@
          "nop"                                                               \
          : "=a" (__l), "=&b" (__b), "=&c" (__c), "=&d" (__d));               \
      __l; })
-#endif
index 6671afe65ef192baab8dca5d9fc4d4017ec10d47..f6847a67e382017859425025daa439d19bc019ee 100644 (file)
@@ -48,7 +48,7 @@
    to compile glibc.  Disable GCC 5 optimization when compiling for
    profiling or when -fno-omit-frame-pointer is used since asm ("ebp")
    can't be used to put the 6th argument in %ebp for syscall.  */
-#if __GNUC_PREREQ (5,0) && !defined PROF && CAN_USE_REGISTER_ASM_EBP
+#if !defined PROF && CAN_USE_REGISTER_ASM_EBP
 # define OPTIMIZE_FOR_GCC_5
 #endif
 
@@ -580,21 +580,6 @@ struct libc_do_syscall_args
 # define EXTRAVAR_5
 #endif
 
-/* Consistency check for position-independent code.  Disabled for GCC 5
-   and above since there is no fixed PIC register in GCC 5 and above.  */
-#if defined __PIC__ && !__GNUC_PREREQ (5,0)
-# define check_consistency()                                                 \
-  ({ int __res;                                                                      \
-     __asm__ __volatile__                                                    \
-       (LOAD_PIC_REG_STR (cx) ";"                                            \
-       "subl %%ebx, %%ecx;"                                                  \
-       "je 1f;"                                                              \
-       "ud2;"                                                                \
-       "1:\n"                                                                \
-       : "=c" (__res));                                                      \
-     __res; })
-#endif
-
 #endif /* __ASSEMBLER__ */