All of lore.kernel.org
 help / color / mirror / Atom feed
* commit 3661261f breaks arm64
@ 2015-01-28 18:33 Leif Lindholm
  2015-01-28 18:58 ` Andrei Borzenkov
  0 siblings, 1 reply; 5+ messages in thread
From: Leif Lindholm @ 2015-01-28 18:33 UTC (permalink / raw)
  To: grub-devel

commit 3661261fe17a8fe19681073889b5b36ec1ee823d,
"Always add -msoft-float to avoid compiler generating float
arithmetics." breaks the arm64 build.

-msoft-float is not a valid command line option for aarch64 (as far as
I can see, it is technically a target-specific option which just
happens to exist for most targets - including arm).

This setting will need to be conditionalised somehow.
An option that works for arm64 is -march=armv8-a+nofp+nosimd.

Would something like this be an acceptable workaround?:

diff --git a/configure.ac b/configure.ac
index a3bca06..c99e1ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -678,7 +678,11 @@ fi
 # that floats are a good fit to run instead of what's written in the
 # code.
 # Given that floating point unit is disabled (if present to begin
 # with)
 # when GRUB is running which may result in various hard crashes.
-TARGET_CFLAGS="$TARGET_CFLAGS -msoft-float"
+if ( test "x$target_cpu" = xarm64 ); then
+  TARGET_CFLAGS="$TARGET_CFLAGS -march=armv8-a+nofp+nosimd"
+else
+  TARGET_CFLAGS="$TARGET_CFLAGS -msoft-float"
+fi
 
 # By default, GCC 4.4 generates .eh_frame sections containing unwind
 # information in some cases where it previously did not. GRUB doesn't
 # need

/
    Leif


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

* Re: commit 3661261f breaks arm64
  2015-01-28 18:33 commit 3661261f breaks arm64 Leif Lindholm
@ 2015-01-28 18:58 ` Andrei Borzenkov
  2015-01-28 19:36   ` Leif Lindholm
  0 siblings, 1 reply; 5+ messages in thread
From: Andrei Borzenkov @ 2015-01-28 18:58 UTC (permalink / raw)
  To: Leif Lindholm; +Cc: grub-devel

В Wed, 28 Jan 2015 18:33:59 +0000
Leif Lindholm <leif.lindholm@linaro.org> пишет:

> commit 3661261fe17a8fe19681073889b5b36ec1ee823d,
> "Always add -msoft-float to avoid compiler generating float
> arithmetics." breaks the arm64 build.
> 
> -msoft-float is not a valid command line option for aarch64 (as far as
> I can see, it is technically a target-specific option which just
> happens to exist for most targets - including arm).
> 
> This setting will need to be conditionalised somehow.
> An option that works for arm64 is -march=armv8-a+nofp+nosimd.
> 
> Would something like this be an acceptable workaround?:
> 
> diff --git a/configure.ac b/configure.ac
> index a3bca06..c99e1ea 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -678,7 +678,11 @@ fi
>  # that floats are a good fit to run instead of what's written in the
>  # code.
>  # Given that floating point unit is disabled (if present to begin
>  # with)
>  # when GRUB is running which may result in various hard crashes.
> -TARGET_CFLAGS="$TARGET_CFLAGS -msoft-float"
> +if ( test "x$target_cpu" = xarm64 ); then

Why subshell?

> +  TARGET_CFLAGS="$TARGET_CFLAGS -march=armv8-a+nofp+nosimd"
> +else
> +  TARGET_CFLAGS="$TARGET_CFLAGS -msoft-float"
> +fi
>  
>  # By default, GCC 4.4 generates .eh_frame sections containing unwind
>  # information in some cases where it previously did not. GRUB doesn't
>  # need
> 
> /
>     Leif
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel



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

* Re: commit 3661261f breaks arm64
  2015-01-28 18:58 ` Andrei Borzenkov
@ 2015-01-28 19:36   ` Leif Lindholm
  2015-01-28 19:39     ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 5+ messages in thread
From: Leif Lindholm @ 2015-01-28 19:36 UTC (permalink / raw)
  To: Andrei Borzenkov; +Cc: grub-devel

On Wed, Jan 28, 2015 at 09:58:56PM +0300, Andrei Borzenkov wrote:
> В Wed, 28 Jan 2015 18:33:59 +0000
> Leif Lindholm <leif.lindholm@linaro.org> пишет:
> 
> > commit 3661261fe17a8fe19681073889b5b36ec1ee823d,
> > "Always add -msoft-float to avoid compiler generating float
> > arithmetics." breaks the arm64 build.
> > 
> > -msoft-float is not a valid command line option for aarch64 (as far as
> > I can see, it is technically a target-specific option which just
> > happens to exist for most targets - including arm).
> > 
> > This setting will need to be conditionalised somehow.
> > An option that works for arm64 is -march=armv8-a+nofp+nosimd.
> > 
> > Would something like this be an acceptable workaround?:
> > 
> > diff --git a/configure.ac b/configure.ac
> > index a3bca06..c99e1ea 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -678,7 +678,11 @@ fi
> >  # that floats are a good fit to run instead of what's written in the
> >  # code.
> >  # Given that floating point unit is disabled (if present to begin
> >  # with)
> >  # when GRUB is running which may result in various hard crashes.
> > -TARGET_CFLAGS="$TARGET_CFLAGS -msoft-float"
> > +if ( test "x$target_cpu" = xarm64 ); then
> 
> Why subshell?

Brainless cargo culting to look similar to the preceding $target_cpu
checker, which actually does something relevant with its subshell.

If I drop that, is that an acceptable fix?
 
> > +  TARGET_CFLAGS="$TARGET_CFLAGS -march=armv8-a+nofp+nosimd"
> > +else
> > +  TARGET_CFLAGS="$TARGET_CFLAGS -msoft-float"
> > +fi
> >  
> >  # By default, GCC 4.4 generates .eh_frame sections containing unwind
> >  # information in some cases where it previously did not. GRUB doesn't
> >  # need
> > 
> > /
> >     Leif
> > 
> > _______________________________________________
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > https://lists.gnu.org/mailman/listinfo/grub-devel
> 


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

* Re: commit 3661261f breaks arm64
  2015-01-28 19:36   ` Leif Lindholm
