arrfab / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-rh1298526-4.patch

147e83
Allows testing of AVX512 changes in a chroot (normally as root)
147e83
without build issues.
147e83
147e83
commit d7e06450b9d730d7b62ba52f611585810fa902df
147e83
Author: Carlos O'Donell <carlos@redhat.com>
147e83
Date:   Tue Jul 16 17:55:43 2013 -0400
147e83
147e83
    BZ #15711: Avoid circular dependency for syscall.h
147e83
    
147e83
    The generated header is compiled with `-ffreestanding' to avoid any
147e83
    circular dependencies against the installed implementation headers.
147e83
    Such a dependency would require the implementation header to be
147e83
    installed before the generated header could be built (See bug 15711).
147e83
    In current practice the generated header dependencies do not include
147e83
    any of the implementation headers removed by the use of `-ffreestanding'.
147e83
    
147e83
    ---
147e83
    
147e83
    2013-07-15  Carlos O'Donell  <carlos@redhat.com>
147e83
    
147e83
        [BZ #15711]
147e83
        * sysdeps/unix/sysv/linux/Makefile ($(objpfx)bits/syscall%h):
147e83
        Avoid system header dependency with -ffreestanding.
147e83
        ($(objpfx)bits/syscall%d): Likewise.
147e83
147e83
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
147e83
index f580635..94916a2 100644
147e83
--- a/sysdeps/unix/sysv/linux/Makefile
147e83
+++ b/sysdeps/unix/sysv/linux/Makefile
147e83
@@ -50,6 +50,13 @@ tests += tst-clone
147e83
 # be the condition for those options to use in a C #if condition.
147e83
 # abi-includes may be defined to a list of headers to include
147e83
 # in the generated header, if the default does not suffice.
147e83
+#
147e83
+# The generated header is compiled with `-ffreestanding' to avoid any
147e83
+# circular dependencies against the installed implementation headers.
147e83
+# Such a dependency would require the implementation header to be
147e83
+# installed before the generated header could be built (See bug 15711).
147e83
+# In current practice the generated header dependencies do not include
147e83
+# any of the implementation headers removed by the use of `-ffreestanding'.
147e83
 
147e83
 $(objpfx)bits/syscall%h $(objpfx)bits/syscall%d: ../sysdeps/unix/sysv/linux/sys/syscall.h
147e83
 	$(make-target-directory)
147e83
@@ -64,7 +71,7 @@ $(objpfx)bits/syscall%h $(objpfx)bits/syscall%d: ../sysdeps/unix/sysv/linux/sys/
147e83
 	 echo ''; \
147e83
 	 $(if $(abi-variants), \
147e83
 	 $(foreach v,$(abi-variants),\
147e83
-	 $(CC) -E -MD -MP -MF $(@:.h=.d)-t$(v) -MT '$(@:.d=.h) $(@:.h=.d)' \
147e83
+	 $(CC) -ffreestanding -E -MD -MP -MF $(@:.h=.d)-t$(v) -MT '$(@:.d=.h) $(@:.h=.d)' \
147e83
 	       -x c $(sysincludes) $< $(abi-$(v)-options) \
147e83
 	       -D_LIBC -dM | \
147e83
 	 sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' | \
147e83
@@ -75,7 +82,7 @@ $(objpfx)bits/syscall%h $(objpfx)bits/syscall%d: ../sysdeps/unix/sysv/linux/sys/
147e83
 	 $(if $(abi-$(v)-condition),echo '#endif';) \
147e83
 	 rm -f $(@:.d=.h).new$(v); \
147e83
 	 ), \
147e83
-	 $(CC) -E -MD -MP -MF $(@:.h=.d)-t$(v) -MT '$(@:.d=.h) $(@:.h=.d)' \
147e83
+	 $(CC) -ffreestanding -E -MD -MP -MF $(@:.h=.d)-t$(v) -MT '$(@:.d=.h) $(@:.h=.d)' \
147e83
 	       -x c $(sysincludes) $< \
147e83
 	       -D_LIBC -dM | \
147e83
 	 sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' | \