All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francis Moreau <francis.moro@gmail.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Kbuild: how to cleanly retrieve information compilation about the last build
Date: Sat, 16 Apr 2011 16:04:57 +0200	[thread overview]
Message-ID: <BANLkTi=wdDsrV+ikoxLhnTpLhQTuVKW0mA@mail.gmail.com> (raw)
In-Reply-To: <20110416135912.GA1044@merkur.ravnborg.org>

Hello,

On Sat, Apr 16, 2011 at 3:59 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Sat, Apr 16, 2011 at 10:05:43AM +0200, Francis Moreau wrote:
>> Hello Sam,
>>
>> Maybe could suggest something, it would be great.
>>
>> Thanks
>>
>> On Thu, Apr 14, 2011 at 9:13 AM, Francis Moreau <francis.moro@gmail.com> wrote:
>> > Hello,
>> >
>> > I'm writing a script to automatise some parts of my kernel compilation process.
>> >
>> > From those scripts I'd like to be able to call the top makefile the
>> > same way it had been called during its last invocation.
>> >
>> > For example, if Ido:
>> >
>> >     $ make CC=my-gcc CFLAGS="-g -fwhatever"
>> >
>> > I would like to retrieve the "CC=my-gcc CFLAGS="-g -fwhatever" part of
>> > the last invocation so my script can call make with the same
>> > arguments.
>> >
>> > Is this possible ?
>
> There is nothing made in kbuild to preserve the value of randomly
> added variable assignments on the command-line.
>
> If you specify O=... then a Makfile file is generated in the output
> directory that thus emulate the O= setting.
>
> CCFLAGS has btw. no effect when you build a kernel.

Ok CCFLAGS was a poor example.

BTW are the allowed flags documented somewhere ?

> If you on a regular basis need to pass flags on the command-line
> then you likely are doing something odd as this is not the typical use.
> So please reconsider what you are doing.

Ok, if I'm doing something wrong, I'd like to be corrected.

What's wrong with passing those flags for example:

  $ make ARCH=arm CROSS_COMPILE=arm-linux

or

   $ make CC=distcc

?

> And you can as pointed out by Américo Wang always save the
> command line in your calling script.

No, because the makefile invocation is not always done by my script.

For example a user can do:

  $ make ARCH=arm CROSS_COMPILE=arm-linux-

Then call my script and expect it to pass the same flags to make.

Thanks
-- 
Francis

  reply	other threads:[~2011-04-16 14:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-14  7:13 Kbuild: how to cleanly retrieve information compilation about the last build Francis Moreau
2011-04-16  8:05 ` Francis Moreau
2011-04-16 13:59   ` Sam Ravnborg
2011-04-16 14:04     ` Francis Moreau [this message]
2011-04-16 14:33       ` Valdis.Kletnieks
2011-04-16 14:45         ` Francis Moreau
2011-04-16 15:08           ` Valdis.Kletnieks
2011-04-16 15:47             ` Francis Moreau
2011-04-16 15:57               ` Francis Moreau
2011-04-16 19:46                 ` Valdis.Kletnieks
2011-04-16 19:54                   ` Francis Moreau
2011-04-16 14:50       ` Sam Ravnborg
2011-04-16  8:26 ` Américo Wang
2011-04-16 14:00   ` Francis Moreau
2011-04-17  4:57     ` Américo Wang
2011-04-17 10:27       ` Francis Moreau
2011-04-19 19:24         ` Jonathan Neuschäfer

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='BANLkTi=wdDsrV+ikoxLhnTpLhQTuVKW0mA@mail.gmail.com' \
    --to=francis.moro@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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 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.