Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/Makefile.in: Tweak TARGET_ABI for MPC8548
Date: Wed, 12 Jul 2017 09:32:18 +0200	[thread overview]
Message-ID: <20170712093218.5a6a20ff@windsurf.lan> (raw)
In-Reply-To: <20170712024737.21578-1-andrew.smirnov@gmail.com>

Hello,

On Tue, 11 Jul 2017 19:47:37 -0700, Andrey Smirnov wrote:
> From: Mark Hinds <mhinds@spaceflightindustries.com>
> 
> Add -mcpu=8548 -mhard-float to TARGET_ABI so that hardware FP is used
> to build all of the package in the system.
> 
> Signed-off-by: Mark Hinds <zoronic@gmail.com>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
>  package/Makefile.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/Makefile.in b/package/Makefile.in
> index b95e5e3..958d72c 100644
> --- a/package/Makefile.in
> +++ b/package/Makefile.in
> @@ -78,7 +78,7 @@ ifeq ($(BR2_powerpc_8540),y)
>  TARGET_ABI += -mabi=spe -mfloat-gprs=single -Wa,-me500
>  endif
>  ifeq ($(BR2_powerpc_8548),y)
> -TARGET_ABI += -mabi=spe -mfloat-gprs=double -Wa,-me500x2
> +TARGET_ABI += -mabi=spe -mfloat-gprs=double -Wa,-me500x2 -mcpu=8548 -mhard-float

Adding the -mcpu is useless, because it's already passed thanks to
BR2_GCC_TARGET_CPU, defined to 8548 when BR2_powerpc_8548=y in
arch/Config.in.powerpc.

Unconditionally passing -mhard-float here is wrong, because people may
want to use soft-float, which can be selected using the
BR2_POWERPC_SOFT_FLOAT option.

When BR2_SOFT_FLOAT=y (which is selected by BR2_POWERPC_SOFT_FLOAT), we:

 * Pass --with-float=soft when building gcc (see package/gcc/gcc.mk).
   This solves the case of internal toolchain being used.

 * Add -msoft-float in the toolchain wrapper when an external toolchain
   is used (toolchain/toolchain-external/pkg-toolchain-external.mk).

However, we indeed never explicitly pass --with-float=hard (when
building gcc) or -mhard-float (for external toolchains).

Could you describe more precisely the problem you're seeing? Are you
using the internal toolchain backend, or an external toolchain? In the
latter case, which external toolchain are you using?

Best regards,

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

  reply	other threads:[~2017-07-12  7:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12  2:47 [Buildroot] [PATCH] package/Makefile.in: Tweak TARGET_ABI for MPC8548 Andrey Smirnov
2017-07-12  7:32 ` Thomas Petazzoni [this message]
2017-07-14 19:47   ` Andrey Smirnov
2017-07-14 20:59     ` Thomas Petazzoni
2017-07-14 21:18       ` Andrey Smirnov

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=20170712093218.5a6a20ff@windsurf.lan \
    --to=thomas.petazzoni@free-electrons.com \
    --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