This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Fix linking ldconfig when --enable-static-nss (with ChangeLog)


Greetings,

Resubmitting with proper ChangeLog. Sorry about missing it first time around.

Configuring glibc with --enable-static-nss causes elf/ldconfig to fail to
link with:

/home/glibc-git/build/libc.a(nsswitch.o):(.data+0x8): undefined reference to `_nss_files_getaliasent_r'
/home/glibc-git/build/libc.a(nsswitch.o):(.data+0x18): undefined reference to `_nss_files_endaliasent'
... etc. ...

(AFAICT, this has been broken since at least glibc-2.3.6)

Attached patchlet fixes that.
(Google has blanket Copyright assignment to FSF.)

Thanks,
--
Paul Pluzhnikov


2010-01-12  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* elf/Makefile: Fix static NSS linkage.


diff --git a/elf/Makefile b/elf/Makefile
index d57c7fe..1a8d755 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -160,6 +160,11 @@ install-rootsbin += ldconfig
 ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
 extra-objs	+= $(ldconfig-modules:=.o)
 
+ifeq (yes,$(build-static-nss))
+static-gnulib += $(objdir)/nss/libnss_files.a $(objdir)/resolv/libnss_dns.a \
+	$(objdir)/resolv/libresolv.a
+endif
+
 # To find xmalloc.c and xstrdup.c
 vpath %.c ../locale/programs
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]