summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-11-22 01:44:51 +0000
committerMike Frysinger <vapier@gentoo.org>2005-11-22 01:44:51 +0000
commitb20ee706efe1c40b016efe41e1486ef6e10d6880 (patch)
tree50ac361f0276a2b51593471b7a392287211d582f
parent28cfdb86441668581d1d8efd11137bb8da9f65a4 (diff)
rework depends and stripping so that libraries arent rebuilt all the time in a loop
-rw-r--r--Makerules16
-rw-r--r--ldso/libdl/Makefile.in6
-rw-r--r--libc/Makefile.in14
-rw-r--r--libcrypt/Makefile.in6
-rw-r--r--libintl/Makefile.in6
-rw-r--r--libm/Makefile.in6
-rw-r--r--libnsl/Makefile.in6
-rw-r--r--libpthread/linuxthreads.old/Makefile.in6
-rw-r--r--libpthread/linuxthreads.old_db/Makefile.in4
-rw-r--r--libresolv/Makefile.in6
-rw-r--r--librt/Makefile.in6
-rw-r--r--libutil/Makefile.in6
12 files changed, 57 insertions, 31 deletions
diff --git a/Makerules b/Makerules
index caebc94b2..45a79e60c 100644
--- a/Makerules
+++ b/Makerules
@@ -7,11 +7,11 @@
# order is important, the stripping uses STRIP_FLAGS for lib-so, but not for lib-a
ifeq ($(HAVE_SHARED),y)
.LIBPATTERNS: "lib%.so"
-libs: lib-so-y lib-a-y
+libs: $(lib-so-y) $(lib-a-y)
objs: shared_objs ar_objs
else
.LIBPATTERNS: "lib%.a"
-libs: lib-a-y
+libs: $(lib-a-y)
objs: ar_objs
endif
@@ -29,12 +29,13 @@ ar_objs: $(ar_objs-y)
endif
headers-y: $(headers-y)
-ld-uClibc-y: $(ld-uClibc-y)
interp-y: $(interp)
-pre-y: interp-y ld-uClibc-y
-libc-y: pre-y $(libc) crt-y $(top_builddir)lib/$(NONSHARED_LIBNAME)
-lib-so-y: libc-y $(lib-so-y)
-lib-a-y: crt-y $(lib-a-y)
+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
@@ -163,7 +164,6 @@ $(CTOR_TARGETS):
$(do_ar)
endif
-crt-y: $(crt-y)
$(crt-y): $(CRTS) $(CTOR_TARGETS)
$(top_builddir)lib/$(NONSHARED_LIBNAME): $(libc-nonshared-y)
diff --git a/ldso/libdl/Makefile.in b/ldso/libdl/Makefile.in
index 56ddb0e1a..f90cee0e4 100644
--- a/ldso/libdl/Makefile.in
+++ b/ldso/libdl/Makefile.in
@@ -39,7 +39,7 @@ 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-y
+$(top_builddir)lib/libdl.so: $(libdl_OUT)/libdl_so.a $(ld-uClibc-y) $(libc-so-dep)
$(call link.so,$(libdl_FULL_NAME),$(MAJOR_VERSION))
$(libdl_OUT)/libdl_so.a: $(libdl-so-y)
@@ -50,11 +50,13 @@ $(libdl_OUT)/libdl_so.a: $(libdl-so-y)
ifeq ($(DOPIC),y)
$(top_builddir)lib/libdl.a: $(libdl-a-y:.o=.os)
else
-$(top_builddir)lib/libdl.a: $(libdl-a-y)
+$(top_builddir)lib/libdl.a: $(libdl-a-y) $(libdl_OUT)/libdl_so.a
endif
$(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 f65121c00..83a5a9392 100644
--- a/libc/Makefile.in
+++ b/libc/Makefile.in
@@ -41,11 +41,11 @@ libc-so-y += $(libc-shared-y)
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 $(crt-y)
+lib-so-y += libc-y $(top_builddir)lib/$(NONSHARED_LIBNAME) $(crt-y)
objclean-y += libc_clean
-$(top_builddir)lib/libc.so: $(libc_OUT)/libc_so.a $(top_builddir)include/headers_done $(interp)
+$(top_builddir)lib/libc.so: $(libc_OUT)/libc_so.a $(interp)
$(call link.so,$(libc_FULL_NAME),$(MAJOR_VERSION))
$(Q)$(RM) $@
$(Q)echo "/* GNU ld script" > $@
@@ -65,12 +65,18 @@ $(libc_OUT)/libc_so.a: $(libc-so-y)
ifeq ($(DOPIC),y)
$(top_builddir)lib/libc.a: $(libc-a-y:.o=.os)
else
-$(top_builddir)lib/libc.a: $(libc-a-y)
+$(top_builddir)lib/libc.a: $(libc-a-y) $(libc_OUT)/libc_so.a
endif
$(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 9aa0d014e..ed65f0f81 100644
--- a/libcrypt/Makefile.in
+++ b/libcrypt/Makefile.in
@@ -29,7 +29,7 @@ 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-y
+$(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt_so.a $(libc-so-dep)
$(call link.so,$(libcrypt_FULL_NAME),$(MAJOR_VERSION))
$(libcrypt_OUT)/libcrypt_so.a: $(libcrypt-so-y)
@@ -40,11 +40,13 @@ $(libcrypt_OUT)/libcrypt_so.a: $(libcrypt-so-y)
ifeq ($(DOPIC),y)
$(top_builddir)lib/libcrypt.a: $(libcrypt-a-y:.o=.os)
else
-$(top_builddir)lib/libcrypt.a: $(libcrypt-a-y)
+$(top_builddir)lib/libcrypt.a: $(libcrypt-a-y) $(libcrypt_OUT)/libcrypt_so.a
endif
$(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 3fa075994..d27cd8147 100644
--- a/libintl/Makefile.in
+++ b/libintl/Makefile.in
@@ -37,7 +37,7 @@ 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-y
+$(top_builddir)lib/libintl.so: $(libintl_OUT)/libintl_so.a $(libc-so-dep)
$(call link.so,$(libintl_FULL_NAME),$(MAJOR_VERSION))
$(libintl_OUT)/libintl_so.a: $(libintl-so-y)
@@ -48,11 +48,13 @@ $(libintl_OUT)/libintl_so.a: $(libintl-so-y)
ifeq ($(DOPIC),y)
$(top_builddir)lib/libintl.a: $(libintl-a-y:.o=.os)
else
-$(top_builddir)lib/libintl.a: $(libintl-a-y)
+$(top_builddir)lib/libintl.a: $(libintl-a-y) $(libintl_OUT)/libintl_so.a
endif
$(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 4a021fccf..7b6a781cf 100644
--- a/libm/Makefile.in
+++ b/libm/Makefile.in
@@ -128,7 +128,7 @@ 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-y
+$(top_builddir)lib/libm.so: $(libm_OUT)/libm_so.a $(libc-so-dep)
$(call link.so,$(libm_FULL_NAME),$(MAJOR_VERSION))
$(libm_OUT)/libm_so.a: $(libm-so-y)
@@ -139,11 +139,13 @@ $(libm_OUT)/libm_so.a: $(libm-so-y)
ifeq ($(DOPIC),y)
$(top_builddir)lib/libm.a: $(libm-a-y:.o=.os)
else
-$(top_builddir)lib/libm.a: $(libm-a-y)
+$(top_builddir)lib/libm.a: $(libm-a-y) $(libm_OUT)/libm_so.a
endif
$(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 f3221f481..fe2fb1b24 100644
--- a/libnsl/Makefile.in
+++ b/libnsl/Makefile.in
@@ -28,7 +28,7 @@ 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-y
+$(top_builddir)lib/libnsl.so: $(libnsl_OUT)/libnsl_so.a $(libc-so-dep)
$(call link.so,$(libnsl_FULL_NAME),$(MAJOR_VERSION))
$(libnsl_OUT)/libnsl_so.a: $(libnsl-so-y)
@@ -39,11 +39,13 @@ $(libnsl_OUT)/libnsl_so.a: $(libnsl-so-y)
ifeq ($(DOPIC),y)
$(top_builddir)lib/libnsl.a: $(libnsl-a-y:.o=.os)
else
-$(top_builddir)lib/libnsl.a: $(libnsl-a-y)
+$(top_builddir)lib/libnsl.a: $(libnsl-a-y) $(libnsl_OUT)/libnsl_so.a
endif
$(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 98ef6307b..7c0bdae88 100644
--- a/libpthread/linuxthreads.old/Makefile.in
+++ b/libpthread/linuxthreads.old/Makefile.in
@@ -62,7 +62,7 @@ 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-y
+$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread_so.a $(libc-so-dep)
$(call link.so,$(libpthread_FULL_NAME),$(MAJOR_VERSION))
$(libpthread_OUT)/libpthread_so.a: $(libpthread-so-y)
@@ -77,11 +77,13 @@ endif
ifeq ($(DOPIC),y)
$(top_builddir)lib/libpthread.a: $(libpthread-a-y:.o=.os)
else
-$(top_builddir)lib/libpthread.a: $(libpthread-a-y)
+$(top_builddir)lib/libpthread.a: $(libpthread-a-y) $(libpthread_OUT)/libpthread_so.a
endif
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
+ifneq ($(DOPIC),y)
$(do_strip)
+endif
$(do_ar)
linuxthreads_headers:
diff --git a/libpthread/linuxthreads.old_db/Makefile.in b/libpthread/linuxthreads.old_db/Makefile.in
index 042debbe2..f4985a483 100644
--- a/libpthread/linuxthreads.old_db/Makefile.in
+++ b/libpthread/linuxthreads.old_db/Makefile.in
@@ -43,11 +43,13 @@ $(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
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)
+$(top_builddir)lib/libthread_db.a: $(libthread_db-a-y) $(libthread_db_OUT)/libthread_db_so.a
endif
$(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 f7a474ad4..da699a8ca 100644
--- a/libresolv/Makefile.in
+++ b/libresolv/Makefile.in
@@ -28,7 +28,7 @@ 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-y
+$(top_builddir)lib/libresolv.so: $(libresolv_OUT)/libresolv_so.a $(libc-so-dep)
$(call link.so,$(libresolv_FULL_NAME),$(MAJOR_VERSION))
$(libresolv_OUT)/libresolv_so.a: $(libresolv-so-y)
@@ -39,11 +39,13 @@ $(libresolv_OUT)/libresolv_so.a: $(libresolv-so-y)
ifeq ($(DOPIC),y)
$(top_builddir)lib/libresolv.a: $(libresolv-a-y:.o=.os)
else
-$(top_builddir)lib/libresolv.a: $(libresolv-a-y)
+$(top_builddir)lib/libresolv.a: $(libresolv-a-y) $(libresolv_OUT)/libresolv_so.a
endif
$(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 20a22e26d..55d006dfd 100644
--- a/librt/Makefile.in
+++ b/librt/Makefile.in
@@ -28,7 +28,7 @@ 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-y
+$(top_builddir)lib/librt.so: $(librt_OUT)/librt_so.a $(libc-so-dep)
$(call link.so,$(librt_FULL_NAME),$(MAJOR_VERSION))
$(librt_OUT)/librt_so.a: $(librt-so-y)
@@ -39,11 +39,13 @@ $(librt_OUT)/librt_so.a: $(librt-so-y)
ifeq ($(DOPIC),y)
$(top_builddir)lib/librt.a: $(librt-a-y:.o=.os)
else
-$(top_builddir)lib/librt.a: $(librt-a-y)
+$(top_builddir)lib/librt.a: $(librt-a-y) $(librt_OUT)/librt_so.a
endif
$(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 f6396a627..4267ce594 100644
--- a/libutil/Makefile.in
+++ b/libutil/Makefile.in
@@ -31,7 +31,7 @@ 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-y
+$(top_builddir)lib/libutil.so: $(libutil_OUT)/libutil_so.a $(libc-so-dep)
$(call link.so,$(libutil_FULL_NAME),$(MAJOR_VERSION))
$(libutil_OUT)/libutil_so.a: $(libutil-so-y)
@@ -42,11 +42,13 @@ $(libutil_OUT)/libutil_so.a: $(libutil-so-y)
ifeq ($(DOPIC),y)
$(top_builddir)lib/libutil.a: $(libutil-a-y:.o=.os)
else
-$(top_builddir)lib/libutil.a: $(libutil-a-y)
+$(top_builddir)lib/libutil.a: $(libutil-a-y) $(libutil_OUT)/libutil_so.a
endif
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
+ifneq ($(DOPIC),y)
$(do_strip)
+endif
$(do_ar)
libutil_clean: