This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Fix linking ldconfig when --enable-static-nss (with ChangeLog)
On Wed, Jan 13, 2010 at 10:20 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> can you double check with:
> http://sourceware.org/bugzilla/show_bug.cgi?id=631
That patch also works.
> the patch there seems to be more "complete"
It is slightly more complicated, and it doesn't appear to add anything
(that I can see, but I don't understand the makefile setup well).
How about "middle ground" below?
Thanks,
--
Paul Pluzhnikov
2010-01-13 Paul Pluzhnikov <ppluzhnikov@google.com>
* elf/Makefile: Fix static NSS linkage.
diff --git a/elf/Makefile b/elf/Makefile
index d57c7fe..8bb7c7a 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -160,6 +160,13 @@ install-rootsbin += ldconfig
ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
extra-objs += $(ldconfig-modules:=.o)
+ifeq (yes,$(build-static-nss))
+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
+static-gnulib += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
+ $(resolvobjdir)/libresolv.a
+endif
+
# To find xmalloc.c and xstrdup.c
vpath %.c ../locale/programs