On Wed, Feb 23, 2011 at 08:05:47PM +0100, Bernd Schmidt wrote:
>This adds support for a new binary format, DSBT ELF, to the Makefiles.
>Every shared library is assigned a DSBT index, and the link.so macro is
>adjusted to ensure the correct linker argument is passed.
>
>Configuration and ldso support will follow in separate commits.
>
>Signed-off-by: Bernd Schmidt <[email protected]>
>---
> Makerules                               |   15 +++++++++++++++
> ldso/ldso/Makefile.in                   |    1 +
> ldso/libdl/Makefile.in                  |    1 +
> libc/Makefile.in                        |    1 +
> libcrypt/Makefile.in                    |    1 +
> libm/Makefile.in                        |    1 +
> libnsl/Makefile.in                      |    1 +
> libpthread/linuxthreads.old/Makefile.in |    1 +
> libresolv/Makefile.in                   |    1 +
> librt/Makefile.in                       |    1 +
> libutil/Makefile.in                     |    1 +
> 11 files changed, 25 insertions(+), 0 deletions(-)
>
>diff --git a/Makerules b/Makerules
>index 84eeaea..e63fef4 100644
>--- a/Makerules
>+++ b/Makerules
>@@ -294,16 +294,31 @@ endef
> cmd_hcompile.u = $(HOSTCC) $(filter-out $(PHONY),$^) $(DEPS-$(notdir $@)) -o 
> $@ $(BUILD_LDFLAGS) $(BUILD_LDFLAGS-$(notdir $(^D))) $(BUILD_LDFLAGS-$(notdir 
> $@)) $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir 
> $@))
> cmd_hcompile.o = $(HOSTCC) $(filter-out $(PHONY),$<) $(DEPS-$(notdir $@)) -c 
> -o $@ $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir 
> $@))
> 
>+ifeq ($(UCLIBC_FORMAT_DSBT_ELF),y)
> define link.so
>       $(Q)$(RM) $@ $@.$(2) $(dir $@)$(1)
>       @$(disp_ld)
>       $(Q)$(CC) $(LDFLAGS-$(notdir $@)) -Wl,-soname=$(notdir $@).$(2) \
>               $(NOSTDLIB_CFLAGS) -o $(dir $@)$(1) $(START_FILE-$(notdir $@)) \
>               -Wl,--whole-archive $(firstword $^) -Wl,--no-whole-archive \
>+              $(LDFLAGS_DSBTINDEX-$(notdir $@)) \
>               $(LIBS-$(notdir $@)) $(LIBGCC) $(END_FILE-$(notdir $@))
>       $(Q)$(LN) -sf $(1) $@.$(2)
>       $(Q)$(LN) -sf $(1) $@
> endef
>+else
>+define link.so
>+      $(Q)$(INSTALL) -d $(dir $@)
>+      $(Q)$(RM) $@ $@.$(2) $(dir $@)$(1)
>+      @$(disp_ld)
>+      $(Q)$(CC) $(LDFLAGS-$(notdir $@)) -Wl,-soname=$(notdir $@).$(2) \
>+              $(NOSTDLIB_CFLAGS) -o $(dir $@)$(1) $(START_FILE-$(notdir $@)) \
>+              -Wl,--whole-archive $(firstword $^) -Wl,--no-whole-archive \
>+              $(LIBS-$(notdir $@)) $(LIBGCC) $(END_FILE-$(notdir $@))
>+      $(Q)$(LN) -sf $(1) $@.$(2)
>+      $(Q)$(LN) -sf $(1) $@
>+endef
>+endif

Is this really necessary, can't you put the flags into
$(LDFLAGS-$(notdir $@)) ?

_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to