[PATCH 1/6] Add Makefile support for DSBT ELF.

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Tue Mar 1 18:48:14 UTC 2011


On Tue, Mar 01, 2011 at 07:29:28PM +0100, Bernhard Reutner-Fischer wrote:
>Bernd Schmidt <bernds at codesourcery.com> wrote:
>
>On 02/23/2011 10:56 PM, Bernhard Reutner-Fischer wrote: >> +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 $@)) ? Do you mean something like the patch below? I was trying to avoid ifdefs in every Makefile.in. Bernd 
>
>
>Hi,
>
>I was more thinking about just adding
>$(LDFLAGS-y-$(@D)) to the linker flags so you can say
>LDFLAGS-$(CONFIG_FOO)-libc.so += -bar=0815

like attached (untested)
>
>See?
>TIA,
>Bernhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bernds-DSBT-ELF-Makefiles.patch
Type: text/x-diff
Size: 5332 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20110301/540d3950/attachment.bin>


More information about the uClibc mailing list