Use THREAD_GETMEM and THREAD_SETMEM to access the elements of the
[kopensolaris-gnu/glibc.git] / extra-lib.mk
index 283da06..87d4fa3 100644 (file)
@@ -25,16 +25,19 @@ alltypes-$(lib) := $(foreach o,$(object-suffixes-$(lib)),\
                             $(objpfx)$(patsubst %,$(libtype$o),\
                             $(lib:lib%=%)))
 
-ifeq (,$($(lib)-no-lib-dep))
+ifeq (,$(filter $(lib),$(extra-libs-others)))
 lib-noranlib: $(alltypes-$(lib))
+ifeq (yes,$(build-shared))
+lib-noranlib: $(objpfx)$(lib).so$($(lib).so-version)
+endif
 else
 others: $(alltypes-$(lib))
 endif
 
 # The linked shared library is never a dependent of lib-noranlib,
 # because linking it will depend on libc.so already being built.
-ifneq (,$(filter .so,$(object-suffixes-$(lib))))
-others: $(objpfx)$(lib).so
+ifneq (,$(filter .os,$(object-suffixes-$(lib))))
+others: $(objpfx)$(lib).so$($(lib).so-version)
 endif
 
 
@@ -46,4 +49,12 @@ endef
 object-suffixes-left = $(object-suffixes-$(lib))
 include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-$(lib)))
 
+ifeq ($(versioning),yes)
+# Add the version script to the dependencies of the shared library.
+$(objpfx)$(lib).so: $(firstword $($(lib)-map) \
+                               $(addprefix $(common-objpfx), \
+                                           $(filter $(lib).map, \
+                                                    $(version-maps))))
+endif
+
 endif