]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Build i386 __libc_do_syscall when PROF is defined
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 21 Oct 2015 16:54:36 +0000 (09:54 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 21 Oct 2015 17:14:08 +0000 (10:14 -0700)
Need to provide i386 __libc_do_syscall when PROF is defined.
Define OPTIMIZE_FOR_GCC_5 for .S files so that it can be used
in libc-do-syscall.S.

* sysdeps/unix/sysv/linux/i386/libc-do-syscall.S: Replace
__GNUC_PREREQ (5,0) with OPTIMIZE_FOR_GCC_5.
* sysdeps/unix/sysv/linux/i386/sysdep.h (OPTIMIZE_FOR_GCC_5):
Moved before "#ifdef __ASSEMBLER__".

ChangeLog
sysdeps/unix/sysv/linux/i386/libc-do-syscall.S
sysdeps/unix/sysv/linux/i386/sysdep.h

index bc95bda32e3f6e36987b9ab3197ff306b841035f..1300047a7612b1c583ae0bfdba12a4155f8fc40b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-10-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * sysdeps/unix/sysv/linux/i386/libc-do-syscall.S: Replace
+       __GNUC_PREREQ (5,0) with OPTIMIZE_FOR_GCC_5.
+       * sysdeps/unix/sysv/linux/i386/sysdep.h (OPTIMIZE_FOR_GCC_5):
+       Moved before "#ifdef __ASSEMBLER__".
+
 2015-10-21  Joseph Myers  <joseph@codesourcery.com>
 
        [BZ #19156]
index cdef3d5de1050345c459366239b1eaed70592890..f748cf28f60b286a7854833cc5ebc64d5dbcaca9 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-#if !__GNUC_PREREQ (5,0)
+#ifndef OPTIMIZE_FOR_GCC_5
 
 /* %eax, %ecx, %edx and %esi contain the values expected by the kernel.
    %edi points to a structure with the values of %ebx, %edi and %ebp.  */
index 58305447d4caae58676b36fb3d0ce3c8c2c7857d..dbe5654f5815ab7d07069f67fc9a3f8f91ff3385 100644 (file)
 # undef I386_USE_SYSENTER
 #endif
 
+/* 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.  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) && !defined PROF
+# define OPTIMIZE_FOR_GCC_5
+#endif
+
 #ifdef __ASSEMBLER__
 
 /* Linux uses a negative return value to indicate syscall errors,
 extern int __syscall_error (int)
   attribute_hidden __attribute__ ((__regparm__ (1)));
 
-/* 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.  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) && !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.  */