aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2017-01-08 11:38:23 -0200
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2017-02-17 18:06:29 -0200
commit3b33d6ed6096c1d20d05a650b06026d673f7399a (patch)
treeaaca20724918d38903fe3ffe780fd17a9de3b9eb /ChangeLog
parentUse index_cpu_RTM and reg_RTM to clear the bit_cpu_RTM bit (diff)
downloadglibc-3b33d6ed6096c1d20d05a650b06026d673f7399a.tar.gz
glibc-3b33d6ed6096c1d20d05a650b06026d673f7399a.tar.bz2
glibc-3b33d6ed6096c1d20d05a650b06026d673f7399a.zip
Rework -fno-omit-frame-pointer support on i386
Commit 6b1df8b27f fixed the -OS build issue on i386 (BZ#20729) by expliciting disabling frame pointer (-fomit-frame-pointer) on the faulty objects. Although it does fix the issue, it is a subpar workaround that adds complexity in build process (a rule for each object to add the required compiler option and pontentially more rules for objects that call {INLINE,INTERNAL}_SYSCALL) and does not allow the implementations to get all the possible debug/calltrack information possible (used mainly in debuggers and performance measurement tools). This patch fixes it by adding an explicit configure check to see if -fno-omit-frame-pointer is set and to act accordingly (set or not OPTIMIZE_FOR_GCC_5). The make rules is simplified and only one is required: to add libc-do-syscall on loader due mmap (which will be empty anyway for default build with -fomit-frame-pointer). Checked on i386-linux-gnu with GCC 6.2.1 with CFLAGS sets as '-Os', '-O2 -fno-omit-frame-pointer', and '-O2 -fomit-frame-pointer'. For '-Os' the testsuite issues described by BZ#19463 and BZ#15105 still applied. It fixes BZ #21029, although it is marked as duplicated of #20729 (I reopened to track this cleanup). [BZ #21029] * config.h.in [CAN_USE_REGISTER_ASM_EBP]: New define. * sysdeps/unix/sysv/linux/i386/Makefile [$(subdir) = elf] (sysdep-dl-routines): Add libc-do-syscall. (uses-6-syscall-arguments): Remove. [$(subdir) = misc] (CFLAGS-epoll_pwait.o): Likewise. [$(subdir) = misc] (CFLAGS-epoll_pwait.os): Likewise. [$(subdir) = misc] (CFLAGS-mmap.o): Likewise. [$(subdir) = misc] (CFLAGS-mmap.os): Likewise. [$(subdir) = misc] (CFLAGS-mmap64.o): Likewise. [$(subdir) = misc] (CFLAGS-mmap64.os): Likewise. [$(subdir) = misc] (CFLAGS-pselect.o): Likewise. [$(subdir) = misc] (cflags-pselect.o): Likewise. [$(subdir) = misc] (cflags-pselect.os): Likewise. [$(subdir) = misc] (cflags-rtld-mmap.os): Likewise. [$(subdir) = sysvipc] (cflags-semtimedop.o): Likewise. [$(subdir) = sysvipc] (cflags-semtimedop.os): Likewise. [$(subdir) = io] (CFLAGS-posix_fadvise64.o): Likewise. [$(subdir) = io] (CFLAGS-posix_fadvise64.os): Likewise. [$(subdir) = io] (CFLAGS-posix_fallocate.o): Likewise. [$(subdir) = io] (CFLAGS-posix_fallocate.os): Likewise. [$(subdir) = io] (CFLAGS-posix_fallocate64.o): Likewise. [$(subdir) = io] (CFLAGS-posix_fallocate64.os): Likewise. [$(subdir) = io] (CFLAGS-sync_file_range.o): Likewise. [$(subdir) = io] (CFLAGS-sync_file_range.os): Likewise. [$(subdir) = io] (CFLAGS-fallocate.o): Likewise. [$(subdir) = io] (CFLAGS-fallocate.os): Likewise. [$(subdir) = io] (CFLAGS-fallocate64.o): Likewise. [$(subdir) = io] (CFLAGS-fallocate64.os): Likewise. [$(subdir) = nptl] (CFLAGS-pthread_rwlock_timedrdlock.o): Likewise. [$(subdir) = nptl] (CFLAGS-pthread_rwlock_timedrdlock.os): Likewise. [$(subdir) = nptl] (CFLAGS-pthread_rwlock_timedrwlock.o): Likewise. [$(subdir) = nptl] (CFLAGS-pthread_rwlock_timedrwlock.os): Likewise. [$(subdir) = nptl] (CFLAGS-sem_wait.o): Likewise. [$(subdir) = nptl] (CFLAGS-sem_wait.os): Likewise. [$(subdir) = nptl] (CFLAGS-sem_timedwait.o): Likewise. [$(subdir) = nptl] (CFLAGS-sem_timedwait.os): Likewise. * sysdeps/unix/sysv/linux/i386/configure.ac: Add check if compiler allows ebp on inline assembly. * sysdeps/unix/sysv/linux/i386/configure: Regenerate. * sysdeps/unix/sysv/linux/i386/sysdep.h (OPTIMIZE_FOR_GCC_5): Set if CAN_USE_REGISTER_ASM_EBP is set. (check_consistency): Likewise.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog49
1 files changed, 49 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c846949c94..842d5765ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,52 @@
+2017-01-17 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+
+ [BZ #21029]
+ * config.h.in [CAN_USE_REGISTER_ASM_EBP]: New define.
+ * sysdeps/unix/sysv/linux/i386/Makefile
+ [$(subdir) = elf] (sysdep-dl-routines): Add libc-do-syscall.
+ (uses-6-syscall-arguments): Remove.
+ [$(subdir) = misc] (CFLAGS-epoll_pwait.o): Likewise.
+ [$(subdir) = misc] (CFLAGS-epoll_pwait.os): Likewise.
+ [$(subdir) = misc] (CFLAGS-mmap.o): Likewise.
+ [$(subdir) = misc] (CFLAGS-mmap.os): Likewise.
+ [$(subdir) = misc] (CFLAGS-mmap64.o): Likewise.
+ [$(subdir) = misc] (CFLAGS-mmap64.os): Likewise.
+ [$(subdir) = misc] (CFLAGS-pselect.o): Likewise.
+ [$(subdir) = misc] (cflags-pselect.o): Likewise.
+ [$(subdir) = misc] (cflags-pselect.os): Likewise.
+ [$(subdir) = misc] (cflags-rtld-mmap.os): Likewise.
+ [$(subdir) = sysvipc] (cflags-semtimedop.o): Likewise.
+ [$(subdir) = sysvipc] (cflags-semtimedop.os): Likewise.
+ [$(subdir) = io] (CFLAGS-posix_fadvise64.o): Likewise.
+ [$(subdir) = io] (CFLAGS-posix_fadvise64.os): Likewise.
+ [$(subdir) = io] (CFLAGS-posix_fallocate.o): Likewise.
+ [$(subdir) = io] (CFLAGS-posix_fallocate.os): Likewise.
+ [$(subdir) = io] (CFLAGS-posix_fallocate64.o): Likewise.
+ [$(subdir) = io] (CFLAGS-posix_fallocate64.os): Likewise.
+ [$(subdir) = io] (CFLAGS-sync_file_range.o): Likewise.
+ [$(subdir) = io] (CFLAGS-sync_file_range.os): Likewise.
+ [$(subdir) = io] (CFLAGS-fallocate.o): Likewise.
+ [$(subdir) = io] (CFLAGS-fallocate.os): Likewise.
+ [$(subdir) = io] (CFLAGS-fallocate64.o): Likewise.
+ [$(subdir) = io] (CFLAGS-fallocate64.os): Likewise.
+ [$(subdir) = nptl] (CFLAGS-pthread_rwlock_timedrdlock.o):
+ Likewise.
+ [$(subdir) = nptl] (CFLAGS-pthread_rwlock_timedrdlock.os):
+ Likewise.
+ [$(subdir) = nptl] (CFLAGS-pthread_rwlock_timedrwlock.o):
+ Likewise.
+ [$(subdir) = nptl] (CFLAGS-pthread_rwlock_timedrwlock.os):
+ Likewise.
+ [$(subdir) = nptl] (CFLAGS-sem_wait.o): Likewise.
+ [$(subdir) = nptl] (CFLAGS-sem_wait.os): Likewise.
+ [$(subdir) = nptl] (CFLAGS-sem_timedwait.o): Likewise.
+ [$(subdir) = nptl] (CFLAGS-sem_timedwait.os): Likewise.
+ * sysdeps/unix/sysv/linux/i386/configure.ac: Add check if compiler allows
+ ebp on inline assembly.
+ * sysdeps/unix/sysv/linux/i386/configure: Regenerate.
+ * sysdeps/unix/sysv/linux/i386/sysdep.h (OPTIMIZE_FOR_GCC_5):
+ Set if CAN_USE_REGISTER_ASM_EBP is set.
+
2017-02-17 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/x86/cpu-features.c (init_cpu_features): Use