summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorBernd Schmidt <bernds_cb1@t-online.de>2008-01-18 02:21:09 +0000
committerBernd Schmidt <bernds_cb1@t-online.de>2008-01-18 02:21:09 +0000
commit0e910924766cc3e37da9d17bbc71ea0a42852018 (patch)
treef63e931d0108f4e5aa134bd45727434985b11767 /Makerules
parent282f4912cf56ac9c0458de2ae866a7b7576bcca1 (diff)
Another piece needed for FD-PIC. This compiles another startfile, crtreloc.o,
if necessary.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makerules b/Makerules
index 44292ed9c..2a4f39d41 100644
--- a/Makerules
+++ b/Makerules
@@ -229,6 +229,13 @@ else
CTOR_TARGETS:=
endif
+ifeq ($(UCLIBC_FORMAT_FDPIC_ELF),y)
+CRTRELOC=$(top_builddir)lib/crtreloc.o
+$(CRTRELOC): $(top_builddir)lib/%.o : $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/%.c
+ $(Q)$(INSTALL) -d $(dir $@)
+ $(compile.c)
+endif
+
ifneq ($(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/initfini.c),)
CFLAGS-initfini.s := -S -g0 $(PICFLAG) -fno-inline-functions -finhibit-size-directive
$(top_builddir)lib/initfini.s: $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/initfini.c
@@ -266,8 +273,8 @@ endif
CRTS_COMPAT :=
#endif
-$(crt-y): $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT)
-$(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT): | headers
+$(crt-y): $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC)
+$(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC): | headers
$(top_builddir)lib/$(NONSHARED_LIBNAME): $(libc-nonshared-y)
$(Q)$(INSTALL) -d $(dir $@)