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
- From: Ryan Arnold <ryan dot arnold at gmail dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 12 Jan 2010 20:06:07 -0600
- Subject: Re: [patch] Fix linking ldconfig when --enable-static-nss
- References: <20100113013211.E309976A5E@ppluzhnikov.mtv.corp.google.com>
This accidentally was allowed through moderation. Paul, please follow
these guidelines for information on creating a proper ChangeLog and
resubmit.
http://sources.redhat.com/glibc/wiki/Contribution%20checklist
On Tue, Jan 12, 2010 at 7:32 PM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
> Greetings,
>
> 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.
>
> Thanks,
> --
> Paul Pluzhnikov
>
> 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
>
>