public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Troy Kisky <troy.kisky@boundarydevices.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Arnaud Lacombe <lacombar@gmail.com>,
	linux-kbuild@vger.kernel.org, Nicolas Pitre <nico@fluxnic.net>,
	Stephen Boyd <sboyd@codeaurora.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: zImage: Skip relinking if nothing changes
Date: Thu, 18 Aug 2011 15:25:46 -0700	[thread overview]
Message-ID: <4E4D916A.2090308@boundarydevices.com> (raw)
In-Reply-To: <20110818193132.GA28546@n2100.arm.linux.org.uk>

On 8/18/2011 12:31 PM, Russell King - ARM Linux wrote:
> On Thu, Aug 18, 2011 at 02:03:43PM -0400, Arnaud Lacombe wrote:
>> Hi,
>>
>> On Wed, Aug 17, 2011 at 11:44 PM, Nicolas Pitre<nico@fluxnic.net>  wrote:
>>> On Fri, 12 Aug 2011, Arnaud Lacombe wrote:
>>>> On Fri, Aug 12, 2011 at 4:48 PM, Arnaud Lacombe<lacombar@gmail.com>  wrote:
>>>>> On Fri, Aug 12, 2011 at 3:00 PM, Stephen Boyd<sboyd@codeaurora.org>  wrote:
>>>>>> diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
>>>>>> index 0c74a6f..937fd26 100644
>>>>>> --- a/arch/arm/boot/compressed/Makefile
>>>>>> +++ b/arch/arm/boot/compressed/Makefile
>>>>>> @@ -91,7 +91,7 @@ suffix_$(CONFIG_KERNEL_LZMA) = lzma
>>>>>>
>>>>>>   targets       := vmlinux vmlinux.lds \
>>>>>>                  piggy.$(suffix_y) piggy.$(suffix_y).o \
>>>>>> -                font.o font.c head.o misc.o $(OBJS)
>>>>>> +                font.o font.c head.o misc.o lib1funcs.o lib1funcs.S $(OBJS)
>>>>>>
>>>>>>   # Make sure files are removed during clean
>>>>>>   extra-y       += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S
>>>>>> @@ -121,9 +121,7 @@ LDFLAGS_vmlinux += -X
>>>>>>   LDFLAGS_vmlinux += -T
>>>>>>
>>>>>>   # For __aeabi_uidivmod
>>>>>> -lib1funcs = $(obj)/lib1funcs.o
>>>>>> -
>>>>>> -$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S FORCE
>>>>>> +$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S
>>>>>>         $(call cmd,shipped)
>>>>>>
>>>>> You should be able to avoid the extra copy altogether by doing something ala:
>>>>>
>>>>> $(obj)/lib1funcs.o: $(srctree)/arch/arm/lib/lib1funcs.S
>>>>>         $(call cmd,as_o_S)
>>>>>
>>>>> note that I also remove the $(SRCARCH), as there is no other
>>>>> `arch/*/lib/lib1funcs.S' than `arch/arm/lib/lib1funcs.S'
>>>>>
>>>> I withdraw this proposal and will hack around this to find a proper
>>>> solution from within kbuild, and eventually come back on these uses
>>>> :-)
>>> Any progress on this?
>>>
>>> I have a patch doing multiple similar $(call cmd,shipped) at the moment
>>> and this is far from looking nice.
>> What is your use-case ? Is it re-use of code in a different
>> subdirectory (use-case presented in this thread), or aliasing of the
>> same source under different object name in the same directory (as used
>> in the alpha tree) ?
> It is to be able to reuse the same file source file in both the main
> kernel and the decompressor, sometimes rebuilding it with differing
> options from the main kernel build.
>
> As the two environments are entirely separate, it is not always
> appropriate to clone the previously built object file.
>
> Hence, we copy the source file and re-build it.
>
> The alternative is that we could keep two copies of the same source
> in two different locations, but that's just plain idiotic just to
> satisfy some silly kbuild restriction.
>
Can the second file just contain a "#include " of the 1st?


  reply	other threads:[~2011-08-18 22:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 17:46 Relinking zImage when nothing changes Stephen Boyd
2011-08-12 18:02 ` Sam Ravnborg
2011-08-12 18:12   ` Stephen Boyd
2011-08-12 18:34     ` Sam Ravnborg
2011-08-12 18:52       ` Stephen Boyd
2011-08-12 19:00         ` [PATCH] ARM: zImage: Skip relinking if " Stephen Boyd
2011-08-12 20:48           ` Arnaud Lacombe
2011-08-12 20:55             ` Russell King - ARM Linux
2011-08-12 21:41               ` Arnaud Lacombe
2011-08-12 22:03                 ` Sam Ravnborg
2011-08-12 22:17                   ` Arnaud Lacombe
2011-08-13  6:34                     ` Sam Ravnborg
2011-08-13 16:02                       ` Arnaud Lacombe
2011-08-12 22:32             ` Arnaud Lacombe
2011-08-18  3:44               ` Nicolas Pitre
2011-08-18 18:03                 ` Arnaud Lacombe
2011-08-18 19:31                   ` Russell King - ARM Linux
2011-08-18 22:25                     ` Troy Kisky [this message]
2011-08-18 22:38                       ` Arnaud Lacombe
2011-08-12 20:20   ` Relinking zImage when " Arnaud Lacombe
2011-08-12 20:24     ` Sam Ravnborg
2011-08-12 20:31       ` Arnaud Lacombe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E4D916A.2090308@boundarydevices.com \
    --to=troy.kisky@boundarydevices.com \
    --cc=lacombar@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nico@fluxnic.net \
    --cc=sam@ravnborg.org \
    --cc=sboyd@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox