[PATCH] Use newly built crt*.o files to build shared objects [BZ #22362]

H.J. Lu hjl.tools@gmail.com
Sun Oct 29 16:21:00 GMT 2017


On Sun, Oct 29, 2017 at 5:35 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> On Okt 28 2017, "H.J. Lu" <hjl.tools@gmail.com> wrote:
>
>> diff --git a/csu/Makefile b/csu/Makefile
>> index fd668a5d00..b9803be0ff 100644
>> --- a/csu/Makefile
>> +++ b/csu/Makefile
>> @@ -77,6 +77,11 @@ crtstuff = crti crtn
>>  install-lib += $(crtstuff:=.o)
>>  extra-objs += $(crtstuff:=.o)
>>
>> +ifneq ($(multidir),.)
>> +multilib-extra-objs = $(addprefix $(multidir)/, $(install-lib))
>> +extra-objs += $(multilib-extra-objs)
>> +endif
>> +
>>  extra-objs += abi-note.o init.o
>>  asm-CPPFLAGS += -I$(objpfx).
>>
>> @@ -147,3 +152,9 @@ $(objpfx)abi-tag.h: $(..)abi-tags
>>       done
>>       if test -r $@.new; then mv -f $@.new $@; \
>>       else echo >&2 'This configuration not matched in $<'; exit 1; fi
>> +
>> +ifneq ($(multidir),.)
>> +$(addprefix $(objpfx)$(multidir)/, $(install-lib)): $(addprefix $(objpfx), $(install-lib))
>> +     $(make-target-directory)
>> +     ln -f $(objpfx)/$(@F) $@
>> +endif
>
> Only a symlink . -> $(multidir) is needed.

Like this?

>> diff --git a/nptl/Makefile b/nptl/Makefile
>> index d819349f43..314cbda46a 100644
>> --- a/nptl/Makefile
>> +++ b/nptl/Makefile
>
> Same here.

If the updated patch is OK, I will submit a separate patch to convert
nptl/Makefile to symlink.

Thanks.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-newly-built-crt-.o-files-to-build-shared-objects.patch
Type: text/x-patch
Size: 3845 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20171029/c7181c34/attachment.bin>


More information about the Libc-alpha mailing list