+2012-03-23 Daniel Jacobowitz <dmj@google.com>
+ Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ [BZ #6528]
+ * grp/Makefile (otherlibs): Don't set it.
+ * inet/Makefile (otherlibs): Likewise.
+ * login/Makefile (otherlibs): Likewise.
+ * nscd/Makefile (otherlibs): Likewise.
+ * posix/Makefile (otherlibs): Likewise.
+ * pwd/Makefile (otherlibs): Likewise.
+ * rt/Makefile (otherlibs): Likewise.
+ * sunrpc/Makefile (otherlibs): Likewise.
+ * nss/Makefile (otherlibs): Likewise.
+ Add libnss_files to routines and static-only-routines.
+ ($(objpfx)getent): Remove rule.
+ * resolv/Makefile: Add libnss_dns and libresolv to routines and
+ static-only-routines.
+
2012-03-22 Joseph Myers <joseph@codesourcery.com>
[BZ #13892]
include ../Rules
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a
-endif
-
-
ifeq ($(have-thread-library),yes)
CFLAGS-getgrgid_r.c = -DUSE_NSCD=1 -fexceptions
ifeq ($(build-static-nss),yes)
CFLAGS += -DSTATIC_NSS
endif
-
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a
-endif
CFLAGS-getpt.c = -fexceptions
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a $(common-objpfx)libc.a
-endif
-
ifeq (yesyes,$(have-fpie)$(build-shared))
pt_chown-cflags += $(pie-ccflag)
endif
endif
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a
-endif
-
all-nscd-modules := $(nscd-modules) selinux
ifeq (yes,$(have-selinux))
ifeq (yes,$(have-libaudit))
include ../Makeconfig
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a
-endif
-
# Specify rules for the nss_* modules. We have some services.
services := files db
install-others += $(inst_vardbdir)/Makefile
-# Build static module if requested
-ifneq ($(build-static-nss),yes)
+# Build static module into libc if requested
libnss_files-inhibit-o = $(filter-out .os,$(object-suffixes))
libnss_db-inhibit-o = $(filter-out .os,$(object-suffixes))
+ifeq ($(build-static-nss),yes)
+routines += $(libnss_files-routines)
+static-only-routines += $(libnss_files-routines)
endif
include ../Rules
-
-ifeq (yes,$(build-static-nss))
-$(objpfx)getent: $(objpfx)libnss_files.a
-endif
-
ifeq (yes,$(have-selinux))
LDLIBS-makedb := -lselinux
endif
include ../Rules
-ifeq (yes,$(build-static-nss))
-# We need it for "make check" only. We can skip them if they haven't
-# been built yet during "make".
-otherlibs += $(wildcard $(nssobjdir)/libnss_files.a \
- $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a)
-endif
-
ifeq (no,$(cross-compiling))
# globtest and wordexp-test currently only works with shared libraries
ifeq (yes,$(build-shared))
CFLAGS-fgetpwent_r.c = -D_IO_MTSAFE_IO
endif
-
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a
-endif
vpath %.c nss_dns
libnss_dns-routines := dns-host dns-network dns-canon
-ifneq ($(build-static-nss),yes)
libnss_dns-inhibit-o = $(filter-out .os,$(object-suffixes))
+ifeq ($(build-static-nss),yes)
+routines += $(libnss_dns-routines) $(libresolv-routines)
+static-only-routines += $(libnss_dns-routines) $(libresolv-routines)
endif
ifeq (yesyes,$(build-shared)$(have-thread-library))
endif
tst-mqueue7-ARGS = -- $(built-program-cmd)
-
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a
-endif
xtests += thrsvc
endif
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a
-endif
-
ifeq (no,$(cross-compiling))
# We can only build this library if we can run the rpcgen we build.
headers += $(rpcsvc:%.x=rpcsvc/%.h)