summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-11-22 21:45:24 (GMT)
committerPeter S. Mazinger <ps.m@gmx.net>2005-11-22 21:45:24 (GMT)
commit72c0f6a2d644754439d57acd2a90108d2ec2c9fe (patch)
treee3775d451c00797b522da9292247a97067ecc7a4
parent5073e39d0a59b88dfadbe41b53ffd7cc3689e032 (diff)
Depedencies corrected (less make oldconfig/headers), rerunning make remakes only headers
-rw-r--r--Makefile.in7
-rw-r--r--Makerules53
-rw-r--r--Rules.mak3
-rw-r--r--ldso/ldso/Makefile.in5
-rw-r--r--ldso/libdl/Makefile.in15
-rw-r--r--libc/Makefile.in30
-rw-r--r--libcrypt/Makefile.in18
-rw-r--r--libintl/Makefile.in18
-rw-r--r--libm/Makefile.in18
-rw-r--r--libnsl/Makefile.in18
-rw-r--r--libpthread/linuxthreads.old/Makefile.in20
-rw-r--r--libpthread/linuxthreads.old_db/Makefile.in18
-rw-r--r--libresolv/Makefile.in18
-rw-r--r--librt/Makefile.in18
-rw-r--r--libutil/Makefile.in18
15 files changed, 147 insertions, 130 deletions
diff --git a/Makefile.in b/Makefile.in
index ec999cb..c0f00f5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -51,7 +51,10 @@ export header_extra_args =
else
export header_extra_args = -n
endif
-headers: include/bits/uClibc_config.h
+headers: include/bits/sysnum.h
+
+include/bits/sysnum.h: include/bits/uClibc_config.h
+ $(MAKE) headers-y
@$(SHELL_SET_X); \
$(top_srcdir)extra/scripts/fix_includes.sh \
-k $(KERNEL_SOURCE) -t $(TARGET_ARCH) \
@@ -92,7 +95,6 @@ headers: include/bits/uClibc_config.h
$(RM) include/bits/sysnum.h; \
mv -f include/bits/sysnum.h.new include/bits/sysnum.h; \
fi
- $(MAKE) headers-y
# Command used to download source code
WGET:=wget --passive-ftp
@@ -316,7 +318,6 @@ defconfig: extra/config/conf
clean:
@$(RM) -r lib include/bits
$(RM) lib*/*.a ldso/*/*.a libpthread/*/*.a
- $(RM) libc/misc/internals/interp.c
$(RM) include/fpu_control.h include/dl-osinfo.h
$(MAKE) -C extra/locale clean
$(MAKE) headers_clean-y
diff --git a/Makerules b/Makerules
index 45a79e6..48831b9 100644
--- a/Makerules
+++ b/Makerules
@@ -8,34 +8,20 @@
ifeq ($(HAVE_SHARED),y)
.LIBPATTERNS: "lib%.so"
libs: $(lib-so-y) $(lib-a-y)
-objs: shared_objs ar_objs
+objs: $(sort $(shared_objs) $(ar_objs))
else
.LIBPATTERNS: "lib%.a"
libs: $(lib-a-y)
-objs: ar_objs
+objs: $(ar_objs)
endif
-shared_objs-y = $(lduClibc-so-y) $(libc-so-y) $(libc-nonshared-y) $(libdl-so-y)
-shared_objs-y += $(libcrypt-so-y) $(libintl-so-y) $(libm-so-y) $(libnsl-so-y) $(libpthread-so-y)
-shared_objs-y += $(libresolv-so-y) $(librt-so-y) $(libutil-so-y)
-ar_objs-y = $(libc-a-y) $(libcrypt-a-y) $(libintl-a-y) $(libm-a-y) $(libnsl-a-y)
-ar_objs-y += $(libpthread-a-y) $(libresolv-a-y) $(librt-a-y) $(libutil-a-y)
-
-shared_objs: $(shared_objs-y)
-ifeq ($(DOPIC),y)
-ar_objs: $(ar_objs-y:.o=.os)
-else
-ar_objs: $(ar_objs-y)
-endif
+shared_objs = $(lduClibc-so-y) $(libc-so-y) $(libc-nonshared-y) $(libdl-so-y)
+shared_objs += $(libcrypt-so-y) $(libintl-so-y) $(libm-so-y) $(libnsl-so-y) $(libpthread-so-y)
+shared_objs += $(libresolv-so-y) $(librt-so-y) $(libutil-so-y)
+ar_objs = $(libc-a-y) $(libcrypt-a-y) $(libintl-a-y) $(libm-a-y) $(libnsl-a-y)
+ar_objs += $(libpthread-a-y) $(libresolv-a-y) $(librt-a-y) $(libutil-a-y)
headers-y: $(headers-y)
-interp-y: $(interp)
-pre-y: $(interp) $(ld-uClibc-y)
-libc-y: pre-y $(libc) $(crt-y) $(top_builddir)lib/$(NONSHARED_LIBNAME)
-ldso-dep =
-libc-so-dep = $(top_builddir)lib/libc.so $(interp)
-lib-so-y = $(libc-so-dep) $(lib-so-y)
-lib-a-y = $(crt-y) $(lib-a-y)
ifneq ($(findstring s,$(MAKEFLAGS)),)
DISP := sil
@@ -124,6 +110,23 @@ CFLAGS-.oS+=$(PICFLAG) -DSHARED
%.E: %.c ; $(compile.E)
%.E: %.S ; $(compile.E)
+$(top_builddir)lib/interp.c:
+ $(Q)$(INSTALL) -d $(dir $@)
+ $(Q)echo "/* Force shared libraries to know about the correct library loader */" > $@
+ $(Q)echo "#include <features.h>" >> $@
+ $(Q)echo "#ifdef __HAVE_ELF__" >> $@
+ $(Q)echo "const char __dl_ldso__[] __attribute__ ((section " \
+ "(\".interp\"))) =\""$(SHARED_LIB_LOADER_PREFIX)/$(UCLIBC_LDSO)"\";" >> $@
+ $(Q)echo "#endif" >> $@
+
+$(interp): $(top_builddir)lib/interp.c
+ $(compile.c)
+ @$(disp_strip)
+ $(Q)$(STRIPTOOL) -x -R .note -R .comment $@
+
+$(ldso):
+ cd $(top_builddir); $(MAKE) $(ldso:.$(MAJOR_VERSION)=)
+
#ifeq ($(HAVE_ELF),y)
CRT=crt1
#else
@@ -151,16 +154,12 @@ $(top_builddir)lib/S$(CRT).o: $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(C
CTOR_TARGETS=$(top_builddir)lib/crti.o $(top_builddir)lib/crtn.o
ifeq ($(UCLIBC_CTOR_DTOR),y)
-$(top_builddir)lib/crti.o: $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/crti.S
- $(Q)$(INSTALL) -d $(dir $@)
- $(compile.S) $(PICFLAG) $(SSP_DISABLE_FLAGS)
-
-$(top_builddir)lib/crtn.o: $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/crtn.S
+$(CTOR_TARGETS): $(top_builddir)lib/%.o : $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/%.S
$(Q)$(INSTALL) -d $(dir $@)
$(compile.S) $(PICFLAG) $(SSP_DISABLE_FLAGS)
else
$(CTOR_TARGETS):
- $(Q)$(INSTALL) -d $(top_builddir)lib
+ $(Q)$(INSTALL) -d $(dir $@)
$(do_ar)
endif
diff --git a/Rules.mak b/Rules.mak
index 4ffe17d..1cd4dc5 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -61,7 +61,8 @@ SHARED_MAJORNAME := $(LIBC).so.$(MAJOR_VERSION)
UCLIBC_LDSO := ld-uClibc.so.$(MAJOR_VERSION)
NONSHARED_LIBNAME := uclibc_nonshared.a
libc := $(top_builddir)lib/$(LIBC).so
-interp := $(top_builddir)libc/misc/internals/interp.os
+interp := $(top_builddir)lib/interp.os
+ldso := $(top_builddir)lib/$(UCLIBC_LDSO)
#LIBS :=$(interp) -L$(top_builddir)lib -lc
LIBS := $(interp) -L$(top_builddir)lib $(libc)
diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in
index 8e6c432..3396e7c 100644
--- a/ldso/ldso/Makefile.in
+++ b/ldso/ldso/Makefile.in
@@ -54,11 +54,10 @@ ld-uClibc_OBJS := $(ld-uClibc_COBJ) $(ld-uClibc_SOBJ)
ld-uClibc-so-y := $(ld-uClibc_OBJS:.o=.os)
-#lib-so-y := $(top_builddir)lib/$(patsubst %.$(MAJOR_VERSION),%,$(UCLIBC_LDSO))
-ld-uClibc-y := $(top_builddir)lib/$(patsubst %.$(MAJOR_VERSION),%,$(UCLIBC_LDSO))
+lib-so-y += $(ldso)
objclean-y += ld-uClibc_clean
-$(top_builddir)lib/$(patsubst %.$(MAJOR_VERSION),%,$(UCLIBC_LDSO)): $(ld-uClibc_OUT)/ld-uClibc_so.a
+$(ldso:.$(MAJOR_VERSION)=): $(ld-uClibc_OUT)/ld-uClibc_so.a
$(call link.so,$(ldso_FULL_NAME),$(MAJOR_VERSION))
$(ld-uClibc_OUT)/ld-uClibc_so.a: $(ld-uClibc-so-y)
diff --git a/ldso/libdl/Makefile.in b/ldso/libdl/Makefile.in
index f90cee0..2458324 100644
--- a/ldso/libdl/Makefile.in
+++ b/ldso/libdl/Makefile.in
@@ -20,7 +20,7 @@ CFLAGS-libdl.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
LDFLAGS-libdl.so := $(LDFLAGS) -fini dl_cleanup
-LIBS-libdl.so := $(LIBS) $(top_builddir)lib/$(UCLIBC_LDSO)
+LIBS-libdl.so := $(LIBS) $(ldso)
libdl_FULL_NAME := libdl-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
@@ -33,13 +33,16 @@ libdl_OBJ := $(patsubst $(libdl_DIR)/%.c,$(libdl_OUT)/%.o,$(libdl_SRC))
resolve := $(top_builddir)ldso/ldso/$(TARGET_ARCH)/resolve.o
libdl-a-y := $(libdl_OBJ) $(resolve)
+ifeq ($(DOPIC),y)
+libdl-a-y := $(libdl-a-y:.o=.os)
+endif
libdl-so-y := $(libdl_OUT)/libdl.oS
lib-a-$(HAVE_SHARED) += $(top_builddir)lib/libdl.a
lib-so-y += $(top_builddir)lib/libdl.so
objclean-y += libdl_clean
-$(top_builddir)lib/libdl.so: $(libdl_OUT)/libdl_so.a $(ld-uClibc-y) $(libc-so-dep)
+$(top_builddir)lib/libdl.so: $(libdl_OUT)/libdl_so.a $(libc)
$(call link.so,$(libdl_FULL_NAME),$(MAJOR_VERSION))
$(libdl_OUT)/libdl_so.a: $(libdl-so-y)
@@ -47,16 +50,10 @@ $(libdl_OUT)/libdl_so.a: $(libdl-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libdl.a: $(libdl-a-y:.o=.os)
-else
-$(top_builddir)lib/libdl.a: $(libdl-a-y) $(libdl_OUT)/libdl_so.a
-endif
+$(top_builddir)lib/libdl.a: $(libdl-a-y)
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
-ifneq ($(DOPIC),y)
$(do_strip)
-endif
$(do_ar)
libdl_clean:
diff --git a/libc/Makefile.in b/libc/Makefile.in
index 83a5a93..ae506f8 100644
--- a/libc/Makefile.in
+++ b/libc/Makefile.in
@@ -15,7 +15,7 @@ endif
LDFLAGS-libc.so := $(LDFLAGS) $(VERSION_SCRIPT) -init __uClibc_init
-LIBS-libc.so := $(interp) $(top_builddir)lib/$(UCLIBC_LDSO)
+LIBS-libc.so := $(interp) $(ldso)
# we have SHARED_MAJORNAME=libc.so.$(MAJOR_VERSION) defined in Rules.mak
libc_FULL_NAME := libuClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
@@ -39,13 +39,17 @@ include $(libc_DIR)/unistd/Makefile.in
libc-a-y += $(libc-static-y)
libc-so-y += $(libc-shared-y)
+ifeq ($(DOPIC),y)
+libc-a-y := $(libc-a-y:.o=.os)
+endif
+
libc-nomulti-y += $(libc-shared-y)
-lib-a-y += $(top_builddir)lib/libc.a $(crt-y)
-lib-so-y += libc-y $(top_builddir)lib/$(NONSHARED_LIBNAME) $(crt-y)
+lib-a-y += $(top_builddir)lib/libc.a
+lib-so-y += $(libc)
objclean-y += libc_clean
-$(top_builddir)lib/libc.so: $(libc_OUT)/libc_so.a $(interp)
+$(libc): $(libc_OUT)/libc_so.a $(LIBS-libc.so)
$(call link.so,$(libc_FULL_NAME),$(MAJOR_VERSION))
$(Q)$(RM) $@
$(Q)echo "/* GNU ld script" > $@
@@ -57,26 +61,20 @@ else
$(Q)echo "GROUP ( $(SHARED_MAJORNAME) $(NONSHARED_LIBNAME) $(ASNEEDED) )" >> $@
endif
-$(libc_OUT)/libc_so.a: $(libc-so-y)
+$(libc_OUT)/libc_so.a: $(libc-so-y) | $(top_builddir)lib/libc.a $(top_builddir)lib/$(NONSHARED_LIBNAME)
$(Q)$(RM) $@
- $(do_strip)
- $(do_ar)
-
ifeq ($(DOPIC),y)
-$(top_builddir)lib/libc.a: $(libc-a-y:.o=.os)
+ $(Q)$(STRIPTOOL) $(STRIP_FLAGS) $(libc-shared-y)
else
-$(top_builddir)lib/libc.a: $(libc-a-y) $(libc_OUT)/libc_so.a
+ $(do_strip)
endif
+ $(do_ar)
+
+$(top_builddir)lib/libc.a: $(libc-a-y) | $(crt-y)
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
-ifeq ($(DOPIC),y)
- $(Q)$(STRIPTOOL) $(STRIP_FLAGS) $(filter-out $(libc-so-y),$^)
-else
$(do_strip)
-endif
$(do_ar)
-$(top_builddir)lib/$(NONSHARED_LIBNAME): $(top_builddir)lib/libc.a
-
libc_clean:
$(RM) $(libc_OUT)/*.{o,os,a}
diff --git a/libcrypt/Makefile.in b/libcrypt/Makefile.in
index ed65f0f..7c8b458 100644
--- a/libcrypt/Makefile.in
+++ b/libcrypt/Makefile.in
@@ -20,7 +20,11 @@ libcrypt_OUT := $(top_builddir)libcrypt
libcrypt_SRC := $(wildcard $(libcrypt_DIR)/*.c)
libcrypt_OBJ := $(patsubst $(libcrypt_DIR)/%.c,$(libcrypt_OUT)/%.o,$(libcrypt_SRC))
+ifeq ($(DOPIC),y)
+libcrypt-a-y := $(libcrypt_OBJ:.o=.os)
+else
libcrypt-a-y := $(libcrypt_OBJ)
+endif
libcrypt-so-y := $(libcrypt_OBJ:.o=.os)
libcrypt-multi-y := $(libcrypt_SRC)
@@ -29,7 +33,11 @@ lib-a-y += $(top_builddir)lib/libcrypt.a
lib-so-y += $(top_builddir)lib/libcrypt.so
objclean-y += libcrypt_clean
-$(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt_so.a $(libc-so-dep)
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libcrypt.so: $(top_builddir)lib/libcrypt.a $(libc)
+else
+$(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt_so.a $(libc)
+endif
$(call link.so,$(libcrypt_FULL_NAME),$(MAJOR_VERSION))
$(libcrypt_OUT)/libcrypt_so.a: $(libcrypt-so-y)
@@ -37,16 +45,10 @@ $(libcrypt_OUT)/libcrypt_so.a: $(libcrypt-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libcrypt.a: $(libcrypt-a-y:.o=.os)
-else
-$(top_builddir)lib/libcrypt.a: $(libcrypt-a-y) $(libcrypt_OUT)/libcrypt_so.a
-endif
+$(top_builddir)lib/libcrypt.a: $(libcrypt-a-y)
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
-ifneq ($(DOPIC),y)
$(do_strip)
-endif
$(do_ar)
libcrypt_clean:
diff --git a/libintl/Makefile.in b/libintl/Makefile.in
index d27cd81..0afd050 100644
--- a/libintl/Makefile.in
+++ b/libintl/Makefile.in
@@ -27,7 +27,11 @@ libintl_MOBJ := $(patsubst %.o,$(libintl_OUT)/%.o,$(MOBJ))
libintl_DEF := $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libintl_MOBJ))))
+ifeq ($(DOPIC),y)
+libintl-a-y := $(libintl_MOBJ:.o=.os)
+else
libintl-a-y := $(libintl_MOBJ)
+endif
libintl-so-y := $(libintl_MOBJ:.o=.os)
CFLAGS-multi-y := $(libintl_DEF)
@@ -37,7 +41,11 @@ lib-a-$(UCLIBC_HAS_GETTEXT_AWARENESS) += $(top_builddir)lib/libintl.a
lib-so-$(UCLIBC_HAS_GETTEXT_AWARENESS) += $(top_builddir)lib/libintl.so
objclean-y += libintl_clean
-$(top_builddir)lib/libintl.so: $(libintl_OUT)/libintl_so.a $(libc-so-dep)
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libintl.so: $(top_builddir)lib/libintl.a $(libc)
+else
+$(top_builddir)lib/libintl.so: $(libintl_OUT)/libintl_so.a $(libc)
+endif
$(call link.so,$(libintl_FULL_NAME),$(MAJOR_VERSION))
$(libintl_OUT)/libintl_so.a: $(libintl-so-y)
@@ -45,16 +53,10 @@ $(libintl_OUT)/libintl_so.a: $(libintl-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libintl.a: $(libintl-a-y:.o=.os)
-else
-$(top_builddir)lib/libintl.a: $(libintl-a-y) $(libintl_OUT)/libintl_so.a
-endif
+$(top_builddir)lib/libintl.a: $(libintl-a-y)
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
-ifneq ($(DOPIC),y)
$(do_strip)
-endif
$(do_ar)
$(libintl_MOBJ): $(libintl_MSRC)
diff --git a/libm/Makefile.in b/libm/Makefile.in
index 7b6a781..19211f5 100644
--- a/libm/Makefile.in
+++ b/libm/Makefile.in
@@ -117,7 +117,11 @@ libm_DEF := $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ))))
libm_OBJS := $(libm_OBJ) $(libm_MOBJ)
+ifeq ($(DOPIC),y)
+libm-a-y += $(libm_OBJS:.o=.os)
+else
libm-a-y += $(libm_OBJS)
+endif
libm-so-y += $(libm_OBJS:.o=.os)
CFLAGS-multi-y := $(libm_DEF)
@@ -128,7 +132,11 @@ lib-a-$(UCLIBC_HAS_FLOATS) += $(top_builddir)lib/libm.a
lib-so-$(UCLIBC_HAS_FLOATS) += $(top_builddir)lib/libm.so
objclean-y += libm_clean
-$(top_builddir)lib/libm.so: $(libm_OUT)/libm_so.a $(libc-so-dep)
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libm.so: $(top_builddir)lib/libm.a $(libc)
+else
+$(top_builddir)lib/libm.so: $(libm_OUT)/libm_so.a $(libc)
+endif
$(call link.so,$(libm_FULL_NAME),$(MAJOR_VERSION))
$(libm_OUT)/libm_so.a: $(libm-so-y)
@@ -136,16 +144,10 @@ $(libm_OUT)/libm_so.a: $(libm-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libm.a: $(libm-a-y:.o=.os)
-else
-$(top_builddir)lib/libm.a: $(libm-a-y) $(libm_OUT)/libm_so.a
-endif
+$(top_builddir)lib/libm.a: $(libm-a-y)
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
-ifneq ($(DOPIC),y)
$(do_strip)
-endif
$(do_ar)
$(libm_MOBJ): $(libm_MSRC)
diff --git a/libnsl/Makefile.in b/libnsl/Makefile.in
index fe2fb1b..1c35417 100644
--- a/libnsl/Makefile.in
+++ b/libnsl/Makefile.in
@@ -19,7 +19,11 @@ libnsl_OUT := $(top_builddir)libnsl
libnsl_SRC := $(libnsl_DIR)/nsl.c
libnsl_OBJ := $(patsubst $(libnsl_DIR)/%.c,$(libnsl_OUT)/%.o,$(libnsl_SRC))
+ifeq ($(DOPIC),y)
+libnsl-a-y := $(libnsl_OBJ:.o=.os)
+else
libnsl-a-y := $(libnsl_OBJ)
+endif
libnsl-so-y := $(libnsl_OBJ:.o=.os)
libnsl-multi-y := $(libnsl_SRC)
@@ -28,7 +32,11 @@ lib-a-y += $(top_builddir)lib/libnsl.a
lib-so-y += $(top_builddir)lib/libnsl.so
objclean-y += libnsl_clean
-$(top_builddir)lib/libnsl.so: $(libnsl_OUT)/libnsl_so.a $(libc-so-dep)
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libnsl.so: $(top_builddir)lib/libnsl.a $(libc)
+else
+$(top_builddir)lib/libnsl.so: $(libnsl_OUT)/libnsl_so.a $(libc)
+endif
$(call link.so,$(libnsl_FULL_NAME),$(MAJOR_VERSION))
$(libnsl_OUT)/libnsl_so.a: $(libnsl-so-y)
@@ -36,16 +44,10 @@ $(libnsl_OUT)/libnsl_so.a: $(libnsl-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libnsl.a: $(libnsl-a-y:.o=.os)
-else
-$(top_builddir)lib/libnsl.a: $(libnsl-a-y) $(libnsl_OUT)/libnsl_so.a
-endif
+$(top_builddir)lib/libnsl.a: $(libnsl-a-y)
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
-ifneq ($(DOPIC),y)
$(do_strip)
-endif
$(do_ar)
libnsl_clean:
diff --git a/libpthread/linuxthreads.old/Makefile.in b/libpthread/linuxthreads.old/Makefile.in
index 7c0bdae..cb8a526 100644
--- a/libpthread/linuxthreads.old/Makefile.in
+++ b/libpthread/linuxthreads.old/Makefile.in
@@ -50,7 +50,11 @@ endif
libpthread_OBJ := $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.o,$(libpthread_SRC))
+ifeq ($(DOPIC),y)
+libpthread-a-y += $(libpthread_OBJ:.o=.os)
+else
libpthread-a-y += $(libpthread_OBJ)
+endif
libpthread-so-y += $(libpthread_OBJ:.o=.os)
libpthread-multi-y += $(libpthread_SRC)
@@ -62,7 +66,11 @@ objclean-y += libpthread_clean
headers-$(UCLIBC_HAS_THREADS) += linuxthreads_headers
headers_clean-y += linuxthreads_headers_clean
-$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread_so.a $(libc-so-dep)
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libpthread.so: $(top_builddir)lib/libpthread.a $(libc)
+else
+$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread_so.a $(libc)
+endif
$(call link.so,$(libpthread_FULL_NAME),$(MAJOR_VERSION))
$(libpthread_OUT)/libpthread_so.a: $(libpthread-so-y)
@@ -74,14 +82,12 @@ else
endif
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libpthread.a: $(libpthread-a-y:.o=.os)
-else
-$(top_builddir)lib/libpthread.a: $(libpthread-a-y) $(libpthread_OUT)/libpthread_so.a
-endif
+$(top_builddir)lib/libpthread.a: $(libpthread-a-y)
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
-ifneq ($(DOPIC),y)
+ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
+ $(do_strip:-x=-X --strip-debug)
+else
$(do_strip)
endif
$(do_ar)
diff --git a/libpthread/linuxthreads.old_db/Makefile.in b/libpthread/linuxthreads.old_db/Makefile.in
index f4985a4..bad600d 100644
--- a/libpthread/linuxthreads.old_db/Makefile.in
+++ b/libpthread/linuxthreads.old_db/Makefile.in
@@ -21,7 +21,11 @@ libthread_db_SRC := $(wildcard $(libthread_db_DIR)/*.c)
libthread_db_OBJ := $(patsubst $(libthread_db_DIR)/%.c,$(libthread_db_OUT)/%.o,$(libthread_db_SRC))
+ifeq ($(DOPIC),y)
+libthread_db-a-y := $(libthread_db_OBJ:.o=.os)
+else
libthread_db-a-y := $(libthread_db_OBJ)
+endif
libthread_db-so-y := $(libthread_db_OBJ:.o=.os)
libthread_db-multi-y := $(libthread_db_SRC)
@@ -32,7 +36,11 @@ objclean-y += libthread_db_clean
headers-$(PTHREADS_DEBUG_SUPPORT) += linuxthreads_db_headers
headers_clean-y += linuxthreads_db_headers_clean
-$(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db_so.a libc-y
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libthread_db.so: $(top_builddir)lib/libthread_db.a $(libc)
+else
+$(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db_so.a $(libc)
+endif
$(call link.so,$(libthread_db_FULL_NAME),1)
$(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
@@ -40,16 +48,10 @@ $(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libthread_db.a: $(libthread_db-a-y:.o=.os)
-else
-$(top_builddir)lib/libthread_db.a: $(libthread_db-a-y) $(libthread_db_OUT)/libthread_db_so.a
-endif
+$(top_builddir)lib/libthread_db.a: $(libthread_db-a-y)
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
-ifneq ($(DOPIC),y)
$(do_strip)
-endif
$(do_ar)
linuxthreads_db_headers:
diff --git a/libresolv/Makefile.in b/libresolv/Makefile.in
index da699a8..acf59ea 100644
--- a/libresolv/Makefile.in
+++ b/libresolv/Makefile.in
@@ -19,7 +19,11 @@ libresolv_OUT := $(top_builddir)libresolv
libresolv_SRC := $(libresolv_DIR)/resolv.c
libresolv_OBJ := $(patsubst $(libresolv_DIR)/%.c,$(libresolv_OUT)/%.o,$(libresolv_SRC))
+ifeq ($(DOPIC),y)
+libresolv-a-y := $(libresolv_OBJ:.o=.os)
+else
libresolv-a-y := $(libresolv_OBJ)
+endif
libresolv-so-y := $(libresolv_OBJ:.o=.os)
libresolv-multi-y := $(libresolv_SRC)
@@ -28,7 +32,11 @@ lib-a-y += $(top_builddir)lib/libresolv.a
lib-so-y += $(top_builddir)lib/libresolv.so
objclean-y += libresolv_clean
-$(top_builddir)lib/libresolv.so: $(libresolv_OUT)/libresolv_so.a $(libc-so-dep)
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libresolv.so: $(top_builddir)lib/libresolv.a $(libc)
+else
+$(top_builddir)lib/libresolv.so: $(libresolv_OUT)/libresolv_so.a $(libc)
+endif
$(call link.so,$(libresolv_FULL_NAME),$(MAJOR_VERSION))
$(libresolv_OUT)/libresolv_so.a: $(libresolv-so-y)
@@ -36,16 +44,10 @@ $(libresolv_OUT)/libresolv_so.a: $(libresolv-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libresolv.a: $(libresolv-a-y:.o=.os)
-else
-$(top_builddir)lib/libresolv.a: $(libresolv-a-y) $(libresolv_OUT)/libresolv_so.a
-endif
+$(top_builddir)lib/libresolv.a: $(libresolv-a-y)
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
-ifneq ($(DOPIC),y)
$(do_strip)
-endif
$(do_ar)
libresolv_clean:
diff --git a/librt/Makefile.in b/librt/Makefile.in
index 55d006d..ec405e5 100644
--- a/librt/Makefile.in
+++ b/librt/Makefile.in
@@ -19,7 +19,11 @@ librt_OUT := $(top_builddir)librt
librt_SRC := $(wildcard $(librt_DIR)/*.c)
librt_OBJ := $(patsubst $(librt_DIR)/%.c,$(librt_OUT)/%.o,$(librt_SRC))
+ifeq ($(DOPIC),y)
+librt-a-y := $(librt_OBJ:.o=.os)
+else
librt-a-y := $(librt_OBJ)
+endif
librt-so-y := $(librt_OBJ:.o=.os)
librt-multi-y += $(librt_SRC)
@@ -28,7 +32,11 @@ lib-a-y += $(top_builddir)lib/librt.a
lib-so-y += $(top_builddir)lib/librt.so
objclean-y += librt_clean
-$(top_builddir)lib/librt.so: $(librt_OUT)/librt_so.a $(libc-so-dep)
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/librt.so: $(top_builddir)lib/librt.a $(libc)
+else
+$(top_builddir)lib/librt.so: $(librt_OUT)/librt_so.a $(libc)
+endif
$(call link.so,$(librt_FULL_NAME),$(MAJOR_VERSION))
$(librt_OUT)/librt_so.a: $(librt-so-y)
@@ -36,16 +44,10 @@ $(librt_OUT)/librt_so.a: $(librt-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/librt.a: $(librt-a-y:.o=.os)
-else
-$(top_builddir)lib/librt.a: $(librt-a-y) $(librt_OUT)/librt_so.a
-endif
+$(top_builddir)lib/librt.a: $(librt-a-y)
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
-ifneq ($(DOPIC),y)
$(do_strip)
-endif
$(do_ar)
librt_clean:
diff --git a/libutil/Makefile.in b/libutil/Makefile.in
index 4267ce5..bc6943a 100644
--- a/libutil/Makefile.in
+++ b/libutil/Makefile.in
@@ -22,7 +22,11 @@ libutil_SRC := $(filter-out $(libutil_DIR)/forkpty.c,$(libutil_SRC))
endif
libutil_OBJ := $(patsubst $(libutil_DIR)/%.c,$(libutil_OUT)/%.o,$(libutil_SRC))
+ifeq ($(DOPIC),y)
+libutil-a-y := $(libutil_OBJ:.o=.os)
+else
libutil-a-y := $(libutil_OBJ)
+endif
libutil-so-y := $(libutil_OBJ:.o=.os)
libutil-multi-y := $(libutil_SRC)
@@ -31,7 +35,11 @@ lib-a-y += $(top_builddir)lib/libutil.a
lib-so-y += $(top_builddir)lib/libutil.so
objclean-y += libutil_clean
-$(top_builddir)lib/libutil.so: $(libutil_OUT)/libutil_so.a $(libc-so-dep)
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libutil.so: $(top_builddir)lib/libutil.a $(libc)
+else
+$(top_builddir)lib/libutil.so: $(libutil_OUT)/libutil_so.a $(libc)
+endif
$(call link.so,$(libutil_FULL_NAME),$(MAJOR_VERSION))
$(libutil_OUT)/libutil_so.a: $(libutil-so-y)
@@ -39,16 +47,10 @@ $(libutil_OUT)/libutil_so.a: $(libutil-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libutil.a: $(libutil-a-y:.o=.os)
-else
-$(top_builddir)lib/libutil.a: $(libutil-a-y) $(libutil_OUT)/libutil_so.a
-endif
+$(top_builddir)lib/libutil.a: $(libutil-a-y)
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
-ifneq ($(DOPIC),y)
$(do_strip)
-endif
$(do_ar)
libutil_clean: