From e682ab4139c03632d37f26f58652bfa71f728cd4 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Fri, 23 Nov 2007 18:02:12 +0000 Subject: Some shared flat improvements. Fix minor errors: - UCLIBC_SHARED_FLAT_ID instead of SHARED_FLAT_ID - use -Wl,-shared-lib-id properly Use libc_so.a as the source for the shared libc, in order to be able to use -mleaf-id-shared-library on the Blackfin. --- Makerules | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Makerules') diff --git a/Makerules b/Makerules index aec7238a0..409a8decd 100644 --- a/Makerules +++ b/Makerules @@ -146,14 +146,17 @@ LINK_FLAT_CRTS := $(top_builddir)lib/Scrt1.o $(top_builddir)lib/crti.o \ # Argument 1 is the shared library file -- i.e. $(@:.gdb=) -- and argument 2 # is the shared library identifier. If it wasn't for $(disp_ld), we could # avoid passing $(@:.gdb=) as an argument and use $(@:.gdb=) instead of $(1). +# +# This is so far only used for libc, for which we want to link the entire +# libgcc into the shared object. define link-flat.so $(Q)$(INSTALL) -d $(dir $@) $(Q)$(RM) $(1) $@ @$(disp_ld) $(Q)$(CC) $(LDFLAGS-$(notdir $@)) -nostdlib -o $(1) \ - -Wl,-elf2flt -Wl,-shared-lib-id $(2) $(top_builddir)lib/Scrt1.o \ + -Wl,-elf2flt -Wl,-shared-lib-id,$(2) $(top_builddir)lib/Scrt1.o \ $(top_builddir)/lib/crti.o -Wl,--whole-archive $(firstword $^) \ - -Wl,--no-whole-archive $(LIBS-$(notdir $@)) $(LIBGCC) \ + $(LIBGCC) -Wl,--no-whole-archive $(LIBS-$(notdir $@)) $(LIBGCC) \ $(top_builddir)/lib/crtn.o endef -- cgit v1.2.3