about summary refs log tree commit diff
path: root/iconvdata/Makefile
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2014-11-19 12:13:54 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2014-11-19 12:13:54 +0530
commit9cd4747089e6b0d6ed6b2b6c75798912489c7bab (patch)
treeb8804d1fcbe700d16978f82cb76aa8a5bbcf8544 /iconvdata/Makefile
parentd71035bd9a3a1dc5077ab8d978398f2f960d3555 (diff)
downloadglibc-9cd4747089e6b0d6ed6b2b6c75798912489c7bab.tar.gz
glibc-9cd4747089e6b0d6ed6b2b6c75798912489c7bab.tar.xz
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 'iconvdata/Makefile')
-rw-r--r--iconvdata/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/iconvdata/Makefile b/iconvdata/Makefile
index b6327d6026..e0252ee83f 100644
--- a/iconvdata/Makefile
+++ b/iconvdata/Makefile
@@ -211,6 +211,7 @@ $(objpfx)iconv-rules: Makefile
 	$(AWK) 'NR == 1 { \
 		  for (i = 1; i <= NF; i++) { \
 		    printf "%s-routines := %s\n", $$i, tolower($$i); \
+		    printf "libof-%s := iconvdata\n", tolower($$i); \
 		    printf "%s-map := gconv.map\n", $$i; \
 		  } \
 		}; \
@@ -273,6 +274,11 @@ endif
 
 include ../Rules
 
+# Set libof-* for each routine.
+cpp-srcs-left := $(modules) $(generated-modules)
+lib := iconvdata
+include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+
 tst-loading-ENV = MALLOC_TRACE=$(objpfx)tst-loading.mtrace
 $(objpfx)mtrace-tst-loading.out: $(objpfx)tst-loading.out
 	$(common-objpfx)malloc/mtrace $(objpfx)tst-loading.mtrace > $@; \