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]

Re: [patch] Fix linking ldconfig when --enable-static-nss


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
>
>


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