2002-09-10 Roland McGrath <roland@redhat.com>
authorroland <roland>
Wed, 11 Sep 2002 20:11:45 +0000 (20:11 +0000)
committerroland <roland>
Wed, 11 Sep 2002 20:11:45 +0000 (20:11 +0000)
* nscd/Makefile (CPPFLAGS-nscd, CPPFLAGS-nscd_conf, CPPFLAGS-dbg_log)
(CPPFLAGS-connections, CPPFLAGS-hstcache): Variables removed.
Instead, catch all of $(nscd-modules) via cppflags-iterator.mk.

cppflags-iterator.mk
nscd/Makefile

index 5f3bcc0..421ba7d 100644 (file)
@@ -5,3 +5,14 @@ cpp-src := $(firstword $(cpp-srcs-left))
 cpp-srcs-left := $(filter-out $(cpp-src),$(cpp-srcs-left))
 
 CPPFLAGS-$(cpp-src) = -DNOT_IN_libc -DIS_IN_$(lib)
+
+ifneq ($(lib),rtld)
+ifneq (,$(filter -ftls-model=%,$(CFLAGS-.os)))
+CFLAGS-$(cpp-src:.c=.os) += -ftls-model=global-dynamic
+endif
+ifeq (,$(filter lib%,$(lib)))
+ifneq (,$(filter -ftls-model=%,$(CFLAGS-.o)))
+CFLAGS-$(cpp-src:.c=.o) += -ftls-model=initial-exec
+endif
+endif
+endif
index 434cf4d..0bd320e 100644 (file)
@@ -53,11 +53,10 @@ distribute := nscd.h nscd-client.h dbg_log.h \
 
 include ../Rules
 
-CPPFLAGS-nscd = -DNOT_IN_libc
-CPPFLAGS-nscd_conf = -DNOT_IN_libc
-CPPFLAGS-dbg_log = -DNOT_IN_libc
-CPPFLAGS-connections = -DNOT_IN_libc
-CPPFLAGS-hstcache = -DNOT_IN_libc
+# This makes sure -DNOT_IN_libc is passed for all these modules.
+cpp-srcs-left := $(nscd-modules:=.c)
+lib := nscd
+include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
 
 $(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o)
 $(objpfx)nscd_nischeck: $(objpfx)nscd_nischeck.o