All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Arnaud Lacombe <lacombar@gmail.com>
Cc: Nicolas Pitre <nico@fluxnic.net>,
	linux-kbuild@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] Kbuild: allow code re-use across different directories
Date: Fri, 09 Sep 2011 14:32:28 +0200	[thread overview]
Message-ID: <4E6A075C.1050102@suse.cz> (raw)
In-Reply-To: <CACqU3MV0PW=Cp3Px2Jjs3SSOBbQSSA7P=a1RNy4x9jKEB-VEiA@mail.gmail.com>

On 9.9.2011 03:22, Arnaud Lacombe wrote:
> Hi,
> 
> On Thu, Sep 8, 2011 at 4:33 PM, Nicolas Pitre <nico@fluxnic.net> wrote:
>> On Thu, 8 Sep 2011, Arnaud Lacombe wrote:
>>
>>> you missed:
>>>
>>>  # Make sure files are removed during clean
>>> -extra-y       += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S
>>> +extra-y       += piggy.gzip piggy.lzo piggy.lzma
>>>
>>> This confused make.
>>
>> Well... that was suttle.
>>
> he, welcome to make(1) world :)
> 
>> So yes, your patch may certainly be useful to a couple cases, and it
>> works fine for this lib1func.S.
>>
>> It doesn't help me much in the following situation though.  What I
>> actually want to achieve is to compile arch/arm/boot/compressed/fdt_rw.o
>> from scripts/dtc/libfdt/fdt_rw.c, however I want it to include my local
>> version of libfdt_env.h rather than scripts/dtc/libfdt/libfdt_env.h.  I
>> still haven't found a way to convince gcc to do that.
>>
> The only choice you have in gcc, is to use -I-, to construct:
> 
>  $(CROSS_COMPILE)gcc -I$(srctree)/arch/arm/boot/compressed -I- [...]
> 
> however, it's been marked as deprecated, but still usable as of today
> snapshot of 4.7.0. Its replacement, -iquote, do not provide this
> functionnality, that is to override the source file origin directory
> as search directory for #include "...".

Or you modify libfdt to support -DLIBFDT_ENV=libfdt_arm.h or similar.

Michal

WARNING: multiple messages have this Message-ID (diff)
From: mmarek@suse.cz (Michal Marek)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] Kbuild: allow code re-use across different directories
Date: Fri, 09 Sep 2011 14:32:28 +0200	[thread overview]
Message-ID: <4E6A075C.1050102@suse.cz> (raw)
In-Reply-To: <CACqU3MV0PW=Cp3Px2Jjs3SSOBbQSSA7P=a1RNy4x9jKEB-VEiA@mail.gmail.com>

On 9.9.2011 03:22, Arnaud Lacombe wrote:
> Hi,
> 
> On Thu, Sep 8, 2011 at 4:33 PM, Nicolas Pitre <nico@fluxnic.net> wrote:
>> On Thu, 8 Sep 2011, Arnaud Lacombe wrote:
>>
>>> you missed:
>>>
>>>  # Make sure files are removed during clean
>>> -extra-y       += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S
>>> +extra-y       += piggy.gzip piggy.lzo piggy.lzma
>>>
>>> This confused make.
>>
>> Well... that was suttle.
>>
> he, welcome to make(1) world :)
> 
>> So yes, your patch may certainly be useful to a couple cases, and it
>> works fine for this lib1func.S.
>>
>> It doesn't help me much in the following situation though.  What I
>> actually want to achieve is to compile arch/arm/boot/compressed/fdt_rw.o
>> from scripts/dtc/libfdt/fdt_rw.c, however I want it to include my local
>> version of libfdt_env.h rather than scripts/dtc/libfdt/libfdt_env.h.  I
>> still haven't found a way to convince gcc to do that.
>>
> The only choice you have in gcc, is to use -I-, to construct:
> 
>  $(CROSS_COMPILE)gcc -I$(srctree)/arch/arm/boot/compressed -I- [...]
> 
> however, it's been marked as deprecated, but still usable as of today
> snapshot of 4.7.0. Its replacement, -iquote, do not provide this
> functionnality, that is to override the source file origin directory
> as search directory for #include "...".

Or you modify libfdt to support -DLIBFDT_ENV=libfdt_arm.h or similar.

Michal

  reply	other threads:[~2011-09-09 12:32 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-20  0:37 [RFC] Kbuild: allow code re-use across different directories Arnaud Lacombe
2011-08-20  0:37 ` Arnaud Lacombe
2011-08-22  8:42 ` Cong Wang
2011-08-22  8:42   ` Cong Wang
2011-08-30  0:31 ` Arnaud Lacombe
2011-08-30  0:31   ` Arnaud Lacombe
2011-08-30  4:32   ` Nicolas Pitre
2011-08-30  4:32     ` Nicolas Pitre
2011-08-30  4:36     ` Arnaud Lacombe
2011-08-30  4:36       ` Arnaud Lacombe
2011-09-07 19:07 ` Nicolas Pitre
2011-09-07 19:07   ` Nicolas Pitre
2011-09-07 19:34   ` Arnaud Lacombe
2011-09-07 19:34     ` Arnaud Lacombe
2011-09-07 19:59     ` Nicolas Pitre
2011-09-07 19:59       ` Nicolas Pitre
2011-09-07 20:52       ` Arnaud Lacombe
2011-09-07 20:52         ` Arnaud Lacombe
2011-09-08  4:50       ` Arnaud Lacombe
2011-09-08  4:50         ` Arnaud Lacombe
2011-09-08 20:33         ` Nicolas Pitre
2011-09-08 20:33           ` Nicolas Pitre
2011-09-09  1:22           ` Arnaud Lacombe
2011-09-09  1:22             ` Arnaud Lacombe
2011-09-09 12:32             ` Michal Marek [this message]
2011-09-09 12:32               ` Michal Marek
2011-09-09 16:16               ` Arnaud Lacombe
2011-09-09 16:16                 ` Arnaud Lacombe
2011-09-08 18:24 ` Arnaud Lacombe
2011-09-09 12:30 ` Michal Marek
2011-09-09 12:30   ` Michal Marek
2011-09-13 21:13   ` Arnaud Lacombe
2011-09-13 21:13     ` Arnaud Lacombe
2011-09-14  1:48     ` Michal Marek
2011-09-14  1:48       ` Michal Marek

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=4E6A075C.1050102@suse.cz \
    --to=mmarek@suse.cz \
    --cc=lacombar@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nico@fluxnic.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.