@ 2015-01-28 19:39     ` Vladimir 'phcoder' Serbinenko
  2015-01-28 20:48       ` Leif Lindholm
  0 siblings, 1 reply; 5+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2015-01-28 19:39 UTC (permalink / raw)
  To: The development of GRUB 2; +Cc: Andrey Borzenkov

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

Le 2015-01-28 20:37, "Leif Lindholm" <leif.lindholm@linaro.org> a écrit :
>
> On Wed, Jan 28, 2015 at 09:58:56PM +0300, Andrei Borzenkov wrote:
> > В Wed, 28 Jan 2015 18:33:59 +0000
> > Leif Lindholm <leif.lindholm@linaro.org> пишет:
> >
> > > commit 3661261fe17a8fe19681073889b5b36ec1ee823d,
> > > "Always add -msoft-float to avoid compiler generating float
> > > arithmetics." breaks the arm64 build.
> > >
> > > -msoft-float is not a valid command line option for aarch64 (as far as
> > > I can see, it is technically a target-specific option which just
> > > happens to exist for most targets - including arm).
> > >
> > > This setting will need to be conditionalised somehow.
> > > An option that works for arm64 is -march=armv8-a+nofp+nosimd.
> > >
> > > Would something like this be an acceptable workaround?:
> > >
> > > diff --git a/configure.ac b/configure.ac
> > > index a3bca06..c99e1ea 100644
> > > --- a/configure.ac
> > > +++ b/configure.ac
> > > @@ -678,7 +678,11 @@ fi
> > >  # that floats are a good fit to run instead of what's written in the
> > >  # code.
> > >  # Given that floating point unit is disabled (if present to begin
> > >  # with)
> > >  # when GRUB is running which may result in various hard crashes.
> > > -TARGET_CFLAGS="$TARGET_CFLAGS -msoft-float"
> > > +if ( test "x$target_cpu" = xarm64 ); then
> >
> > Why subshell?
>
> Brainless cargo culting to look similar to the preceding $target_cpu
> checker, which actually does something relevant with its subshell.
>
> If I drop that, is that an acceptable fix?
Yes.
I probably should define guidelines for platform-specific options and clean
up existing inconsistencies but it's low priority.
> > > +  TARGET_CFLAGS="$TARGET_CFLAGS -march=armv8-a+nofp+nosimd"
> > > +else
> > > +  TARGET_CFLAGS="$TARGET_CFLAGS -msoft-float"
> > > +fi
> > >
> > >  # By default, GCC 4.4 generates .eh_frame sections containing unwind
> > >  # information in some cases where it previously did not. GRUB doesn't
> > >  # need
> > >
> > > /
> > >     Leif
> > >
> > > _______________________________________________
> > > Grub-devel mailing list
> > > Grub-devel@gnu.org
> > > https://lists.gnu.org/mailman/listinfo/grub-devel
> >
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel

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

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

* Re: commit 3661261f breaks arm64
  2015-01-28 19:39     ` Vladimir 'phcoder' Serbinenko
@ 2015-01-28 20:48       ` Leif Lindholm
  0 siblings, 0 replies; 5+ messages in thread
From: Leif Lindholm @ 2015-01-28 20:48 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Andrey Borzenkov

On Wed, Jan 28, 2015 at 08:39:43PM +0100, Vladimir 'phcoder' Serbinenko wrote:
> > > Why subshell?
> >
> > Brainless cargo culting to look similar to the preceding $target_cpu
> > checker, which actually does something relevant with its subshell.
> >
> > If I drop that, is that an acceptable fix?
> Yes.
> I probably should define guidelines for platform-specific options and clean
> up existing inconsistencies but it's low priority.

Thanks - pushed.

/
    Leif


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

end of thread, other threads:[~2015-01-28 20:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-28 18:33 commit 3661261f breaks arm64 Leif Lindholm
2015-01-28 18:58 ` Andrei Borzenkov
2015-01-28 19:36   ` Leif Lindholm
2015-01-28 19:39     ` Vladimir 'phcoder' Serbinenko
2015-01-28 20:48       ` Leif Lindholm

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.