diff options
author | Siddhesh Poyarekar <siddhesh@redhat.com> | 2014-11-19 12:13:54 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2014-11-19 12:13:54 +0530 |
commit | 9cd4747089e6b0d6ed6b2b6c75798912489c7bab (patch) | |
tree | b8804d1fcbe700d16978f82cb76aa8a5bbcf8544 /sysdeps | |
parent | d71035bd9a3a1dc5077ab8d978398f2f960d3555 (diff) | |
download | glibc-9cd4747089e6b0d6ed6b2b6c75798912489c7bab.tar glibc-9cd4747089e6b0d6ed6b2b6c75798912489c7bab.tar.gz glibc-9cd4747089e6b0d6ed6b2b6c75798912489c7bab.tar.bz2 glibc-9cd4747089e6b0d6ed6b2b6c75798912489c7bab.zip |
Add new macro IN_MODULE to identify module in which source is built
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.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/gnu/Makefile | 2 | ||||
-rw-r--r-- | sysdeps/s390/s390-64/Makefile | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/Makefile | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/gnu/Makefile b/sysdeps/gnu/Makefile index c05708d479..b5b2cf0562 100644 --- a/sysdeps/gnu/Makefile +++ b/sysdeps/gnu/Makefile @@ -29,6 +29,8 @@ ifeq ($(subdir),stdio-common) errlist-c = $(firstword $(wildcard $(addsuffix /errlist.c,$(sysdirs) .))) +libof-errlist-compat = extramodules + ifeq ($(build-shared),yes) $(objpfx)errlist-compat.c: $(errlist-c) $(..)sysdeps/gnu/errlist-compat.awk \ $(common-objpfx)Versions.v.i $(before-compile) diff --git a/sysdeps/s390/s390-64/Makefile b/sysdeps/s390/s390-64/Makefile index fe5030efab..ce4f0c5c88 100644 --- a/sysdeps/s390/s390-64/Makefile +++ b/sysdeps/s390/s390-64/Makefile @@ -28,6 +28,10 @@ s390x-iconv-modules = ISO-8859-1_CP037_Z900 UTF8_UTF16_Z9 UTF16_UTF32_Z9 UTF8_UT extra-modules-left += $(s390x-iconv-modules) include extra-module.mk +cpp-srcs-left := $(foreach mod,$(s390x-iconv-modules),$($(mod)-routines)) +lib := iconvdata +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + extra-objs += $(addsuffix .so, $(s390x-iconv-modules)) install-others += $(patsubst %, $(inst_gconvdir)/%.so, $(s390x-iconv-modules)) diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 9ad6d2252b..2d6d8bbc73 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -178,6 +178,7 @@ ifeq ($(subdir),elf) sysdep-rtld-routines += dl-brk dl-sbrk dl-getcwd dl-openat64 dl-opendir \ dl-fxstatat64 +libof-lddlibc4 = lddlibc4 CPPFLAGS-lddlibc4 += -DNOT_IN_libc others += pldd |