public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] grub: disable build on armv7ve/a with hardfp
       [not found] <171ECBAF5E33994B.19418@lists.openembedded.org>
@ 2022-10-19  2:54 ` mingli.yu
  2022-10-19  9:46   ` [OE-core] " Andrei Gherzan
  0 siblings, 1 reply; 2+ messages in thread
From: mingli.yu @ 2022-10-19  2:54 UTC (permalink / raw)
  To: openembedded-core

From: Mingli Yu <mingli.yu@windriver.com>

The commit(75dbdea940 grub: Allow build on armv7ve/a with softfp)
enable build on armv7ve/a with softfp, but it acutally enable
build on armv7ve/a with hardfp altogether and result in below build
failure:
 | checking for compile options to get strict alignment... -mno-unaligned-access
 | checking if compiler generates unaligned accesses... no
 | checking if C symbols get an underscore after compilation... no
 | checking whether target compiler is working... no
 | configure: error: cannot compile for the target

So update the check to disable build on armv7ve/a with hardfp.

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 meta/recipes-bsp/grub/grub2.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 2545b99b6a..7161c4560b 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -50,8 +50,8 @@ COMPATIBLE_HOST = "${GRUB_COMPATIBLE_HOST}"
 # Grub doesn't support hard float toolchain and won't be able to forcefully
 # disable it on some of the target CPUs. See 'configure.ac' for
 # supported/unsupported CPUs in hardfp.
-COMPATIBLE_HOST:armv7a = "${@'null' if d.getVar('TUNE_CCARGS_MFLOAT') == 'hardfp' else d.getVar('GRUB_COMPATIBLE_HOST')}"
-COMPATIBLE_HOST:armv7ve = "${@'null' if d.getVar('TUNE_CCARGS_MFLOAT') == 'hardfp' else d.getVar('GRUB_COMPATIBLE_HOST')}"
+COMPATIBLE_HOST:armv7a = "${@'null' if bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', True, False, d) else d.getVar('GRUB_COMPATIBLE_HOST')}"
+COMPATIBLE_HOST:armv7ve = "${@'null' if bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', True, False, d) else d.getVar('GRUB_COMPATIBLE_HOST')}"
 
 # configure.ac has code to set this automagically from the target tuple
 # but the OE freeform one (core2-foo-bar-linux) don't work with that.
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [OE-core] [PATCH] grub: disable build on armv7ve/a with hardfp
  2022-10-19  2:54 ` [PATCH] grub: disable build on armv7ve/a with hardfp mingli.yu
@ 2022-10-19  9:46   ` Andrei Gherzan
  0 siblings, 0 replies; 2+ messages in thread
From: Andrei Gherzan @ 2022-10-19  9:46 UTC (permalink / raw)
  To: Yu, Mingli; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2033 bytes --]

Hi,

On Wed, Oct 19, 2022 at 3:54 AM Yu, Mingli <mingli.yu@windriver.com> wrote:

> From: Mingli Yu <mingli.yu@windriver.com>
>
> The commit(75dbdea940 grub: Allow build on armv7ve/a with softfp)
> enable build on armv7ve/a with softfp, but it acutally enable
> build on armv7ve/a with hardfp altogether and result in below build
> failure:
>  | checking for compile options to get strict alignment...
> -mno-unaligned-access
>  | checking if compiler generates unaligned accesses... no
>  | checking if C symbols get an underscore after compilation... no
>  | checking whether target compiler is working... no
>  | configure: error: cannot compile for the target
>
> So update the check to disable build on armv7ve/a with hardfp.
>
> Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> ---
>  meta/recipes-bsp/grub/grub2.inc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-bsp/grub/grub2.inc
> b/meta/recipes-bsp/grub/grub2.inc
> index 2545b99b6a..7161c4560b 100644
> --- a/meta/recipes-bsp/grub/grub2.inc
> +++ b/meta/recipes-bsp/grub/grub2.inc
> @@ -50,8 +50,8 @@ COMPATIBLE_HOST = "${GRUB_COMPATIBLE_HOST}"
>  # Grub doesn't support hard float toolchain and won't be able to
> forcefully
>  # disable it on some of the target CPUs. See 'configure.ac' for
>  # supported/unsupported CPUs in hardfp.
> -COMPATIBLE_HOST:armv7a = "${@'null' if d.getVar('TUNE_CCARGS_MFLOAT') ==
> 'hardfp' else d.getVar('GRUB_COMPATIBLE_HOST')}"
> -COMPATIBLE_HOST:armv7ve = "${@'null' if d.getVar('TUNE_CCARGS_MFLOAT') ==
> 'hardfp' else d.getVar('GRUB_COMPATIBLE_HOST')}"
> +COMPATIBLE_HOST:armv7a = "${@'null' if
> bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', True, False, d) else
> d.getVar('GRUB_COMPATIBLE_HOST')}"
> +COMPATIBLE_HOST:armv7ve = "${@'null' if
> bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', True, False, d) else
> d.getVar('GRUB_COMPATIBLE_HOST')}"
>

Sounds like a typo on my side. I'll check my testing as I'm curious how
I've managed to miss this. Thanks for fixing it!

Andrei

[-- Attachment #2: Type: text/html, Size: 2948 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-19  9:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <171ECBAF5E33994B.19418@lists.openembedded.org>
2022-10-19  2:54 ` [PATCH] grub: disable build on armv7ve/a with hardfp mingli.yu
2022-10-19  9:46   ` [OE-core] " Andrei Gherzan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox