bca718
Required to get access to _rtld_global_ro@@GLIBC_PRIVATE
bca718
since it's only available from ld.so.
bca718
bca718
commit fab7ce3f5b4060bf62659e8b58529de4156b5a2f
bca718
Author: Joseph Myers <joseph@codesourcery.com>
bca718
Date:   Fri May 31 16:16:33 2013 +0000
bca718
bca718
    Link extra-libs consistently with libc and ld.so.
bca718
bca718
Index: glibc-2.17-c758a686/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/Makefile
bca718
+++ glibc-2.17-c758a686/Makefile
bca718
@@ -127,6 +127,9 @@ lib: $(common-objpfx)libc.so
bca718
 
bca718
 lib: $(common-objpfx)linkobj/libc.so
bca718
 
bca718
+# Do not filter ld.so out of libc.so link.
bca718
+$(common-objpfx)linkobj/libc.so: link-libc-deps = # empty
bca718
+
bca718
 $(common-objpfx)linkobj/libc.so: $(elfobjdir)/soinit.os \
bca718
 				 $(common-objpfx)linkobj/libc_pic.a \
bca718
 				 $(elfobjdir)/sofini.os \
bca718
Index: glibc-2.17-c758a686/Makerules
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/Makerules
bca718
+++ glibc-2.17-c758a686/Makerules
bca718
@@ -470,9 +470,10 @@ link-libc-deps = $(common-objpfx)libc.so
bca718
 # This must come after the installation rules so Make doesn't try to
bca718
 # build shared libraries in place from the installed *_pic.a files.
bca718
 # $(LDLIBS-%.so) may contain -l switches to generate run-time dependencies
bca718
-# on other shared objects.
bca718
-lib%.so: lib%_pic.a $(+preinit) $(+postinit)
bca718
-	$(build-shlib)
bca718
+# on other shared objects.  The linking with libc and ld.so is intended
bca718
+# to be as similar as possible to a default link with an installed libc.
bca718
+lib%.so: lib%_pic.a $(+preinit) $(+postinit) $(+interp) $(link-libc-deps)
bca718
+	$(build-shlib) $(link-libc-args)
bca718
 
bca718
 define build-shlib-helper
bca718
 $(LINK.o) -shared $(static-libgcc) -Wl,-O1 $(sysdep-LDFLAGS) \
bca718
@@ -558,7 +559,8 @@ endef
bca718
 
bca718
 build-module-helper-objlist = \
bca718
 	$(patsubst %_pic.a,$(whole-archive) %_pic.a $(no-whole-archive),\
bca718
-		   $(filter-out %.lds $(map-file) $(+preinit) $(+postinit),$^))
bca718
+		   $(filter-out %.lds $(map-file) $(+preinit) $(+postinit) \
bca718
+				$(link-libc-deps),$^))
bca718
 
bca718
 build-module-objlist = $(build-module-helper-objlist) $(LDLIBS-$(@F:%.so=%).so)
bca718
 build-shlib-objlist = $(build-module-helper-objlist) \
bca718
@@ -601,6 +603,9 @@ generated += libc_pic.opts libc_pic.os.c
bca718
 libc_pic_clean := .clean
bca718
 endif
bca718
 
bca718
+# Do not filter ld.so out of libc.so link.
bca718
+$(common-objpfx)libc.so: link-libc-deps = # empty
bca718
+
bca718
 # Use our own special initializer and finalizer files for libc.so.
bca718
 $(common-objpfx)libc.so: $(elfobjdir)/soinit.os \
bca718
 			 $(common-objpfx)libc_pic.os$(libc_pic_clean) \
