mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* powerpc-linux-gnu-gcc: error: unrecognized command line option ‘-mno-spe’
@ 2019-01-23 12:01 Antony Pavlov
  2019-01-24  2:41 ` Andrey Smirnov
  0 siblings, 1 reply; 2+ messages in thread
From: Antony Pavlov @ 2019-01-23 12:01 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha!

I'm playing with MAKEALL script to build as many defconfigs as possible.
My build environment is base on Debian Buster.
Debian Buster has cross compiler for PowerPC32.

Alas I have no success with debian powerpc-linux-gnu-gcc 8.2.0-2.

After

  CROSS_COMPILE=powerpc-linux-gnu- ./MAKEALL -a ppc

the error message is:

  powerpc-linux-gnu-gcc: error: unrecognized command line option ‘-mno-spe’; did you mean ‘-fno-see’?
  powerpc-linux-gnu-gcc: error: unrecognized command line option ‘-mspe=no’; did you mean ‘-misel=no’?
  make[2]: *** [/home/builduser/barebox/./Kbuild:40: arch/ppc/lib/asm-offsets.s] Error 1
  make[1]: *** [/home/builduser/barebox/Makefile:832: prepare0] Error 2
  make[1]: *** Waiting for unfinished jobs....
  powerpc-linux-gnu-gcc: error: unrecognized command line option ‘-mno-spe’; did you mean ‘-fno-see’?
  powerpc-linux-gnu-gcc: error: unrecognized command line option ‘-mspe=no’; did you mean ‘-misel=no’?
  make[3]: *** [/home/builduser/barebox/scripts/Makefile.build:250: scripts/mod/empty.o] Error 1
  make[3]: *** Waiting for unfinished jobs....


With this linux kernel-based patch ppc build has no fail.

diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
index 05ec2438a..e575e5923 100644
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -1,7 +1,12 @@
 
 CPPFLAGS += -ffixed-r14 -m32   \
        -meabi -D __PPC__ -D CONFIG_PPC \
-       -fno-strict-aliasing -mno-spe -mspe=no
+       -fno-strict-aliasing
+
+# No SPE instruction when building kernel
+# (We use all available options to help semi-broken compilers)
+CPPFLAGS += $(call cc-option,-mno-spe)
+CPPFLAGS += $(call cc-option,-mspe=no)
 
 ifdef CONFIG_RELOCATABLE
 CPPFLAGS += -fPIC -mrelocatable


I have no real powerpc experience to submit this patch.

Could you please comment this patch?

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: powerpc-linux-gnu-gcc: error: unrecognized command line option ‘-mno-spe’
  2019-01-23 12:01 powerpc-linux-gnu-gcc: error: unrecognized command line option ‘-mno-spe’ Antony Pavlov
@ 2019-01-24  2:41 ` Andrey Smirnov
  0 siblings, 0 replies; 2+ messages in thread
From: Andrey Smirnov @ 2019-01-24  2:41 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: Barebox List

On Wed, Jan 23, 2019 at 4:02 AM Antony Pavlov <antonynpavlov@gmail.com> wrote:
>
> Hi Sascha!
>
> I'm playing with MAKEALL script to build as many defconfigs as possible.
> My build environment is base on Debian Buster.
> Debian Buster has cross compiler for PowerPC32.
>
> Alas I have no success with debian powerpc-linux-gnu-gcc 8.2.0-2.
>
> After
>
>   CROSS_COMPILE=powerpc-linux-gnu- ./MAKEALL -a ppc
>
> the error message is:
>
>   powerpc-linux-gnu-gcc: error: unrecognized command line option ‘-mno-spe’; did you mean ‘-fno-see’?
>   powerpc-linux-gnu-gcc: error: unrecognized command line option ‘-mspe=no’; did you mean ‘-misel=no’?
>   make[2]: *** [/home/builduser/barebox/./Kbuild:40: arch/ppc/lib/asm-offsets.s] Error 1
>   make[1]: *** [/home/builduser/barebox/Makefile:832: prepare0] Error 2
>   make[1]: *** Waiting for unfinished jobs....
>   powerpc-linux-gnu-gcc: error: unrecognized command line option ‘-mno-spe’; did you mean ‘-fno-see’?
>   powerpc-linux-gnu-gcc: error: unrecognized command line option ‘-mspe=no’; did you mean ‘-misel=no’?
>   make[3]: *** [/home/builduser/barebox/scripts/Makefile.build:250: scripts/mod/empty.o] Error 1
>   make[3]: *** Waiting for unfinished jobs....
>
>
> With this linux kernel-based patch ppc build has no fail.
>
> diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
> index 05ec2438a..e575e5923 100644
> --- a/arch/ppc/Makefile
> +++ b/arch/ppc/Makefile
> @@ -1,7 +1,12 @@
>
>  CPPFLAGS += -ffixed-r14 -m32   \
>         -meabi -D __PPC__ -D CONFIG_PPC \
> -       -fno-strict-aliasing -mno-spe -mspe=no
> +       -fno-strict-aliasing
> +
> +# No SPE instruction when building kernel
> +# (We use all available options to help semi-broken compilers)
> +CPPFLAGS += $(call cc-option,-mno-spe)
> +CPPFLAGS += $(call cc-option,-mspe=no)
>
>  ifdef CONFIG_RELOCATABLE
>  CPPFLAGS += -fPIC -mrelocatable
>
>
> I have no real powerpc experience to submit this patch.
>
> Could you please comment this patch?
>

Since up until a year ago I was using Barebox on MPC8544 on a daily
basis and have some PowerPC patches I've been meaning to upstream,
I'll chime in. You wouldn't see this build failure if you were using a
PowerPC toolchain build with support for e500 enabled. AFAIK, distros
don't usually ship anything like that, but you can get a pre-build one
from here https://toolchains.bootlin.com/releases_powerpc-e500mc.html

However, I've never tried to build Barebox using a generic PowerPC
toolchain, so I don't really know for sure if having e500 support
truly matters for getting a working Barebox binary. Given that, I
don't see any harm in the change above.

Thanks,
Andrey Smirnov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2019-01-24  2:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-23 12:01 powerpc-linux-gnu-gcc: error: unrecognized command line option ‘-mno-spe’ Antony Pavlov
2019-01-24  2:41 ` Andrey Smirnov

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