GNU C Library master sources branch master updated. glibc-2.22-445-g23c4baa

hjl@sourceware.org hjl@sourceware.org
Wed Oct 21 16:15:00 GMT 2015


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  23c4baa21484191be48a3335c8ab5e2f534a3799 (commit)
       via  d8f7fcacd728a18a9d5cef1cc4f81432278e27c8 (commit)
      from  0ad76d1ee7cc1be5277621e08f7dd66493de5ca1 (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 -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=23c4baa21484191be48a3335c8ab5e2f534a3799

commit 23c4baa21484191be48a3335c8ab5e2f534a3799
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Oct 21 09:07:46 2015 -0700

    Disable GCC 5 optimization when PROF is defined
    
    Since asm ("ebp") can't be used to put the 6th argument in %ebp for
    syscall when compiling for profiling, we disable GCC 5 optimization
    when PROF is defined.
    
    	* sysdeps/unix/sysv/linux/i386/sysdep.h (OPTIMIZE_FOR_GCC_5):
    	New.  Defined for GCC 5 and above when not compiling for
    	profiling.
    	Replace __GNUC_PREREQ (5,0) with OPTIMIZE_FOR_GCC_5.

diff --git a/ChangeLog b/ChangeLog
index 358e205..deab22f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2015-10-21  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* sysdeps/unix/sysv/linux/i386/sysdep.h (OPTIMIZE_FOR_GCC_5):
+	New.  Defined for GCC 5 and above when not compiling for
+	profiling.
+	Replace __GNUC_PREREQ (5,0) with OPTIMIZE_FOR_GCC_5.
+
 	* sysdeps/unix/sysv/linux/i386/Makefile (CFLAGS-epoll_pwait.c):
 	Renamed to ...
 	(CFLAGS-epoll_pwait.o): This.
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
index 76db7b8..5830544 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -229,9 +229,15 @@ extern int __syscall_error (int)
 
 /* Since GCC 5 and above can properly spill %ebx with PIC when needed,
    we can inline syscalls with 6 arguments if GCC 5 or above is used
-   to compile glibc.  */
+   to compile glibc.  Disable GCC 5 optimization when compiling for
+   profiling since asm ("ebp") can't be used to put the 6th argument
+   in %ebp for syscall.  */
 
-#if !__GNUC_PREREQ (5,0)
+#if __GNUC_PREREQ (5,0) && !defined PROF
+# define OPTIMIZE_FOR_GCC_5
+#endif
+
+#ifndef OPTIMIZE_FOR_GCC_5
 /* We need some help from the assembler to generate optimal code.  We
    define some macros here which later will be used.  */
 asm (".L__X'%ebx = 1\n\t"
@@ -328,7 +334,7 @@ struct libc_do_syscall_args
     INTERNAL_SYSCALL_MAIN_INLINE(name, err, 5, args)
 /* Each object using 6-argument inline syscalls must include a
    definition of __libc_do_syscall.  */
-#if __GNUC_PREREQ (5,0)
+#ifdef OPTIMIZE_FOR_GCC_5
 # define INTERNAL_SYSCALL_MAIN_6(name, err, args...) \
     INTERNAL_SYSCALL_MAIN_INLINE(name, err, 6, args)
 #else /* GCC 5  */
@@ -353,7 +359,7 @@ struct libc_do_syscall_args
     INTERNAL_SYSCALL_MAIN_##nr (name, err, args);			      \
     (int) resultvar; })
 #ifdef I386_USE_SYSENTER
-# if __GNUC_PREREQ (5,0)
+# ifdef OPTIMIZE_FOR_GCC_5
 #  ifdef SHARED
 #   define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \
     LOADREGS_##nr(args)							\
@@ -437,7 +443,7 @@ struct libc_do_syscall_args
 #  endif
 # endif /* GCC 5  */
 #else
