aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-04-06 06:02:11 -0700
committerAndreas K. Hüttel <dilfridge@gentoo.org>2020-04-10 14:29:37 +0300
commite367e3a5e0e3e83bced89867102bbd95f2ca289a (patch)
tree334a572d06d7de13e133c254be012edb6c10197e
parentsparc: Move sigreturn stub to assembly (diff)
downloadglibc-gentoo/2.30.tar.gz
glibc-gentoo/2.30.tar.bz2
glibc-gentoo/2.30.zip
i386: Disable check_consistency for GCC 5 and above [BZ #25788]gentoo/glibc-2.30-10gentoo/2.30
check_consistency should be disabled for GCC 5 and above since there is no fixed PIC register in GCC 5 and above. Check __GNUC_PREREQ (5,0) instead OPTIMIZE_FOR_GCC_5 since OPTIMIZE_FOR_GCC_5 is false with -fno-omit-frame-pointer. (cherry picked from commit f90a7e96df87edadd503a0a32aa70fb97c55a044) Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
index 0be10744ff..86f02fa729 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -615,8 +615,9 @@ struct libc_do_syscall_args
# define EXTRAVAR_5
#endif
-/* Consistency check for position-independent code. */
-#if defined __PIC__ && !defined OPTIMIZE_FOR_GCC_5
+/* 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__ \