diff options
author | Siddhesh Poyarekar <siddhesh@redhat.com> | 2014-11-19 12:16:00 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2014-11-19 12:16:00 +0530 |
commit | 130ac68ca25c9aa65e027e3e37337bc048205c69 (patch) | |
tree | 14b5c6ef5c52c1e466952961bcb35356a5d51bc4 /include | |
parent | 286663c34b006c1409df4a71f89d6d4d5d01df09 (diff) | |
download | glibc-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 'include')
-rw-r--r-- | include/libc-modules.h | 41 | ||||
-rw-r--r-- | include/libc-symbols.h | 3 |
2 files changed, 0 insertions, 44 deletions
diff --git a/include/libc-modules.h b/include/libc-modules.h deleted file mode 100644 index 029b600bea..0000000000 --- a/include/libc-modules.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Valid values for the IN_MODULE macro, which is defined for each source file - during compilation to indicate which module it is to be built into. - - TODO: This file should eventually be auto-generated. */ -#define MODULE_libc 1 -#define MODULE_libpthread 2 -#define MODULE_rtld 3 -#define MODULE_libdl 4 -#define MODULE_libm 5 -#define MODULE_iconvprogs 6 -#define MODULE_iconvdata 7 -#define MODULE_lddlibc4 8 -#define MODULE_locale_programs 9 -#define MODULE_memusagestat 10 -#define MODULE_libutil 12 -#define MODULE_libBrokenLocale 13 -#define MODULE_libmemusage 15 -#define MODULE_libresolv 16 -#define MODULE_libnss_db 17 -#define MODULE_libnss_files 18 -#define MODULE_libnss_dns 19 -#define MODULE_libnss_compat 20 -#define MODULE_libnss_hesiod 21 -#define MODULE_libnss_nis 22 -#define MODULE_libnss_nisplus 23 -#define MODULE_libanl 24 -#define MODULE_librt 25 -#define MODULE_libSegFault 26 -#define MODULE_libthread_db 27 -#define MODULE_libcidn 28 -#define MODULE_libcrypt 29 -#define MODULE_libnsl 30 -#define MODULE_libpcprofile 31 -#define MODULE_librpcsvc 32 -#define MODULE_nscd 33 -#define MODULE_ldconfig 34 -#define MODULE_libnldbl 35 - -/* Catch-all for test modules and other binaries. */ -#define MODULE_nonlib 98 -#define MODULE_extramodules 99 diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 58c357725d..9c5c9bb850 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -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 |