All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 01/15] toolchain/helpers: add mandatory check for uclibc toolchain options
Date: Sat, 14 Mar 2015 23:18:50 +0100	[thread overview]
Message-ID: <20150314221850.GF4009@free.fr> (raw)
In-Reply-To: <1426270934-15499-2-git-send-email-gustavo@zacarias.com.ar>

Gustavo, All,

On 2015-03-13 15:22 -0300, Gustavo Zacarias spake thusly:
> Take 'm' as parameter in $2 (buildroot option name) in
> check_uclibc_feature to indicate that a toolchain option is mandatory,
> and bail out with an appropiate message if that's the case.

I had a hard time figuring out what you were doing here...

What about:

    toolchain/helpers: add check for mandatory uClibc options

    We currently only check that the Buildroot configuration matches
    what is available in the toolchain.

    Since we're going to remove the check for LFS and make it a
    mandatory feature, we will lose the corresponding Buildroot
    option, so we won't be able to use check_uclibc_feature as-is.

    Introduce a special, magic value passed as the Buildroot option
    name to recognise checks for mandatory uClibc options that do not
    have a corresponding option in Buldroot.

    If the Buildroot option name is 'm', then the check is against
    a mandatory uClibc option.

    If a mandatory uClibc option is missing, we reject the toolchain
    as being unusable by Buildroot.

However, I don't think 'm' is the most appropriate. That's what somehow
confused me: wtf are we concerned about tristates? What about making
the check against an empty Buildroot option name, instead? No Buildroot
option name means there's no correlation to be made, and hence is a
mandatory uClibc option...

> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
>  toolchain/helpers.mk | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
> index 3121da4..ef657ee 100644
> --- a/toolchain/helpers.mk
> +++ b/toolchain/helpers.mk
> @@ -238,6 +238,7 @@ check_musl = \
>  # Check the conformity of Buildroot configuration with regard to the
>  # uClibc configuration of the external toolchain, for a particular
>  # feature.
> +# If 'Buildroot option name' ($2) = 'm' it means a mandatory option.
>  #
>  # $1: uClibc macro name
>  # $2: Buildroot option name
> @@ -246,6 +247,10 @@ check_musl = \
>  #
>  check_uclibc_feature = \
>  	IS_IN_LIBC=`grep -q "\#define $(1) 1" $(3) && echo y` ; \
> +	if [ "$(2)" = "m" -a "$${IS_IN_LIBC}" != "y" ] ; then \

With my proposal, that'd read:

    if [ -z "$(2)" -a "$${IS_IN_LIBC}" != "y" ] ; then \

Otherwise, code looks good. :-)

Regards,
Yann E. MORIN.

> +		echo "$(4) not available in C library, toolchain unsuitable for Buildroot" ; \
> +		exit 1 ; \
> +	fi ; \
>  	if [ "$($(2))" != "y" -a "$${IS_IN_LIBC}" = "y" ] ; then \
>  		echo "$(4) available in C library, please enable $(2)" ; \
>  		exit 1 ; \
> -- 
> 2.0.5
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2015-03-14 22:18 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13 18:21 [Buildroot] [PATCH 00/15] Drop non-largefile support Gustavo Zacarias
2015-03-13 18:22 ` [Buildroot] [PATCH 01/15] toolchain/helpers: add mandatory check for uclibc toolchain options Gustavo Zacarias
2015-03-14 22:18   ` Yann E. MORIN [this message]
2015-03-17 12:18     ` Gustavo Zacarias
2015-03-17 14:13     ` Gustavo Zacarias
2015-03-13 18:22 ` [Buildroot] [PATCH 02/15] toolchain/helpers: make LFS mandatory for uclibc Gustavo Zacarias
2015-03-14 22:22   ` Yann E. MORIN
2015-03-13 18:22 ` [Buildroot] [PATCH 03/15] toolchain-common: default to Y for LARGEFILE Gustavo Zacarias
2015-03-14 22:34   ` Yann E. MORIN
2015-03-13 18:22 ` [Buildroot] [PATCH 04/15] toolchain: remove LARGEFILE selects Gustavo Zacarias
2015-03-14 22:36   ` Yann E. MORIN
2015-03-17 15:11     ` Gustavo Zacarias
2015-03-13 18:22 ` [Buildroot] [PATCH 05/15] gcc/final: drop non-lfs builds Gustavo Zacarias
2015-03-13 18:22 ` [Buildroot] [PATCH 06/15] package infra: drop non-lfs support Gustavo Zacarias
2015-03-14 22:46   ` Yann E. MORIN
2015-03-13 18:22 ` [Buildroot] [PATCH 07/15] package/uclibc: drop non-largefile support Gustavo Zacarias
2015-03-14 22:47   ` Yann E. MORIN
2015-03-13 18:22 ` [Buildroot] [PATCH 08/15] configs: drop largefile option Gustavo Zacarias
2015-03-14 22:47   ` Yann E. MORIN
2015-03-13 18:22 ` [Buildroot] [PATCH 09/15] busybox: force lfs build Gustavo Zacarias
2015-03-14 22:49   ` Yann E. MORIN
2015-03-13 18:22 ` [Buildroot] [PATCH 10/15] system: drop largefile depends Gustavo Zacarias
2015-03-14 22:50   ` Yann E. MORIN
2015-03-13 18:22 ` [Buildroot] [PATCH 11/15] boot/gummiboot: " Gustavo Zacarias
2015-03-14 22:52   ` Yann E. MORIN
2015-03-13 18:22 ` [Buildroot] [PATCH 12/15] packages: remove (non-)lfs dependencies and tweaks Gustavo Zacarias
2015-03-13 18:22 ` [Buildroot] [PATCH 13/15] toolchain-common: drop BR2_LARGEFILE Gustavo Zacarias
2015-03-14 22:53   ` Yann E. MORIN
2015-03-13 18:22 ` [Buildroot] [PATCH 14/15] packages: remove non-lfs enabler patches Gustavo Zacarias
2015-03-13 18:22 ` [Buildroot] [PATCH 15/15] docs/manual: remove references to largefile Gustavo Zacarias
2015-03-14 22:56   ` Yann E. MORIN
2015-03-14 22:58 ` [Buildroot] [PATCH 00/15] Drop non-largefile support Yann E. MORIN
2015-03-17 12:23   ` Gustavo Zacarias

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=20150314221850.GF4009@free.fr \
    --to=yann.morin.1998@free.fr \
    --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 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.