diff options
author | Carlos O'Donell <carlos@redhat.com> | 2013-07-16 17:55:43 -0400 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-04-26 10:56:44 -0700 |
commit | 7b4fccb9bc52a941956971ca380110eb8ccabdc7 (patch) | |
tree | 25e70c9cee4151d38aeb4319d6485301b154878e | |
parent | ac360604a5ece649baf8f3e4ff12ea4340e0b949 (diff) | |
download | glibc-7b4fccb9bc52a941956971ca380110eb8ccabdc7.tar.gz glibc-7b4fccb9bc52a941956971ca380110eb8ccabdc7.tar.xz glibc-7b4fccb9bc52a941956971ca380110eb8ccabdc7.zip |
BZ #15711: Avoid circular dependency for syscall.h
The generated header is compiled with `-ffreestanding' to avoid any circular dependencies against the installed implementation headers. Such a dependency would require the implementation header to be installed before the generated header could be built (See bug 15711). In current practice the generated header dependencies do not include any of the implementation headers removed by the use of `-ffreestanding'. --- 2013-07-15 Carlos O'Donell <carlos@redhat.com> [BZ #15711] * sysdeps/unix/sysv/linux/Makefile ($(objpfx)bits/syscall%h): Avoid system header dependency with -ffreestanding. ($(objpfx)bits/syscall%d): Likewise.
-rw-r--r-- | sysdeps/unix/sysv/linux/Makefile | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index ecd9c2c973..7dbb951b6e 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -49,6 +49,13 @@ tests += tst-clone # be the condition for those options to use in a C #if condition. # abi-includes may be defined to a list of headers to include # in the generated header, if the default does not suffice. +# +# The generated header is compiled with `-ffreestanding' to avoid any +# circular dependencies against the installed implementation headers. +# Such a dependency would require the implementation header to be +# installed before the generated header could be built (See bug 15711). +# In current practice the generated header dependencies do not include +# any of the implementation headers removed by the use of `-ffreestanding'. $(objpfx)bits/syscall%h $(objpfx)bits/syscall%d: ../sysdeps/unix/sysv/linux/sys/syscall.h $(make-target-directory) @@ -63,7 +70,7 @@ $(objpfx)bits/syscall%h $(objpfx)bits/syscall%d: ../sysdeps/unix/sysv/linux/sys/ echo ''; \ $(if $(abi-variants), \ $(foreach v,$(abi-variants),\ - $(CC) -E -MD -MP -MF $(@:.h=.d)-t$(v) -MT '$(@:.d=.h) $(@:.h=.d)' \ + $(CC) -ffreestanding -E -MD -MP -MF $(@:.h=.d)-t$(v) -MT '$(@:.d=.h) $(@:.h=.d)' \ -x c $(sysincludes) $< $(abi-$(v)-options) \ -D_LIBC -dM | \ sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' | \ @@ -74,7 +81,7 @@ $(objpfx)bits/syscall%h $(objpfx)bits/syscall%d: ../sysdeps/unix/sysv/linux/sys/ $(if $(abi-$(v)-condition),echo '#endif';) \ rm -f $(@:.d=.h).new$(v); \ ), \ - $(CC) -E -MD -MP -MF $(@:.h=.d)-t$(v) -MT '$(@:.d=.h) $(@:.h=.d)' \ + $(CC) -ffreestanding -E -MD -MP -MF $(@:.h=.d)-t$(v) -MT '$(@:.d=.h) $(@:.h=.d)' \ -x c $(sysincludes) $< \ -D_LIBC -dM | \ sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' | \ |