mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ppc: Test for compiler options
@ 2020-04-27 19:13 Sascha Hauer
  2020-04-28  9:41 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2020-04-27 19:13 UTC (permalink / raw)
  To: Barebox List

The -mno-spe and -mspe=no options are not available on all compilers.
Call cc-option to set them only when they exist.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/ppc/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
index ebf60edede..67b4b930e7 100644
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -4,6 +4,9 @@ CPPFLAGS += -ffixed-r14 -m32 	\
 	-meabi -D __PPC__ -D CONFIG_PPC \
 	-fno-strict-aliasing -mno-spe -mspe=no
 
+CPPFLAGS += $(call cc-option,-mno-spe)
+CPPFLAGS += $(call cc-option,-mspe=no)
+
 ifdef CONFIG_RELOCATABLE
 CPPFLAGS += -fPIC -mrelocatable
 endif
-- 
2.26.2


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

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

* Re: [PATCH] ppc: Test for compiler options
  2020-04-27 19:13 [PATCH] ppc: Test for compiler options Sascha Hauer
@ 2020-04-28  9:41 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2020-04-28  9:41 UTC (permalink / raw)
  To: Barebox List

On Mon, Apr 27, 2020 at 09:13:34PM +0200, Sascha Hauer wrote:
> The -mno-spe and -mspe=no options are not available on all compilers.
> Call cc-option to set them only when they exist.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/ppc/Makefile | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
> index ebf60edede..67b4b930e7 100644
> --- a/arch/ppc/Makefile
> +++ b/arch/ppc/Makefile
> @@ -4,6 +4,9 @@ CPPFLAGS += -ffixed-r14 -m32 	\
>  	-meabi -D __PPC__ -D CONFIG_PPC \
>  	-fno-strict-aliasing -mno-spe -mspe=no
>  
> +CPPFLAGS += $(call cc-option,-mno-spe)
> +CPPFLAGS += $(call cc-option,-mspe=no)
> +

Of course the options should be removed two lines further up.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
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:[~2020-04-28  9:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-27 19:13 [PATCH] ppc: Test for compiler options Sascha Hauer
2020-04-28  9:41 ` Sascha Hauer

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