[Buildroot] [PATCH] Config.in: add symbols for BR2_HOST_GCC_AT_LEAST_X_Y

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Thu Dec 31 09:33:43 UTC 2015


Dear Arnout Vandecappelle (Essensium/Mind),

On Thu, 31 Dec 2015 01:34:13 +0100, Arnout Vandecappelle
(Essensium/Mind) wrote:
> From: Arnout Vandecappelle <arnout at mind.be>
> 
> Some host packages need a recent gcc version. Add symbols to Config.in
> to specify the HOSTCC version. The values are passed through the
> environment, and this environment is generated in a new support script.
> 
> Also update the documentation to mention the new symbols.
> 
> [Thomas: simplify by using only make logic instead of an external
> shell script.]
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
> ---
> v4: Further simplification by Arnout: no post-processing is needed for
>     4.X versions if we keep the space in "4 9". Also use extended regex
>     to simplify the sed script a little.
> v3: Alternative version by Thomas that removes the external shell
>     script.
> v2: Use a single environment variable and select statements (Yann)
>     This makes the shell script ridiculously simple. I've tried to move
>     it to the Makefile, but then all the additional quoting etc. makes
>     it complicated again.
> ---
>  Config.in                                 | 24 ++++++++++++++++++++++++
>  Makefile                                  |  9 +++++++++
>  docs/manual/adding-packages-directory.txt |  7 +++++++
>  3 files changed, 40 insertions(+)

I had also thought about keeping the space in the value, but found the
"subst" wasn't too bad. But well, I agree that your solution further
simplifies the thing.

I'm glad we've been able to move from a somewhat complicated and
convoluted solution (a shell script that generates a list of
environment variables) to a solution that is in fact completely trivial.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the buildroot mailing list