summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in4
-rw-r--r--Makerules17
-rw-r--r--ldso/ldso/Makefile.in1
-rw-r--r--libc/Makefile.in3
-rw-r--r--libc/sysdeps/linux/Makefile.commonarch1
-rw-r--r--librt/Makefile.in2
6 files changed, 13 insertions, 15 deletions
diff --git a/Makefile.in b/Makefile.in
index a9bfbbb81..2beeb7d01 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -13,7 +13,7 @@ sub_headers := headers
ifeq ($(HAVE_DOT_CONFIG),y)
-all: pregen libs
+all: pregen libs startfiles
libs: pregen
# In this section, we need .config
@@ -219,8 +219,6 @@ install: install_runtime install_dev
RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)$(MULTILIB_DIR) $(RUNTIME_PREFIX)$(MULTILIB_DIR))
-startfiles: $(crt-y)
-
$(top_builddir)extra/scripts/unifdef: |$(top_builddir)extra/scripts
$(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c
$(hcompile.u)
diff --git a/Makerules b/Makerules
index fd6bb190d..10dc5298f 100644
--- a/Makerules
+++ b/Makerules
@@ -22,9 +22,9 @@ ifeq ($(UCLIBC_FORMAT_SHARED_FLAT),y)
libs: $(lib-gdb-y)
endif
libs: $(lib-a-y)
-$(lib-a-y): | $(top_builddir)lib
endif
objs: all_objs
+$(lib-so-y) $(lib-a-y): | $(top_builddir)lib
# apply unconditional per-directory flags
define add_IS_IN_lib
@@ -451,18 +451,18 @@ CFLAGS-initfini.s := -S -g0 $(PICFLAG) -fno-inline-functions -finhibit-size-dire
$(top_builddir)lib/initfini.s: $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/initfini.c | $(top_builddir)lib
$(compile.c)
-$(top_builddir)lib/defs.h: $(top_builddir)lib/initfini.s | $(top_builddir)lib
- $(Q)sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
- gawk -f $(top_srcdir)extra/scripts/defs.awk > $@.tmp
+$(top_builddir)lib/defs.h: $(top_builddir)lib/initfini.s
+ $(do_sed) -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
+ $(AWK) -f $(top_srcdir)extra/scripts/defs.awk > $@.tmp
$(Q)mv $@.tmp $@
$(top_builddir)lib/crti.S: $(top_builddir)lib/initfini.s $(top_builddir)lib/defs.h
- $(Q)sed -n -e '1,/@HEADER_ENDS/p' \
+ $(do_sed) -n -e '1,/@HEADER_ENDS/p' \
-e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
-e '/@TRAILER_BEGINS/,$$p' $< > $@
$(top_builddir)lib/crtn.S: $(top_builddir)lib/initfini.s
- $(Q)sed -n -e '1,/@HEADER_ENDS/p' \
+ $(do_sed) -n -e '1,/@HEADER_ENDS/p' \
-e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
-e '/@TRAILER_BEGINS/,$$p' $< > $@
@@ -482,9 +482,10 @@ CRTS_COMPAT :=
#endif
startfiles = $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC)
-$(crt-y): $(startfiles)
+startfiles: $(startfiles)
$(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC): | headers
-$(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC) $(LINK_FLAT_CRTS) $(SHARED_START_FILES) $(SHARED_END_FILES) : | $(top_builddir)lib
+$(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC) \
+ $(LINK_FLAT_CRTS) $(SHARED_START_FILES) $(SHARED_END_FILES): | $(top_builddir)lib
$(top_builddir)lib/$(NONSHARED_LIBNAME): $(libc-nonshared-y)
$(Q)$(RM) $@
diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in
index e0d0a097d..815264291 100644
--- a/ldso/ldso/Makefile.in
+++ b/ldso/ldso/Makefile.in
@@ -68,6 +68,7 @@ LDFLAGS-$(UCLIBC_LDSO_NAME).so += -T $(ldso:.$(ABI_VERSION)=).lds
endif
$(ldso): $(ldso:.$(ABI_VERSION)=)
+$(ldso:.$(ABI_VERSION)=): | $(top_builddir)lib
$(ldso:.$(ABI_VERSION)=): $($(UCLIBC_LDSO_NAME)_OUT)/$(UCLIBC_LDSO_NAME)_so.a
ifeq ($(LDSO_PRELINK_SUPPORT),y)
$(call create-lds)
diff --git a/libc/Makefile.in b/libc/Makefile.in
index 9c8152d44..2abc77dce 100644
--- a/libc/Makefile.in
+++ b/libc/Makefile.in
@@ -87,8 +87,7 @@ $(libc_OUT)/libc.oS: $(libc-multi-y) | $(top_builddir)lib/libc.a $(top_builddir)
$(Q)$(RM) $@
$(compile-m)
-$(top_builddir)lib/libc.a: $(libc-a-y) | $(crt-y)
- $(Q)$(INSTALL) -d $(dir $@)
+$(top_builddir)lib/libc.a: $(libc-a-y)
$(Q)$(RM) $@
$(do_ar)
diff --git a/libc/sysdeps/linux/Makefile.commonarch b/libc/sysdeps/linux/Makefile.commonarch
index a6842d879..f8dc17d8f 100644
--- a/libc/sysdeps/linux/Makefile.commonarch
+++ b/libc/sysdeps/linux/Makefile.commonarch
@@ -15,7 +15,6 @@ ARCH_SOBJ = $(patsubst %.s,%.o,$(patsubst %.S,%.o,$(addprefix $(ARCH_OUT)/,$(SSR
ARCH_OBJS-y = $(ARCH_COBJ) $(ARCH_SOBJ)
-crt-y := FORCE
libc-y += $(ARCH_OBJS-y)
libc-nomulti-y += $(ARCH_SOBJ)
objclean-y += CLEAN_$(subst $(top_builddir),,$(ARCH_OUT))
diff --git a/librt/Makefile.in b/librt/Makefile.in
index 8555e94db..a246d00ee 100644
--- a/librt/Makefile.in
+++ b/librt/Makefile.in
@@ -73,7 +73,7 @@ $(librt_OUT)/librt_so.a: $(librt-so-y)
$(Q)$(RM) $@
$(do_ar)
-$(top_builddir)lib/librt.a: $(librt-a-y) | $(top_builddir)lib
+$(top_builddir)lib/librt.a: $(librt-a-y)
$(Q)$(RM) $@
$(do_ar)