Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] add pre-build script
Date: Thu, 14 Feb 2013 23:10:04 +0100	[thread overview]
Message-ID: <511D60BC.9000205@mind.be> (raw)
In-Reply-To: <20130214180402.6b2dbb17@skate>

On 14/02/13 18:04, Thomas Petazzoni wrote:
> Dear Spenser Gilliland,
>
> On Thu, 14 Feb 2013 10:28:24 -0600, Spenser Gilliland wrote:
>
>> I'm not doing this with the specific implementation posted.  I'm just
>> saying it would be a nice feature to have.  Many device trees specify
>> processor/arch features and optimized cflags can be constructed from
>> this data.
>>
>> I currently do this outside of buildroot and just provide
>> BR2_TARGET_OPTIMIZATION on the make command line from the buildscripts
>> for the hardware.
>>
>> It would be nice to have buildroot completely self contained and not
>> require the software developers to download the additional hardware
>> files.
>
> Indeed, but the pre-build script approach you posted would not allow to
> customize the CFLAGS.

  Spenser didn't post it...

> The CFLAGS are part of Buildroot .config file,
> which is loaded at the time you run "make".

  Ah, right, major shortcoming if the pre-build script can't update the 
.config...

> So when your pre-build
> script gets executed by Buildroot, make has already loaded the value of
> BR2_TARGET_OPTIMIZATION.
>
> You would have to make a specific script that returns custom CFLAGS,
> and add some code in Buildroot that does:
>
> CUSTOM_CFLAGS = $(shell ./your/custom/script)

  This is a good place to do := instead of =, otherwise the script gets 
re-run for every build step...

  Regards,
  Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  reply	other threads:[~2013-02-14 22:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-13 13:54 [Buildroot] [PATCH] add pre-build script Joe Halpin
2013-02-13 22:24 ` Arnout Vandecappelle
2013-02-14  1:04   ` Spenser Gilliland
2013-02-14  7:56     ` Thomas Petazzoni
2013-02-14 16:28       ` Spenser Gilliland
2013-02-14 17:04         ` Thomas Petazzoni
2013-02-14 22:10           ` Arnout Vandecappelle [this message]
2013-02-15  5:09             ` Thomas Petazzoni
2013-02-15 20:50               ` Spenser Gilliland
     [not found]   ` <05255DE50A102443A25D42F2CCAC151FA58C27@LUMEXCH.luminatorusa.com>
     [not found]     ` <511CF47A.7050004@mind.be>
2013-02-14 14:29       ` [Buildroot] [PATCH] add pre-build script. Patch v2 Joe Halpin
2013-02-14 15:08   ` [Buildroot] [PATCH] add pre-build scrip. Patch V2 Joe Halpin

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=511D60BC.9000205@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox