Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 2/2] ext-toolchain-wrapper: fix uboot/linux with hardfp
Date: Sat, 20 Jul 2013 12:36:23 +0200	[thread overview]
Message-ID: <20130720103623.GB3507@free.fr> (raw)
In-Reply-To: <1374276718-14000-2-git-send-email-spenser@gillilanding.com>

Spenser, All,

On 2013-07-19 18:31 -0500, Spenser Gilliland spake thusly:
> The linux kernel and uboot specify -msoft-float in order to prevent floating
> point code from being generated.  This causes a conflict when -mfloat-abi=hard
> or -mfloat-abi options are specified in the wrapper. This patch removes the
> -mfloat-abi option from the options generated by the wrapper only when -msoft-float, -mhard-float or -mfloat-abi are specified by the user.

Please, wrap your commit log at <80 chars.

> 
> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>

Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Yet a few minor nits below.

Regards,
Yann E. MORIN.

> ---
>  .../toolchain-external/ext-toolchain-wrapper.c     | 37 +++++++++++++++++++---
>  1 file changed, 33 insertions(+), 4 deletions(-)
> 
> diff --git a/toolchain/toolchain-external/ext-toolchain-wrapper.c b/toolchain/toolchain-external/ext-toolchain-wrapper.c
> index dc473be..3b70610 100644
> --- a/toolchain/toolchain-external/ext-toolchain-wrapper.c
> +++ b/toolchain/toolchain-external/ext-toolchain-wrapper.c
[--SNIP--]
> @@ -61,6 +59,25 @@ static char *predef_args[] = {
>  #endif
>  };
>  
> +/* use_default_float_abi - determine if the user is trying to override the
> + * floating point abi.
> + *  return 0 if the user is attempting to override the float abi
> + *  otherwise return 1

I'd state it differently:

  use_default_float_abi - check whether we should pass our own float ABI
  flags, or use the ones provided on the command line
  Returns:
    0: do not add our -float-abi= flag
    1: do add our -mfloat-abi= flags

> + */
> +int use_default_float_abi(int argc, char **argv) {
> +	int arg;
> +	for (arg = 1; arg < argc; arg++) {
> +		if (strncmp(argv[arg],"-mfloat-abi=", sizeof("-mfloat-abi=")/sizeof(char)-1) == 0 ||

I think that we can assume that sizeof(char) == 1 everywhere Buildroot
is expected to run, no? ;-)

> +			strcmp(argv[arg],"-msoft-float") == 0 ||
> +			strcmp(argv[arg],"-mhard-float") == 0 ) {
> +			printf("DETECTED FLOAT ABI\n");
> +			return 0;
> +		}
> +	}
> +	

No spaces/tabs on empty lines.

Otherwise, loogs good, and most importantly, fixes my kernel build!
Hurray! :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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:[~2013-07-20 10:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-19 23:31 [Buildroot] [PATCH v3 1/2] ext-toolchain-wrapper: fix typo on s/BR2_FPU/BR_FPU/ Spenser Gilliland
2013-07-19 23:31 ` [Buildroot] [PATCH v3 2/2] ext-toolchain-wrapper: fix uboot/linux with hardfp Spenser Gilliland
2013-07-20 10:36   ` Yann E. MORIN [this message]
2013-07-20 22:59   ` Peter Korsgaard
2013-07-20  9:58 ` [Buildroot] [PATCH v3 1/2] ext-toolchain-wrapper: fix typo on s/BR2_FPU/BR_FPU/ Yann E. MORIN
2013-07-20 22:14 ` Peter Korsgaard

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=20130720103623.GB3507@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox