OSDN Git Service

Create libpthread_nonshared.a
authorPeter S. Mazinger <ps.m@gmx.net>
Thu, 9 Mar 2006 12:10:57 +0000 (12:10 -0000)
committerPeter S. Mazinger <ps.m@gmx.net>
Thu, 9 Mar 2006 12:10:57 +0000 (12:10 -0000)
Makefile.in
libpthread/linuxthreads/Makefile.in

index 3a75f22..1e96351 100644 (file)
@@ -221,6 +221,16 @@ ifeq ($(HAVE_SHARED),y)
                        -e 's:$(UCLIBC_LDSO):$(RUNTIME_PREFIX)lib/$(UCLIBC_LDSO):' \
                        $(top_builddir)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
        fi
+ifeq ($(UCLIBC_HAS_THREADS),y)
+ifneq ($(LINUXTHREADS_OLD),y)
+       if [ -f $(top_builddir)lib/libpthread.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) ] ; then \
+               $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
+               cp $(top_srcdir)extra/scripts/format.lds $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
+               echo "GROUP ( $(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) $(DEVEL_PREFIX)lib/libpthread_nonshared.a )" \
+                       >> $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
+       fi
+endif
+endif
 ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
        $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)libthread_db.so.1 \
                $(PREFIX)$(DEVEL_PREFIX)lib/libthread_db.so
index 66f5ac5..a5f52ec 100644 (file)
@@ -70,6 +70,8 @@ libc-shared-y += $(libpthread_libc_OBJ:.o=.oS)
 
 libpthread-static-y += $(patsubst %,$(libpthread_OUT)/%.o,$(libpthread_static_SRC))
 
+libpthread-nonshared-y += $(patsubst %,$(libpthread_OUT)/%.oS,$(libpthread_static_SRC))
+
 ifeq ($(DOPIC),y)
 libpthread-a-y  += $(libpthread_OBJ:.o=.os) $(libpthread-static-y:.o=.os)
 else
@@ -84,12 +86,15 @@ headers-$(UCLIBC_HAS_THREADS) += linuxthreads_headers
 headers_clean-y += linuxthreads_headers_clean
 
 #ifeq ($(DOMULTI),n)
-$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread_so.a $(libc)
+$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread_so.a $(libc) $(top_builddir)lib/libpthread_nonshared.a
        $(call link.so,$(libpthread_FULL_NAME),$(MAJOR_VERSION))
 #else
-#$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread.oS | $(libc)
+#$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread.oS | $(libc) $(top_builddir)lib/libpthread_nonshared.a
 #      $(call linkm.so,$(libpthread_FULL_NAME),$(MAJOR_VERSION))
 #endif
+       $(Q)$(RM) $@
+       $(Q)cp $(top_srcdir)extra/scripts/format.lds $@
+       $(Q)echo "GROUP ( $(notdir $@).$(MAJOR_VERSION) libpthread_nonshared.a )" >> $@
 
 $(libpthread_OUT)/libpthread_so.a: $(libpthread-so-y)
        $(Q)$(RM) $@