This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/21029] glibc-2.23 (and later) fails to compile with -fno-omit-frame-pointer on i386


https://sourceware.org/bugzilla/show_bug.cgi?id=21029

--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  3b33d6ed6096c1d20d05a650b06026d673f7399a (commit)
      from  52ac22365a332cacf7aa97f1b41b3a0adfaff778 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3b33d6ed6096c1d20d05a650b06026d673f7399a

commit 3b33d6ed6096c1d20d05a650b06026d673f7399a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Sun Jan 8 11:38:23 2017 -0200

    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.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                 |   49 +++++++++++++++++++++++++++++
 config.h.in                               |    4 ++
 sysdeps/unix/sysv/linux/i386/Makefile     |   39 +----------------------
 sysdeps/unix/sysv/linux/i386/configure    |   39 +++++++++++++++++++++++
 sysdeps/unix/sysv/linux/i386/configure.ac |   17 ++++++++++
 sysdeps/unix/sysv/linux/i386/sysdep.h     |    6 ++--
 6 files changed, 113 insertions(+), 41 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]