1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-10-21 14:53:53 +03:00

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.
This commit is contained in:
Siddhesh Poyarekar
2014-11-19 12:16:00 +05:30
parent 286663c34b
commit 130ac68ca2
6 changed files with 91 additions and 47 deletions

View File

@@ -20,9 +20,6 @@
#ifndef _LIBC_SYMBOLS_H
#define _LIBC_SYMBOLS_H 1
/* Pull in definitions for the MODULE_* macros. */
#include <libc-modules.h>
#define IS_IN(lib) (IN_MODULE == MODULE_##lib)
/* This file's macros are included implicitly in the compilation of every