[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] Fwd: libc-nonshared dependency

This patch has been rejected by glibc.  ok for eglibc?

-------- Original Message --------
Subject: libc-nonshared dependency
Date: Tue, 10 May 2011 08:10:20 +0100
From: Nathan Sidwell <nathan@xxxxxxxxxxxxxxxx>
Organization: CodeSourcery
To: libc-alpha@xxxxxxxxxxxxxx

This patch fixes a dependency problem exposed by building glibc with arm TLS
descriptors -- not just support for descriptors, using the descriptors
themselves.  Now that I have posted the gcc patch to use tls descriptors
(http://gcc.gnu.org/ml/gcc-patches/2011-05/msg00708.html), this possibility arises.

The tls descriptors use __aeabi_read_tp directly, a nonshared function in
libc-nonshared.a. Arm-style tls uses __tls_get_addr, exposed by libc.so.  This
change causes a glibc build failure of libmemusage.so, as that doesn't mention
libc-nonshared.a.  This patch fixes that.

For non-arm non-tlsdesc ports, this change should have no effect, as of course
none of them can be referencing a nonshared function from libmemusage.so --
otherwise they'd also fail to build.

tested for arm-none-linux-gnueabi with tlsdescriptors both enabled and disabled
by default


Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery

2011-05-11  Nathan Sidwell  <nathan@xxxxxxxxxxxxxxxx>

	* malloc/Makefile (libmemusage.so): Add libc_nonshared.a dependency.

Index: malloc/Makefile
--- malloc/Makefile	(revision 13748)
+++ malloc/Makefile	(working copy)
@@ -159,7 +159,8 @@ $(objpfx)memusage: memusage.sh
 # The implementation uses `dlsym'
-$(objpfx)libmemusage.so: $(common-objpfx)dlfcn/libdl.so $(elfobjdir)/ld.so
+$(objpfx)libmemusage.so: $(common-objpfx)dlfcn/libdl.so $(elfobjdir)/ld.so \
+			$(common-objpfx)libc_nonshared.a
 # Extra dependencies
 $(foreach o,$(all-object-suffixes),$(objpfx)malloc$(o)): arena.c hooks.c