mirror of
https://sourceware.org/git/glibc.git
synced 2025-10-23 02:12:24 +03:00
The current scheme to identify which module a translation unit is built in depends on defining multiple macros IS_IN_* and also defining NOT_IN_libc if we're building a non-libc module. In addition, there is an IN_LIB macro that does effectively the same thing, but for different modules (notably the systemtap probes). This macro scheme unifies both ideas to use just one macro IN_MODULE and assign it a value depending on the module it is being built into. If the module is not defined, it defaults to MODULE_libc. Patches that follow will replace uses of IS_IN_* variables with the IS_IN() macro. libc-symbols.h has been converted already to give an example of how such a transition will look. Verified that there are no relevant binary changes. One source change that will crop up repeatedly is that of nscd_stat, since it uses the build timestamp as a constant in its logic. * Makeconfig (in-module): Get value of libof set for the translation unit. (CPPFLAGS): Use $(in-module). * Makerules: Don't suffix routine names for nonlib. * include/libc-modules.h: New file. * include/libc-symbols.h: Include libc-modules.h (IS_IN): New macro to replace IS_IN_* macros. * elf/Makefile: Set libof-* for each routine. * elf/rtld-Rules: Likewise. * extra-modules.mk: Likewise. * iconv/Makefile: Likewise. * iconvdata/Makefile: Likewise. * locale/Makefile: Likewise. * malloc/Makefile: Likewise. * nss/Makefile: Likewise. * sysdeps/gnu/Makefile: Likewise. * sysdeps/ieee754/ldbl-opt/Makefile: Likewise. * sysdeps/unix/sysv/linux/Makefile: Likewise. * sysdeps/s390/s390-64/Makefile: Likewise. * nscd/Makefile: Set libof-* for each routine. Set CFLAGS and CPPFLAGS for nscd instead of nonlib.
42 lines
1.2 KiB
C
42 lines
1.2 KiB
C
/* 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
|