-# if __GNUC_PREREQ (5,0)
+# ifdef OPTIMIZE_FOR_GCC_5
 #  define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \
     LOADREGS_##nr(args)							\
     asm volatile (							\
@@ -539,7 +545,7 @@ struct libc_do_syscall_args
 # define RESTOREARGS_5
 #endif
 
-#if __GNUC_PREREQ (5,0)
+#ifdef OPTIMIZE_FOR_GCC_5
 # define LOADREGS_0()
 # define ASMARGS_0()
 # define LOADREGS_1(arg1) \
@@ -606,7 +612,7 @@ struct libc_do_syscall_args
 #endif
 
 /* Consistency check for position-independent code.  */
-#if defined __PIC__ && !__GNUC_PREREQ (5,0)
+#if defined __PIC__ && !defined OPTIMIZE_FOR_GCC_5
 # define check_consistency()						      \
   ({ int __res;								      \
      __asm__ __volatile__						      \

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d8f7fcacd728a18a9d5cef1cc4f81432278e27c8

commit d8f7fcacd728a18a9d5cef1cc4f81432278e27c8
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Oct 21 09:05:01 2015 -0700

    Apply -fomit-frame-pointer only to .o/.os files
    
    Since -fomit-frame-pointer is compatible with -pg, apply it only to
    .o/.os files.
    
    	* sysdeps/unix/sysv/linux/i386/Makefile (CFLAGS-epoll_pwait.c):
    	Renamed to ...
    	(CFLAGS-epoll_pwait.o): This.
    	(CFLAGS-mmap.c): Renamed to ...
    	(CFLAGS-mmap.o): This.
    	(CFLAGS-mmap64.c): Renamed to ...
    	(CFLAGS-mmap64.o): This.
    	(CFLAGS-epoll_pwait.os): New.
    	(CFLAGS-mmap.os): Likewise.
    	(CFLAGS-mmap64.os): Likewise.
    	(CFLAGS-semtimedop.os): Likewise.
    	(CFLAGS-semtimedop.c): Renamed to ...
    	(CFLAGS-semtimedop.o): This.

diff --git a/ChangeLog b/ChangeLog
index 29b2730..358e205 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2015-10-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* sysdeps/unix/sysv/linux/i386/Makefile (CFLAGS-epoll_pwait.c):
+	Renamed to ...
+	(CFLAGS-epoll_pwait.o): This.
+	(CFLAGS-mmap.c): Renamed to ...
+	(CFLAGS-mmap.o): This.
+	(CFLAGS-mmap64.c): Renamed to ...
+	(CFLAGS-mmap64.o): This.
+	(CFLAGS-epoll_pwait.os): New.
+	(CFLAGS-mmap.os): Likewise.
+	(CFLAGS-mmap64.os): Likewise.
+	(CFLAGS-semtimedop.os): Likewise.
+	(CFLAGS-semtimedop.c): Renamed to ...
+	(CFLAGS-semtimedop.o): This.
+
 2015-10-21  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
 
 	* debug/tst-backtrace4.c (handle_signal): Fix a comment and
diff --git a/sysdeps/unix/sysv/linux/i386/Makefile b/sysdeps/unix/sysv/linux/i386/Makefile
index b484217..71ba61e 100644
--- a/sysdeps/unix/sysv/linux/i386/Makefile
+++ b/sysdeps/unix/sysv/linux/i386/Makefile
@@ -4,14 +4,18 @@ default-abi := 32
 ifeq ($(subdir),misc)
 sysdep_routines += ioperm iopl vm86
 # %ebp may be used to pass the 6th argument to syscall.
-CFLAGS-epoll_pwait.c += -fomit-frame-pointer
-CFLAGS-mmap.c += -fomit-frame-pointer
-CFLAGS-mmap64.c += -fomit-frame-pointer
+CFLAGS-epoll_pwait.o += -fomit-frame-pointer
+CFLAGS-epoll_pwait.os += -fomit-frame-pointer
+CFLAGS-mmap.o += -fomit-frame-pointer
+CFLAGS-mmap.os += -fomit-frame-pointer
+CFLAGS-mmap64.o += -fomit-frame-pointer
+CFLAGS-mmap64.os += -fomit-frame-pointer
 endif
 
 ifeq ($(subdir),sysvipc)
 # %ebp may be used to pass the 6th argument to syscall.
-CFLAGS-semtimedop.c += -fomit-frame-pointer
+CFLAGS-semtimedop.o += -fomit-frame-pointer
+CFLAGS-semtimedop.os += -fomit-frame-pointer
 endif
 
 ifeq ($(subdir),elf)

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

Summary of changes:
 ChangeLog                             |   21 +++++++++++++++++++++
 sysdeps/unix/sysv/linux/i386/Makefile |   12 ++++++++----
 sysdeps/unix/sysv/linux/i386/sysdep.h |   20 +++++++++++++-------
 3 files changed, 42 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources



More information about the Glibc-cvs mailing list