about summary refs log tree commit diff
path: root/sysdeps/unix/Makefile
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2014-11-19 12:16:00 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2014-11-19 12:16:00 +0530
commit130ac68ca25c9aa65e027e3e37337bc048205c69 (patch)
tree14b5c6ef5c52c1e466952961bcb35356a5d51bc4 /sysdeps/unix/Makefile
parent286663c34b006c1409df4a71f89d6d4d5d01df09 (diff)
downloadglibc-130ac68ca25c9aa65e027e3e37337bc048205c69.tar.gz
glibc-130ac68ca25c9aa65e027e3e37337bc048205c69.tar.xz
glibc-130ac68ca25c9aa65e027e3e37337bc048205c69.zip
Auto-generate libc-modules.h
Remove libc-modules.h from the tree and auto-generate it from
soversions.i and the list of modules in the built-modules variable
defined in Makeconfig.  Macros generated have increasing numbered
values, with built-modules having lower values starting from 1,
following which a separator value LIBS_BEGIN is added and then finally
the library names from soversions.i are appended to the list.  This
allows us to conveniently differentiate between the versioned
libraries and other built modules, which is needed in errno.h and
netdb.h to decide whether to use an internal symbol or an external
one.

Verified that generated code remains unchanged on x86_64.

	* Makeconfig (built-modules): List non-library modules to be
	built.
	(module-cppflags): Include libc-modules.h for
	everything except shlib-versions.v.i.
	(CPPFLAGS): Use it.
	(before-compile): Add libc-modules.h.
	($(common-objpfx)libc-modules.h,
	$(common-objpfx)libc-modules.stmp): New targets.
	(common-generated): Add libc-modules.h and libc-modules.stmp.
	($(common-objpfx)Versions.v.i): Depend on libc-modules.h.
	* include/libc-symbols.h: Don't include libc-modules.h.
	* include/libc-modules.h: Remove file.
	* scripts/gen-libc-modules.awk: New script to generate
	libc-modules.h.
	* sysdeps/unix/Makefile ($(common-objpfx)sysd-syscalls):
	Depend on libc-modules.stmp.
Diffstat (limited to 'sysdeps/unix/Makefile')
-rw-r--r--sysdeps/unix/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/unix/Makefile b/sysdeps/unix/Makefile
index 0e535b63f9..573e90d57f 100644
--- a/sysdeps/unix/Makefile
+++ b/sysdeps/unix/Makefile
@@ -79,7 +79,8 @@ compile-syscall = $(COMPILE.S) -o $@ -x assembler-with-cpp - \
 
 ifndef avoid-generated
 $(common-objpfx)sysd-syscalls: $(..)sysdeps/unix/make-syscalls.sh \
-			       $(wildcard $(+sysdep_dirs:%=%/syscalls.list))
+			       $(wildcard $(+sysdep_dirs:%=%/syscalls.list)) \
+			       $(common-objpfx)libc-modules.stmp
 	for dir in $(+sysdep_dirs); do \
 	  test -f $$dir/syscalls.list && \
 	  { sysdirs='$(sysdirs)' \