bca718
commit 9cd4747089e6b0d6ed6b2b6c75798912489c7bab
bca718
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
bca718
Date:   Wed Nov 19 12:13:54 2014 +0530
bca718
bca718
    Add new macro IN_MODULE to identify module in which source is built
bca718
    
bca718
    The current scheme to identify which module a translation unit is
bca718
    built in depends on defining multiple macros IS_IN_* and also defining
bca718
    NOT_IN_libc if we're building a non-libc module.  In addition, there
bca718
    is an IN_LIB macro that does effectively the same thing, but for
bca718
    different modules (notably the systemtap probes).  This macro scheme
bca718
    unifies both ideas to use just one macro IN_MODULE and assign it a
bca718
    value depending on the module it is being built into.  If the module
bca718
    is not defined, it defaults to MODULE_libc.
bca718
    
bca718
    Patches that follow will replace uses of IS_IN_* variables with the
bca718
    IS_IN() macro.  libc-symbols.h has been converted already to give an
bca718
    example of how such a transition will look.
bca718
    
bca718
    Verified that there are no relevant binary changes.  One source change
bca718
    that will crop up repeatedly is that of nscd_stat, since it uses the
bca718
    build timestamp as a constant in its logic.
bca718
    
bca718
    	* Makeconfig (in-module): Get value of libof set for the
bca718
    	translation unit.
bca718
    	(CPPFLAGS): Use $(in-module).
bca718
    	* Makerules: Don't suffix routine names for nonlib.
bca718
    	* include/libc-modules.h: New file.
bca718
    	* include/libc-symbols.h: Include libc-modules.h
bca718
    	(IS_IN): New macro to replace IS_IN_* macros.
bca718
    	* elf/Makefile: Set libof-* for each routine.
bca718
    	* elf/rtld-Rules: Likewise.
bca718
    	* extra-modules.mk: Likewise.
bca718
    	* iconv/Makefile: Likewise.
bca718
    	* iconvdata/Makefile: Likewise.
bca718
    	* locale/Makefile: Likewise.
bca718
    	* malloc/Makefile: Likewise.
bca718
    	* nss/Makefile: Likewise.
bca718
    	* sysdeps/gnu/Makefile: Likewise.
bca718
    	* sysdeps/ieee754/ldbl-opt/Makefile: Likewise.
bca718
    	* sysdeps/unix/sysv/linux/Makefile: Likewise.
bca718
    	* sysdeps/s390/s390-64/Makefile: Likewise.
bca718
    	* nscd/Makefile: Set libof-* for each routine.  Set CFLAGS and
bca718
    	CPPFLAGS for nscd instead of nonlib.
bca718
bca718
Index: glibc-2.17-c758a686/Makeconfig
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/Makeconfig
bca718
+++ glibc-2.17-c758a686/Makeconfig
bca718
@@ -730,6 +730,11 @@ endif	# $(+cflags) == ""
bca718
 # of many little headers in the include directory.
bca718
 libio-include = -I$(..)libio
bca718
 
