All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] configure: disable arm movw/movt relocations for GCC
@ 2019-06-04 11:39 Leif Lindholm
  2019-06-04 11:49 ` Alexander Graf
  2019-07-11 15:54 ` Vladimir 'phcoder' Serbinenko
  0 siblings, 2 replies; 4+ messages in thread
From: Leif Lindholm @ 2019-06-04 11:39 UTC (permalink / raw)
  To: grub-devel; +Cc: Alexander Graf, Daniel Kiper

When building for arm, we already disable movw/movt relocations for clang,
since they are incompatible with PE.

When building with bare metal GCC toolchains (like the one used in the
travis ci scripts), we end up with these relocations again. So add an
additional test for the '-mword-relocations' flag used by GCC.

Reported-by: Alexander Graf <agraf@csgraf.de>
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
---

Note: unless this is added before the travis-ci set, the arm ci build
will fail when enabled.

---

 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 08b518fcc..e7725a546 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1198,7 +1198,8 @@ if test "x$target_cpu" = xarm; then
   AC_CACHE_CHECK([for options to disable movt and movw], grub_cv_target_cc_mno_movt, [
     grub_cv_target_cc_mno_movt=no
     for cand in "-mno-movt" \
-		"-mllvm -arm-use-movt=0"; do
+		"-mllvm -arm-use-movt=0" \
+		"-mword-relocations"; do
       if test x"$grub_cv_target_cc_mno_movt" != xno ; then
         break
       fi
-- 
2.11.0



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

* Re: [PATCH] configure: disable arm movw/movt relocations for GCC
  2019-06-04 11:39 [PATCH] configure: disable arm movw/movt relocations for GCC Leif Lindholm
@ 2019-06-04 11:49 ` Alexander Graf
  2019-07-11 12:32   ` Daniel Kiper
  2019-07-11 15:54 ` Vladimir 'phcoder' Serbinenko
  1 sibling, 1 reply; 4+ messages in thread
From: Alexander Graf @ 2019-06-04 11:49 UTC (permalink / raw)
  To: Leif Lindholm, grub-devel; +Cc: Daniel Kiper


On 04.06.19 13:39, Leif Lindholm wrote:
> When building for arm, we already disable movw/movt relocations for clang,
> since they are incompatible with PE.
>
> When building with bare metal GCC toolchains (like the one used in the
> travis ci scripts), we end up with these relocations again. So add an
> additional test for the '-mword-relocations' flag used by GCC.
>
> Reported-by: Alexander Graf <agraf@csgraf.de>
> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>


Reviewed-by: Alexander Graf <agraf@csgraf.de>


Alex




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

* Re: [PATCH] configure: disable arm movw/movt relocations for GCC
  2019-06-04 11:49 ` Alexander Graf
@ 2019-07-11 12:32   ` Daniel Kiper
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Kiper @ 2019-07-11 12:32 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Leif Lindholm, grub-devel

On Tue, Jun 04, 2019 at 01:49:51PM +0200, Alexander Graf wrote:
> On 04.06.19 13:39, Leif Lindholm wrote:
> > When building for arm, we already disable movw/movt relocations for clang,
> > since they are incompatible with PE.
> >
> > When building with bare metal GCC toolchains (like the one used in the
> > travis ci scripts), we end up with these relocations again. So add an
> > additional test for the '-mword-relocations' flag used by GCC.
> >
> > Reported-by: Alexander Graf <agraf@csgraf.de>
> > Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
>
> Reviewed-by: Alexander Graf <agraf@csgraf.de>

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

Daniel


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

* Re: [PATCH] configure: disable arm movw/movt relocations for GCC
  2019-06-04 11:39 [PATCH] configure: disable arm movw/movt relocations for GCC Leif Lindholm
  2019-06-04 11:49 ` Alexander Graf
@ 2019-07-11 15:54 ` Vladimir 'phcoder' Serbinenko
  1 sibling, 0 replies; 4+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2019-07-11 15:54 UTC (permalink / raw)
  To: The development of GRUB 2

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

LGTM

On Tue, 4 Jun 2019, 13:40 Leif Lindholm, <leif.lindholm@linaro.org> wrote:

> When building for arm, we already disable movw/movt relocations for clang,
> since they are incompatible with PE.
>
> When building with bare metal GCC toolchains (like the one used in the
> travis ci scripts), we end up with these relocations again. So add an
> additional test for the '-mword-relocations' flag used by GCC.
>
> Reported-by: Alexander Graf <agraf@csgraf.de>
> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
> ---
>
> Note: unless this is added before the travis-ci set, the arm ci build
> will fail when enabled.
>
> ---
>
>  configure.ac | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index 08b518fcc..e7725a546 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1198,7 +1198,8 @@ if test "x$target_cpu" = xarm; then
>    AC_CACHE_CHECK([for options to disable movt and movw],
> grub_cv_target_cc_mno_movt, [
>      grub_cv_target_cc_mno_movt=no
>      for cand in "-mno-movt" \
> -               "-mllvm -arm-use-movt=0"; do
> +               "-mllvm -arm-use-movt=0" \
> +               "-mword-relocations"; do
>        if test x"$grub_cv_target_cc_mno_movt" != xno ; then
>          break
>        fi
> --
> 2.11.0
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

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

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

end of thread, other threads:[~2019-07-11 15:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-04 11:39 [PATCH] configure: disable arm movw/movt relocations for GCC Leif Lindholm
2019-06-04 11:49 ` Alexander Graf
2019-07-11 12:32   ` Daniel Kiper
2019-07-11 15:54 ` Vladimir 'phcoder' Serbinenko

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.