aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-04-01 09:07:31 +0000
committerRoland McGrath <roland@gnu.org>1995-04-01 09:07:31 +0000
commit193ce8dcd6c1eea5c68e6d4d8db2002c0085925b (patch)
tree92e499fa24dc5292e2bb3d2be2d473c1bf3e5b52
parent2f8033d6067fff3e7d77bb2174a9564bd7199cea (diff)
downloadglibc-193ce8dcd6c1eea5c68e6d4d8db2002c0085925b.zip
glibc-193ce8dcd6c1eea5c68e6d4d8db2002c0085925b.tar.gz
glibc-193ce8dcd6c1eea5c68e6d4d8db2002c0085925b.tar.bz2
* Makerules (lib%.so: lib%_pic.a): Pass -L options for subdir andcvs/libc-950402
parent objdirs. * extra-lib.mk (object-suffixes-$(lib)): New variable, produced by filtering out $($(lib)-inhibit-o); use that instead of $(object-suffixes) in all the other variables.
-rw-r--r--ChangeLog7
-rw-r--r--Makerules4
-rw-r--r--extra-lib.mk12
3 files changed, 17 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 9b3e48a..4b5fb9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
Sat Apr 1 00:08:06 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
+ * Makerules (lib%.so: lib%_pic.a): Pass -L options for subdir and
+ parent objdirs.
+
+ * extra-lib.mk (object-suffixes-$(lib)): New variable, produced by
+ filtering out $($(lib)-inhibit-o); use that instead of
+ $(object-suffixes) in all the other variables.
+
* locale/loadlocale.c (_nl_load_locale) [MAP_FILE]: Define it zero
if undefined.
diff --git a/Makerules b/Makerules
index 2b4af3e..f3fdb37 100644
--- a/Makerules
+++ b/Makerules
@@ -341,7 +341,9 @@ ifeq (yes,$(build-shared))
# $(LDLIBS-%.so) may contain -l switches to generate run-time dependencies
# on other shared objects.
lib%.so: lib%_pic.a
- $(LINK.o) -shared -o $@ -Wl,--whole-archive $< $(LDLIBS-$*.so)
+ $(LINK.o) -shared -o $@ -Wl,--whole-archive $< \
+ -L$(firstword $(objdir) .) -L$(common-objpfx:%/=%) \
+ $(LDLIBS-$*.so)
endif
libobjs: $(foreach o,$(object-suffixes),\
diff --git a/extra-lib.mk b/extra-lib.mk
index 353b576..436170e 100644
--- a/extra-lib.mk
+++ b/extra-lib.mk
@@ -8,13 +8,15 @@
lib := $(firstword $(extra-libs-left))
extra-libs-left := $(filter-out $(lib),$(extra-libs-left))
+object-suffixes-$(lib) := $(filter-out $($(lib)-inhibit-o),$(object-suffixes))
+
# Add each flavor of library to the lists of things to build and install.
-install-lib += $(foreach o,$(object-suffixes),$(lib:lib%=$(libtype$o)))
-extra-objs += $(foreach o,$(object-suffixes),$($(lib)-routines:=$o))
-alltypes-$(lib) = $(foreach o,$(object-suffixes),\
+install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
+extra-objs += $(foreach o,$(object-suffixes-$(lib)),$($(lib)-routines:=$o))
+alltypes-$(lib) = $(foreach o,$(object-suffixes-$(lib)),\
$(objpfx)$(patsubst %,$(libtype$o),\
$(lib:lib%=%)))
-ifeq (yes,$(build-shared))
+ifneq (,$(filter .so,$(object-suffixes-$(lib))))
alltypes-$(lib) += $(objpfx)$(lib).so
endif
@@ -25,5 +27,5 @@ define o-iterator-doit
$(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
$($(lib)-routines:%=$(objpfx)%$o); $$(build-extra-lib)
endef
-object-suffixes-left := $(filter-out $($(lib)-inhibit-o),$(object-suffixes))
+object-suffixes-left = $(object-suffixes-$(lib))
include $(o-iterator)