bca718
+in-module = $(subst -,_,$(firstword $(libof-$(basename $(@F))) \
bca718
+				    $(libof-$(
bca718
+				    $(libof-$(@F)) \
bca718
+				    libc))
bca718
+
bca718
 # These are the variables that the implicit compilation rules use.
bca718
 # Note that we can't use -std=* in CPPFLAGS, because it overrides
bca718
 # the implicit -lang-asm and breaks cpp behavior for .S files--notably
bca718
@@ -737,7 +742,7 @@ libio-include = -I$(..)libio
bca718
 CPPFLAGS = $(CPPUNDEFS) $(CPPFLAGS-config) $($(subdir)-CPPFLAGS) \
bca718
 	   $(+includes) $(defines) \
bca718
 	   -include $(..)include/libc-symbols.h $(sysdep-CPPFLAGS) \
bca718
-	   $(CPPFLAGS-$(suffix $@)) \
bca718
+	   $(CPPFLAGS-$(suffix $@)) -DIN_MODULE=MODULE_$(in-module) \
bca718
 	   $(foreach lib,$(libof-$(basename $(@F))) \
bca718
 			 $(libof-$(
bca718
 	   $(CPPFLAGS-$(
bca718
Index: glibc-2.17-c758a686/Makerules
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/Makerules
bca718
+++ glibc-2.17-c758a686/Makerules
bca718
@@ -1151,7 +1151,7 @@ xcheck: xtests
bca718
 
bca718
 all-nonlib = $(strip $(tests) $(xtests) $(test-srcs) $(test-extras) $(others))
bca718
 ifneq (,$(all-nonlib))
bca718
-cpp-srcs-left = $(all-nonlib:=.c) $(all-nonlib:=.cc)
bca718
+cpp-srcs-left = $(all-nonlib)
bca718
 lib := nonlib
bca718
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
bca718
 endif
bca718
Index: glibc-2.17-c758a686/elf/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/elf/Makefile
bca718
+++ glibc-2.17-c758a686/elf/Makefile
bca718
@@ -436,7 +436,8 @@ $(objpfx)pldd: $(pldd-modules:%=$(objpfx
bca718
 
bca718
 SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
bca718
 CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
bca718
-		    -D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1
bca718
+		    -D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1 -DNOT_IN_libc=1
bca718
+libof-ldconfig = ldconfig
bca718
 CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
bca718
 CFLAGS-cache.c = $(SYSCONF-FLAGS)
bca718
 CFLAGS-rtld.c = $(SYSCONF-FLAGS)
bca718
@@ -454,6 +455,10 @@ CFLAGS-.op += -fno-tree-loop-distribute-
bca718
 CFLAGS-.ob += -fno-tree-loop-distribute-patterns
bca718
 CFLAGS-.oS += -fno-tree-loop-distribute-patterns
bca718
 
bca718
+cpp-srcs-left := $(all-rtld-routines:=.os)
bca718
+lib := rtld
bca718
+include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
bca718
+
bca718
 test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
bca718
 generated += $(addsuffix .so,$(strip $(modules-names)))
bca718
 
bca718
Index: glibc-2.17-c758a686/elf/rtld-Rules
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/elf/rtld-Rules
bca718
+++ glibc-2.17-c758a686/elf/rtld-Rules
bca718
@@ -128,6 +128,11 @@ ifdef rtld-depfiles
bca718
 -include $(rtld-depfiles)
bca718
 endif
bca718
 
bca718
+# Set libof-* for each routine.
bca718
+cpp-srcs-left := $(rtld-modules:%.os=%)
bca718
+lib := rtld
bca718
+include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
bca718
+
bca718
 # This here is the whole point of all the shenanigans.
bca718
 rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld
bca718
 
bca718
Index: glibc-2.17-c758a686/extra-modules.mk
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/extra-modules.mk
bca718
+++ glibc-2.17-c758a686/extra-modules.mk
bca718
@@ -6,4 +6,5 @@
bca718
 module := $(firstword $(extra-modules-left))
bca718
 extra-modules-left := $(filter-out $(module),$(extra-modules-left))
bca718
 
bca718
+libof-$(notdir $(module)) := extramodules
bca718
 CPPFLAGS-$(module).c += -DNOT_IN_libc
bca718
Index: glibc-2.17-c758a686/iconv/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/iconv/Makefile
bca718
+++ glibc-2.17-c758a686/iconv/Makefile
bca718
@@ -53,11 +53,12 @@ CFLAGS-gconv_cache.c += -DGCONV_DIR='"$(
bca718
 CFLAGS-gconv_conf.c = -DGCONV_PATH='"$(gconvdir)"'
bca718
 CFLAGS-iconvconfig.c = -DGCONV_PATH='"$(gconvdir)"' -DGCONV_DIR='"$(gconvdir)"'
bca718
 
bca718
-CPPFLAGS-iconv_charmap = -DNOT_IN_libc
bca718
-CPPFLAGS-linereader = -DNOT_IN_libc
bca718
-CPPFLAGS-strtab = -DNOT_IN_libc
bca718
-CPPFLAGS-charmap = -DNOT_IN_libc
bca718
-CPPFLAGS-charmap-dir = -DNOT_IN_libc
bca718
+CPPFLAGS-iconvprogs = -DNOT_IN_libc
bca718
+
bca718
+# Set libof-* for each routine.
bca718
+cpp-srcs-left := $(iconv_prog-modules) $(iconvconfig-modules)
bca718
+lib := iconvprogs
bca718
+include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
bca718
 
bca718
 include ../Rules
bca718
 
bca718
Index: glibc-2.17-c758a686/iconvdata/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/iconvdata/Makefile
bca718
+++ glibc-2.17-c758a686/iconvdata/Makefile
bca718
@@ -212,6 +212,7 @@ $(objpfx)iconv-rules: Makefile
bca718
 	$(AWK) 'NR == 1 { \
bca718
 		  for (i = 1; i <= NF; i++) { \
bca718
 		    printf "%s-routines := %s\n", $$i, tolower($$i); \
bca718
+		    printf "libof-%s := iconvdata\n", tolower($$i); \
bca718
 		    printf "%s-map := gconv.map\n", $$i; \
bca718
 		  } \
bca718
 		}; \
bca718
@@ -265,6 +266,11 @@ endif # build-shared = yes
bca718
 
bca718
 include ../Rules
bca718
 
bca718
+# Set libof-* for each routine.
bca718
+cpp-srcs-left := $(modules) $(generated-modules)
bca718
+lib := iconvdata
bca718
+include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
bca718
+
bca718
 ifeq ($(run-built-tests),yes)
bca718
 ifeq (yes,$(build-shared))
bca718
 tests: $(objpfx)iconv-test.out $(objpfx)tst-tables.out
bca718
Index: glibc-2.17-c758a686/include/libc-modules.h
bca718
===================================================================
bca718
--- /dev/null
bca718
+++ glibc-2.17-c758a686/include/libc-modules.h
bca718
@@ -0,0 +1,41 @@
bca718
+/* Valid values for the IN_MODULE macro, which is defined for each source file
bca718
+   during compilation to indicate which module it is to be built into.
bca718
+
bca718
+   TODO: This file should eventually be auto-generated.  */
bca718
+#define MODULE_libc		1
bca718
+#define MODULE_libpthread	2
bca718
+#define MODULE_rtld		3
bca718
+#define MODULE_libdl		4
bca718
+#define MODULE_libm		5
bca718
+#define MODULE_iconvprogs	6
bca718
+#define MODULE_iconvdata	7
bca718
+#define MODULE_lddlibc4		8
bca718
+#define MODULE_locale_programs	9
bca718
+#define MODULE_memusagestat	10
bca718
+#define MODULE_libutil		12
bca718
+#define MODULE_libBrokenLocale	13
bca718
+#define MODULE_libmemusage	15
bca718
+#define MODULE_libresolv	16
bca718
+#define MODULE_libnss_db	17
bca718
+#define MODULE_libnss_files	18
bca718
+#define	MODULE_libnss_dns	19
bca718
+#define MODULE_libnss_compat	20
bca718
+#define MODULE_libnss_hesiod	21
bca718
+#define MODULE_libnss_nis	22
bca718
+#define MODULE_libnss_nisplus	23
bca718
+#define MODULE_libanl		24
bca718
+#define MODULE_librt		25
bca718
+#define MODULE_libSegFault	26
bca718
+#define MODULE_libthread_db	27
bca718
+#define MODULE_libcidn		28
bca718
+#define MODULE_libcrypt		29
bca718
+#define MODULE_libnsl		30
bca718
+#define MODULE_libpcprofile	31
bca718
+#define MODULE_librpcsvc	32
bca718
+#define MODULE_nscd		33
bca718
+#define MODULE_ldconfig 	34
bca718
+#define MODULE_libnldbl 	35
bca718
+
bca718
+/* Catch-all for test modules and other binaries.  */
bca718
+#define MODULE_nonlib		98
bca718
+#define MODULE_extramodules	99
bca718
Index: glibc-2.17-c758a686/include/libc-symbols.h
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/include/libc-symbols.h
bca718
+++ glibc-2.17-c758a686/include/libc-symbols.h
bca718
@@ -20,6 +20,11 @@
bca718
 #ifndef _LIBC_SYMBOLS_H
bca718
 #define _LIBC_SYMBOLS_H	1
bca718
 
bca718
+/* Pull in definitions for the MODULE_* macros.  */
bca718
+#include <libc-modules.h>
bca718
+
bca718
+#define IS_IN(lib) (IN_MODULE == MODULE_##lib)
bca718
+
bca718
 /* This file's macros are included implicitly in the compilation of every
bca718
    file in the C library by -imacros.
bca718
 
bca718
@@ -450,7 +455,7 @@ for linking")
bca718
    If the function should be internal to multiple objects, say ld.so and
bca718
    libc.so, the best way is to use:
bca718
 
bca718
-   #if !defined NOT_IN_libc || defined IS_IN_rtld
bca718
+   #if IS_IN (libc) || IS_IN (rtld)
bca718
    hidden_proto (foo)
bca718
    #endif
bca718
 
bca718
@@ -561,7 +566,7 @@ for linking")
bca718
 # define libc_hidden_data_ver(local, name)
bca718
 #endif
bca718
 
bca718
-#ifdef IS_IN_rtld
bca718
+#if IS_IN (rtld)
bca718
 # define rtld_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
bca718
 # define rtld_hidden_def(name) hidden_def (name)
bca718
 # define rtld_hidden_weak(name) hidden_weak (name)
bca718
@@ -579,7 +584,7 @@ for linking")
bca718
 # define rtld_hidden_data_ver(local, name)
bca718
 #endif
bca718
 
bca718
-#ifdef IS_IN_libm
bca718
+#if IS_IN (libm)
bca718
 # define libm_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
bca718
 # define libm_hidden_def(name) hidden_def (name)
bca718
 # define libm_hidden_weak(name) hidden_weak (name)
bca718
@@ -597,7 +602,7 @@ for linking")
bca718
 # define libm_hidden_data_ver(local, name)
bca718
 #endif
bca718
 
bca718
-#ifdef IS_IN_libresolv
bca718
+#if IS_IN (libresolv)
bca718
 # define libresolv_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
bca718
 # define libresolv_hidden_def(name) hidden_def (name)
bca718
 # define libresolv_hidden_weak(name) hidden_weak (name)
bca718
@@ -615,7 +620,7 @@ for linking")
bca718
 # define libresolv_hidden_data_ver(local, name)
bca718
 #endif
bca718
 
bca718
-#ifdef IS_IN_librt
bca718
+#if IS_IN (librt)
bca718
 # define librt_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
bca718
 # define librt_hidden_def(name) hidden_def (name)
bca718
 # define librt_hidden_weak(name) hidden_weak (name)
bca718
@@ -633,7 +638,7 @@ for linking")
bca718
 # define librt_hidden_data_ver(local, name)
bca718
 #endif
bca718
 
bca718
-#ifdef IS_IN_libdl
bca718
+#if IS_IN (libdl)
bca718
 # define libdl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
bca718
 # define libdl_hidden_def(name) hidden_def (name)
bca718
 # define libdl_hidden_weak(name) hidden_weak (name)
bca718
@@ -651,7 +656,7 @@ for linking")
bca718
 # define libdl_hidden_data_ver(local, name)
bca718
 #endif
bca718
 
bca718
-#ifdef IS_IN_libnss_files
bca718
+#if IS_IN (libnss_files)
bca718
 # define libnss_files_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
bca718
 # define libnss_files_hidden_def(name) hidden_def (name)
bca718
 # define libnss_files_hidden_weak(name) hidden_weak (name)
bca718
@@ -669,7 +674,7 @@ for linking")
bca718
 # define libnss_files_hidden_data_ver(local, name)
bca718
 #endif
bca718
 
bca718
-#ifdef IS_IN_libnsl
bca718
+#if IS_IN (libnsl)
bca718
 # define libnsl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
bca718
 # define libnsl_hidden_def(name) hidden_def (name)
bca718
 # define libnsl_hidden_weak(name) hidden_weak (name)
bca718
@@ -687,7 +692,7 @@ for linking")
bca718
 # define libnsl_hidden_data_ver(local, name)
bca718
 #endif
bca718
 
bca718
-#ifdef IS_IN_libnss_nisplus
bca718
+#if IS_IN (libnss_nisplus)
bca718
 # define libnss_nisplus_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
bca718
 # define libnss_nisplus_hidden_def(name) hidden_def (name)
bca718
 # define libnss_nisplus_hidden_weak(name) hidden_weak (name)
bca718
@@ -713,7 +718,7 @@ for linking")
bca718
 # define HIDDEN_BUILTIN_JUMPTARGET(name) HIDDEN_JUMPTARGET(name)
bca718
 #endif
bca718
 
bca718
-#ifdef IS_IN_libutil
bca718
+#if IS_IN (libutil)
bca718
 # define libutil_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
bca718
 # define libutil_hidden_def(name) hidden_def (name)
bca718
 # define libutil_hidden_weak(name) hidden_weak (name)
bca718
Index: glibc-2.17-c758a686/locale/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/locale/Makefile
bca718
+++ glibc-2.17-c758a686/locale/Makefile
bca718
@@ -95,8 +95,8 @@ CFLAGS-locfile.c = -Wno-write-strings -W
bca718
 CFLAGS-charmap-dir.c = -Wno-write-strings
bca718
 
bca718
 # This makes sure -DNOT_IN_libc et al are passed for all these modules.
bca718
-cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \
bca718
-				$(locale-modules) $(lib-modules))
bca718
+cpp-srcs-left := $(localedef-modules) $(localedef-aux) $(locale-modules) \
bca718
+		 $(lib-modules)
bca718
 lib := locale-programs
bca718
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
bca718
 
bca718
Index: glibc-2.17-c758a686/malloc/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/malloc/Makefile
bca718
+++ glibc-2.17-c758a686/malloc/Makefile
bca718
@@ -97,6 +97,11 @@ endif
bca718
 do-memusagestat: $(objpfx)memusagestat
bca718
 
bca718
 memusagestat-modules = memusagestat
bca718
+
bca718
+cpp-srcs-left := $(memusagestat-modules)
bca718
+lib := memusagestat
bca718
+include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
bca718
+
bca718
 $(objpfx)memusagestat: $(memusagestat-modules:%=$(objpfx)%.o)
bca718
 	$(LINK.o) -o $@ $^ $(libgd-LDFLAGS) -lgd -lpng -lz -lm
bca718
 
bca718
Index: glibc-2.17-c758a686/nscd/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/nscd/Makefile
bca718
+++ glibc-2.17-c758a686/nscd/Makefile
bca718
@@ -79,26 +79,25 @@ CFLAGS-nscd_gethst_r.c = -fexceptions
bca718
 CFLAGS-nscd_getai.c = -fexceptions
bca718
 CFLAGS-nscd_initgroups.c = -fexceptions
bca718
 
bca718
-CPPFLAGS-nonlib += -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2
bca718
+CPPFLAGS-nscd += -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2 -DNOT_IN_libc=1
bca718
 
bca718
 ifeq (yesyes,$(have-fpie)$(build-shared))
bca718
-CFLAGS-nonlib += $(pie-ccflag)
bca718
+CFLAGS-nscd += $(pie-ccflag)
bca718
 endif
bca718
 ifeq (yes,$(have-ssp))
bca718
-CFLAGS-nonlib += -fstack-protector
bca718
+CFLAGS-nscd += -fstack-protector
bca718
 endif
bca718
 ifeq (yes,$(have-ssp-strong))
bca718
-CFLAGS-nonlib += -fstack-protector-strong
bca718
+CFLAGS-nscd += -fstack-protector-strong
bca718
 endif
bca718
 
bca718
 ifeq (yesyes,$(have-fpie)$(build-shared))
bca718
 LDFLAGS-nscd = -Wl,-z,now
bca718
 endif
bca718
 
bca718
-# This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed
bca718
-# for all these modules.
bca718
-cpp-srcs-left := $(nscd-modules:=.c)
bca718
-lib := nonlib
bca718
+# Set libof-nscd.
bca718
+cpp-srcs-left := $(nscd-modules)
bca718
+lib := nscd
bca718
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
bca718
 
bca718
 $(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o)
bca718
Index: glibc-2.17-c758a686/nss/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/nss/Makefile
bca718
+++ glibc-2.17-c758a686/nss/Makefile
bca718
@@ -108,7 +108,8 @@ $(objpfx)makedb: $(makedb-modules:%=$(ob
bca718
 $(inst_vardbdir)/Makefile: db-Makefile $(+force)
bca718
 	$(do-install)
bca718
 
bca718
-CFLAGS-nss_test1.c = -DNOT_IN_libc=1
bca718
+libof-nss_test1 = extramodules
bca718
+CPPFLAGS-nss_test1 = -DNOT_IN_libc=1
bca718
 $(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(common-objpfx)libc.so \
bca718
 			   $(common-objpfx)libc_nonshared.a
bca718
 	$(build-module)
bca718
Index: glibc-2.17-c758a686/stdlib/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/stdlib/Makefile
bca718
+++ glibc-2.17-c758a686/stdlib/Makefile
bca718
@@ -138,6 +138,7 @@ LDFLAGS-tst-putenv = $(no-as-needed)
bca718
 
bca718
 $(objpfx)tst-putenvmod.so: $(objpfx)tst-putenvmod.os
bca718
 	$(build-module)
bca718
+libof-tst-putenvmod = extramodules
bca718
 CFLAGS-tst-putenvmod.c = -DNOT_IN_libc=1
bca718
 
bca718
 ifeq ($(build-shared),yes)
bca718
Index: glibc-2.17-c758a686/sysdeps/gnu/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/sysdeps/gnu/Makefile
bca718
+++ glibc-2.17-c758a686/sysdeps/gnu/Makefile
bca718
@@ -30,6 +30,8 @@ ifeq ($(subdir),stdio-common)
bca718
 
bca718
 errlist-c = $(firstword $(wildcard $(addsuffix /errlist.c,$(sysdirs) .)))
bca718
 
bca718
+libof-errlist-compat = extramodules
bca718
+
bca718
 ifeq ($(versioning),yes)
bca718
 $(objpfx)errlist-compat.c: $(errlist-c) $(..)sysdeps/gnu/errlist-compat.awk \
bca718
 			   $(common-objpfx)Versions.v.i $(before-compile)
bca718
Index: glibc-2.17-c758a686/sysdeps/s390/s390-64/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/sysdeps/s390/s390-64/Makefile
bca718
+++ glibc-2.17-c758a686/sysdeps/s390/s390-64/Makefile
bca718
@@ -28,6 +28,10 @@ s390x-iconv-modules = ISO-8859-1_CP037_Z
bca718
 extra-modules-left += $(s390x-iconv-modules)
bca718
 include extra-module.mk
bca718
 
bca718
+cpp-srcs-left := $(foreach mod,$(s390x-iconv-modules),$($(mod)-routines))
bca718
+lib := iconvdata
bca718
+include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
bca718
+
bca718
 extra-objs      += $(addsuffix .so, $(s390x-iconv-modules))
bca718
 install-others  += $(patsubst %, $(inst_gconvdir)/%.so, $(s390x-iconv-modules))
bca718
 
bca718
Index: glibc-2.17-c758a686/sysdeps/unix/sysv/linux/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/sysdeps/unix/sysv/linux/Makefile
bca718
+++ glibc-2.17-c758a686/sysdeps/unix/sysv/linux/Makefile
bca718
@@ -159,6 +159,7 @@ ifeq ($(subdir),elf)
bca718
 sysdep-rtld-routines += dl-brk dl-sbrk dl-getcwd dl-openat64 dl-opendir \
bca718
 			dl-fxstatat64
bca718
 
bca718
+libof-lddlibc4 = lddlibc4
bca718
 CPPFLAGS-lddlibc4 += -DNOT_IN_libc
bca718
 endif
bca718