bca718
@@ -660,8 +665,7 @@ include $(patsubst %,$(..)extra-modules.
bca718
 
bca718
 extra-modules-build := $(filter-out $(modules-names-nobuild),$(modules-names))
bca718
 $(extra-modules-build:%=$(objpfx)%.so): $(objpfx)%.so: \
bca718
-		$(objpfx)%.os $(shlib-lds) \
bca718
-		$(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
bca718
+		$(objpfx)%.os $(shlib-lds) $(link-libs-deps)
bca718
 	$(build-module)
bca718
 endif
bca718
 
bca718
Index: glibc-2.17-c758a686/crypt/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/crypt/Makefile
bca718
+++ glibc-2.17-c758a686/crypt/Makefile
bca718
@@ -72,8 +72,3 @@ endif
bca718
 ifeq (yes,$(build-bounded))
bca718
 $(tests:%=$(objpfx)%-bp): $(objpfx)libcrypt_b.a
bca718
 endif
bca718
-
bca718
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
bca718
-# This ensures they will load libc.so for needed symbols if loaded by
bca718
-# a statically-linked program that hasn't already loaded it.
bca718
-$(objpfx)libcrypt.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
bca718
Index: glibc-2.17-c758a686/debug/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/debug/Makefile
bca718
+++ glibc-2.17-c758a686/debug/Makefile
bca718
@@ -159,13 +159,3 @@ $(objpfx)xtrace: xtrace.sh
bca718
 	    -e 's|@PKGVERSION@|$(PKGVERSION)|' \
bca718
 	    -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \
bca718
 	&& rm -f $@ && mv $@.new $@ && chmod +x $@
bca718
-
bca718
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
bca718
-# This ensures they will load libc.so for needed symbols if loaded by
bca718
-# a statically-linked program that hasn't already loaded it.
bca718
-$(objpfx)libSegFault.so: $(common-objpfx)libc.so \
bca718
-			 $(common-objpfx)libc_nonshared.a \
bca718
-			 $(elf-objpfx)$(rtld-installed-name)
bca718
-$(objpfx)libpcprofile.so: $(common-objpfx)libc.so \
bca718
-			  $(common-objpfx)libc_nonshared.a \
bca718
-			  $(elf-objpfx)$(rtld-installed-name)
bca718
Index: glibc-2.17-c758a686/dlfcn/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/dlfcn/Makefile
bca718
+++ glibc-2.17-c758a686/dlfcn/Makefile
bca718
@@ -117,16 +117,9 @@ $(objpfx)bug-atexit1.out: $(objpfx)bug-a
bca718
 $(objpfx)bug-atexit2: $(libdl)
bca718
 $(objpfx)bug-atexit2.out: $(objpfx)bug-atexit2-lib.so
bca718
 
bca718
-LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh $(elfobjdir)/ld.so \
bca718
-			    $(common-objpfx)libc_nonshared.a
bca718
+LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh
bca718
 $(objpfx)bug-atexit3: $(libdl)
bca718
 $(objpfx)bug-atexit3.out: $(objpfx)bug-atexit3-lib.so
bca718
 
bca718
 $(objpfx)tst-rec-dlopen: $(libdl)
bca718
 $(objpfx)tst-rec-dlopen.out: $(objpfx)moddummy1.so $(objpfx)moddummy2.so
bca718
-
bca718
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
bca718
-# This ensures they will load libc.so for needed symbols if loaded by
bca718
-# a statically-linked program that hasn't already loaded it.
bca718
-$(objpfx)libdl.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a \
bca718
-		   $(elfobjdir)/ld.so
bca718
Index: glibc-2.17-c758a686/hesiod/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/hesiod/Makefile
bca718
+++ glibc-2.17-c758a686/hesiod/Makefile
bca718
@@ -33,12 +33,7 @@ libnss_hesiod-inhibit-o	= $(filter-out .
bca718
 
bca718
 include ../Rules
bca718
 
bca718
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
bca718
-# This ensures they will load libc.so for needed symbols if loaded by
bca718
-# a statically-linked program that hasn't already loaded it.
bca718
-# The Hesiod NSS modules also needs the resolver and some help from
bca718
+# The Hesiod NSS module also needs the resolver and some help from
bca718
 # the file service.
bca718
 $(objpfx)libnss_hesiod.so: $(common-objpfx)resolv/libresolv.so \
bca718
-			   $(common-objpfx)nss/libnss_files.so \
bca718
-			   $(common-objpfx)libc.so \
bca718
-			   $(common-objpfx)libc_nonshared.a
bca718
+			   $(common-objpfx)nss/libnss_files.so
bca718
Index: glibc-2.17-c758a686/iconvdata/extra-module.mk
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/iconvdata/extra-module.mk
bca718
+++ glibc-2.17-c758a686/iconvdata/extra-module.mk
bca718
@@ -4,16 +4,9 @@ extra-modules-left := $(strip $(filter-o
bca718
 extra-objs := $(extra-objs) $(patsubst %,%.os,$($(mod)-routines))
bca718
 
bca718
 $(objpfx)$(mod).so: $(addprefix $(objpfx),$(addsuffix .os,$($(mod)-routines)))\
bca718
-		    $(shlib-lds)
bca718
+		    $(shlib-lds) $(link-libc-deps)
bca718
 	$(build-module-asneeded)
bca718
 
bca718
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
bca718
-# This ensures they will load libc.so for needed symbols if loaded by
bca718
-# a statically-linked program that hasn't already loaded it.
bca718
-$(objpfx)$(mod).so: $(common-objpfx)libc.so \
bca718
-	$(common-objpfx)/elf/ld.so \
bca718
-	$(common-objpfx)libc_nonshared.a
bca718
-
bca718
 ifneq (,$(extra-modules-left))
bca718
 include extra-module.mk
bca718
 endif
bca718
Index: glibc-2.17-c758a686/libidn/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/libidn/Makefile
bca718
+++ glibc-2.17-c758a686/libidn/Makefile
bca718
@@ -33,5 +33,3 @@ include $(..)Makeconfig
bca718
 libcidn-inhibit-o = $(filter-out .os,$(object-suffixes))
bca718
 
bca718
 include $(..)Rules
bca718
-
bca718
-$(objpfx)libcidn.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
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
@@ -99,9 +99,3 @@ cpp-srcs-left := $(localedef-modules) $(
bca718
 		 $(lib-modules)
bca718
 lib := locale-programs
bca718
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
bca718
-
bca718
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
bca718
-# This ensures they will load libc.so for needed symbols if loaded by
bca718
-# a statically-linked program that hasn't already loaded it.
bca718
-$(objpfx)libBrokenLocale.so: $(common-objpfx)libc.so \
bca718
-			     $(common-objpfx)libc_nonshared.a
bca718
Index: glibc-2.17-c758a686/login/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/login/Makefile
bca718
+++ glibc-2.17-c758a686/login/Makefile
bca718
@@ -76,8 +76,3 @@ endif
bca718
 $(inst_libexecdir)/pt_chown: $(objpfx)pt_chown $(+force)
bca718
 	$(make-target-directory)
bca718
 	-$(INSTALL_PROGRAM) -m 4755 -o root $< $@
bca718
-
bca718
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
bca718
-# This ensures they will load libc.so for needed symbols if loaded by
bca718
-# a statically-linked program that hasn't already loaded it.
bca718
-$(objpfx)libutil.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
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
@@ -151,7 +151,7 @@ $(objpfx)memusage: memusage.sh
bca718
 
bca718
 
bca718
 # The implementation uses `dlsym'
bca718
-$(objpfx)libmemusage.so: $(common-objpfx)dlfcn/libdl.so $(elfobjdir)/ld.so
bca718
+$(objpfx)libmemusage.so: $(common-objpfx)dlfcn/libdl.so
bca718
 
bca718
 # Extra dependencies
bca718
 $(foreach o,$(all-object-suffixes),$(objpfx)malloc$(o)): arena.c hooks.c
bca718
Index: glibc-2.17-c758a686/math/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/math/Makefile
bca718
+++ glibc-2.17-c758a686/math/Makefile
bca718
@@ -203,8 +203,3 @@ gmp-objs = $(patsubst %,$(common-objpfx)
bca718
 $(objpfx)atest-exp: $(gmp-objs)
bca718
 $(objpfx)atest-sincos: $(gmp-objs)
bca718
 $(objpfx)atest-exp2: $(gmp-objs)
bca718
-
bca718
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
bca718
-# This ensures they will load libc.so for needed symbols if loaded by
bca718
-# a statically-linked program that hasn't already loaded it.
bca718
-$(objpfx)libm.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
bca718
Index: glibc-2.17-c758a686/nis/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/nis/Makefile
bca718
+++ glibc-2.17-c758a686/nis/Makefile
bca718
@@ -77,12 +77,12 @@ $(objpfx)libnss_nis.so: $(objpfx)libnsl.
bca718
 			$(common-objpfx)nss/libnss_files.so
bca718
 $(objpfx)libnss_nisplus.so: $(objpfx)libnsl.so$(libnsl.so-version)
bca718
 
bca718
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
bca718
-# This ensures they will load libc.so for needed symbols if loaded by
bca718
-# a statically-linked program that hasn't already loaded it.
bca718
 libnsl-libc = $(common-objpfx)linkobj/libc.so
bca718
-$(services:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: $(libnsl-libc) \
bca718
-					       $(common-objpfx)libc_nonshared.a
bca718
+# Target-specific variable setting to link objects using deprecated
bca718
+# RPC interfaces with the version of libc.so that makes them available
bca718
+# for new links:
bca718
+$(services:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: \
bca718
+  libc-for-link = $(libnsl-libc)
bca718
 
bca718
 
bca718
 ifeq ($(build-shared),yes)
bca718
Index: glibc-2.17-c758a686/nptl/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/nptl/Makefile
bca718
+++ glibc-2.17-c758a686/nptl/Makefile
bca718
@@ -530,14 +530,6 @@ $(objpfx)libpthread.so: $(addprefix $(ob
bca718
 $(objpfx)libpthread.so: +preinit += $(addprefix $(objpfx),$(crti-objs))
bca718
 $(objpfx)libpthread.so: +postinit += $(addprefix $(objpfx),$(crtn-objs))
bca718
 
bca718
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
bca718
-# This ensures they will load libc.so for needed symbols if loaded by
bca718
-# a statically-linked program that hasn't already loaded it.
bca718
-# Depend on ld.so too to get proper versions of ld.so symbols.
bca718
-$(objpfx)libpthread.so: $(common-objpfx)libc.so \
bca718
-			$(common-objpfx)libc_nonshared.a \
bca718
-			$(elfobjdir)/ld.so
bca718
-
bca718
 # Make sure we link with the thread library.
bca718
 ifeq ($(build-shared),yes)
bca718
 $(addprefix $(objpfx), \
bca718
Index: glibc-2.17-c758a686/nptl_db/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/nptl_db/Makefile
bca718
+++ glibc-2.17-c758a686/nptl_db/Makefile
bca718
@@ -51,12 +51,6 @@ libthread_db.so-no-z-defs = yes
bca718
 
bca718
 include ../Rules
bca718
 
bca718
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
bca718
-# This ensures they will load libc.so for needed symbols if loaded by
bca718
-# a statically-linked program that hasn't already loaded it.
bca718
-$(objpfx)libthread_db.so: $(common-objpfx)libc.so \
bca718
-			  $(common-objpfx)libc_nonshared.a
bca718
-
bca718
 tests: $(objpfx)db-symbols.out
bca718
 $(objpfx)db-symbols.out: $(objpfx)db-symbols.v.i \
bca718
 			 $(common-objpfx)nptl/libpthread.so
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
@@ -86,12 +86,11 @@ ifeq (yes,$(have-selinux))
bca718
 LDLIBS-makedb		:= -lselinux
bca718
 endif
bca718
 
bca718
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
bca718
-# This ensures they will load libc.so for needed symbols if loaded by
bca718
-# a statically-linked program that hasn't already loaded it.
bca718
 libnss-libc = $(common-objpfx)linkobj/libc.so
bca718
-$(services:%=$(objpfx)libnss_%.so): $(libnss-libc) \
bca718
-				    $(common-objpfx)libc_nonshared.a
bca718
+# Target-specific variable setting to link objects using deprecated
bca718
+# RPC interfaces with the version of libc.so that makes them available
bca718
+# for new links:
bca718
+$(services:%=$(objpfx)libnss_%.so): libc-for-link = $(libnss-libc)
bca718
 
bca718
 $(objpfx)libnss_db.so: $(objpfx)libnss_files.so
bca718
 
bca718
@@ -109,8 +108,7 @@ $(inst_vardbdir)/Makefile: db-Makefile $
bca718
 	$(do-install)
bca718
 
bca718
 libof-nss_test1 = extramodules
bca718
-$(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(common-objpfx)libc.so \
bca718
-			   $(common-objpfx)libc_nonshared.a
bca718
+$(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(link-libc-deps)
bca718
 	$(build-module)
bca718
 ifdef libnss_test1.so-version
bca718
 $(objpfx)/libnss_test1.so$(libnss_test1.so-version): $(objpfx)/libnss_test1.so
bca718
Index: glibc-2.17-c758a686/ports/sysdeps/arm/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/ports/sysdeps/arm/Makefile
bca718
+++ glibc-2.17-c758a686/ports/sysdeps/arm/Makefile
bca718
@@ -25,11 +25,6 @@ sysdep_routines += $(aeabi_constants) $(
bca718
 static-only-routines += $(aeabi_constants)
bca718
 endif
bca718
 
bca718
-# to pull in __aeabi_read_tp, needed for tls
bca718
-ifeq ($(subdir),malloc)
bca718
-$(objpfx)libmemusage.so: $(common-objpfx)libc_nonshared.a
bca718
-endif
bca718
-
bca718
 ifeq ($(subdir),gmon)
bca718
 sysdep_routines += arm-mcount
bca718
 endif
bca718
@@ -37,7 +32,3 @@ endif
bca718
 ifeq ($(subdir),debug)
bca718
 CFLAGS-backtrace.c += -funwind-tables
bca718
 endif
bca718
-
bca718
-ifeq ($(subdir),math)
bca718
-$(objpfx)libm.so: $(elfobjdir)/ld.so
bca718
-endif
bca718
Index: glibc-2.17-c758a686/resolv/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/resolv/Makefile
bca718
+++ glibc-2.17-c758a686/resolv/Makefile
bca718
@@ -88,23 +88,11 @@ CFLAGS-res_hconf.c = -fexceptions
bca718
 # The BIND code elicits some harmless warnings.
bca718
 +cflags += -Wno-strict-prototypes -Wno-write-strings
bca718
 
bca718
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
bca718
-# This ensures they will load libc.so for needed symbols if loaded by
bca718
-# a statically-linked program that hasn't already loaded it.
bca718
-$(objpfx)libresolv.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
bca718
-# Some hosts need '__stack_chk_guard', so pull in the definition from
bca718
-# ld.so if required.
bca718
-ifeq (yes,$(have-ssp))
bca718
-LDLIBS-resolv.so += $(as-needed) $(elfobjdir)/ld.so $(no-as-needed)
bca718
-endif
bca718
-
bca718
 # The DNS NSS modules needs the resolver.
bca718
-$(objpfx)libnss_dns.so: $(objpfx)libresolv.so $(common-objpfx)libc.so \
bca718
-			$(common-objpfx)libc_nonshared.a
bca718
+$(objpfx)libnss_dns.so: $(objpfx)libresolv.so
bca718
 
bca718
 # The asynchronous name lookup code needs the thread library.
bca718
-$(objpfx)libanl.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a \
bca718
-		    $(shared-thread-library)
bca718
+$(objpfx)libanl.so: $(shared-thread-library)
bca718
 
bca718
 $(objpfx)ga_test: $(objpfx)libanl.so $(shared-thread-library)
bca718
 
bca718
Index: glibc-2.17-c758a686/rt/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/rt/Makefile
bca718
+++ glibc-2.17-c758a686/rt/Makefile
bca718
@@ -64,12 +64,7 @@ CFLAGS-librt-cancellation.c = -fasynchro
bca718
 
bca718
 LDFLAGS-rt.so = -Wl,--enable-new-dtags,-z,nodelete
bca718
 
bca718
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
bca718
-# This ensures they will load libc.so for needed symbols if loaded by
bca718
-# a statically-linked program that hasn't already loaded it.
bca718
-$(objpfx)librt.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a \
bca718
-		   $(shared-thread-library) \
bca718
-		   $(elfobjdir)/ld.so
bca718
+$(objpfx)librt.so: $(shared-thread-library)
bca718
 
bca718
 ifeq (yes,$(build-shared))
bca718
 $(addprefix $(objpfx),$(tests)): $(objpfx)librt.so $(shared-thread-library)
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
@@ -136,7 +136,7 @@ $(objpfx)tst-fmtmsg.out: tst-fmtmsg.sh $
bca718
 $(objpfx)tst-putenv: $(objpfx)tst-putenvmod.so
bca718
 LDFLAGS-tst-putenv = $(no-as-needed)
bca718
 
bca718
-$(objpfx)tst-putenvmod.so: $(objpfx)tst-putenvmod.os
bca718
+$(objpfx)tst-putenvmod.so: $(objpfx)tst-putenvmod.os $(link-libc-deps)
bca718
 	$(build-module)
bca718
 libof-tst-putenvmod = extramodules
bca718
 
bca718
Index: glibc-2.17-c758a686/sysdeps/i386/fpu/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/sysdeps/i386/fpu/Makefile
bca718
+++ /dev/null
bca718
@@ -1,3 +0,0 @@
bca718
-ifeq ($(subdir),math)
bca718
-$(objpfx)libm.so: $(elfobjdir)/ld.so
bca718
-endif
bca718
Index: glibc-2.17-c758a686/sysdeps/powerpc/fpu/Makefile
bca718
===================================================================
bca718
--- glibc-2.17-c758a686.orig/sysdeps/powerpc/fpu/Makefile
bca718
+++ glibc-2.17-c758a686/sysdeps/powerpc/fpu/Makefile
bca718
@@ -2,8 +2,6 @@ ifeq ($(subdir),math)
bca718
 libm-support += fenv_const fe_nomask fe_mask t_sqrt
bca718
 libm-tests += test-powerpc-snan
bca718
 
bca718
-# libm needs ld.so to access dl_hwcap
bca718
-$(objpfx)libm.so: $(elfobjdir)/ld.so
bca718
 endif
bca718
 
bca718
 ifeq ($(subdir),stdlib)