All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: e500: Fix compilation with gcc e500 compiler
@ 2022-05-24  9:39 Pali Rohár
  2022-05-24 17:59   ` Segher Boessenkool
  2022-07-02  9:44   ` Pali Rohár
  0 siblings, 2 replies; 54+ messages in thread
From: Pali Rohár @ 2022-05-24  9:39 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras
  Cc: linuxppc-dev, linux-kernel

gcc e500 compiler does not support -mcpu=powerpc option. When it is
specified then gcc throws compile error:

  gcc: error: unrecognized argument in option ‘-mcpu=powerpc’
  gcc: note: valid arguments to ‘-mcpu=’ are: 8540 8548 native

So do not set -mcpu=powerpc option when CONFIG_E500 is set. Correct option
-mcpu=8540 for CONFIG_E500 is set few lines below in that Makefile.

Signed-off-by: Pali Rohár <pali@kernel.org>
Cc: stable@vger.kernel.org
---
 arch/powerpc/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index eb541e730d3c..87f9f29ac9d2 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -22,11 +22,16 @@ ifdef CONFIG_PPC32
 # or platform code sets later on the command line, but they are needed
 # to set a sane 32-bit cpu target for the 64-bit cross compiler which
 # may default to the wrong ISA.
+# Never set -mcpu=powerpc option for gcc e500 compiler because this
+# option is unsupported and throws error. The correct option for
+# CONFIG_E500 is -mcpu=8540 and it is set few lines below.
+ifndef CONFIG_E500
 KBUILD_CFLAGS		+= -mcpu=powerpc
 KBUILD_AFLAGS		+= -mcpu=powerpc
 endif
 endif
 endif
+endif
 
 ifdef CONFIG_PPC_BOOK3S_32
 KBUILD_CFLAGS		+= -mcpu=powerpc
-- 
2.20.1


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

end of thread, other threads:[~2022-07-12 14:14 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-24  9:39 [PATCH] powerpc: e500: Fix compilation with gcc e500 compiler Pali Rohár
2022-05-24 17:59 ` Segher Boessenkool
2022-05-24 17:59   ` Segher Boessenkool
2022-05-24 18:12   ` Pali Rohár
2022-05-24 18:12     ` Pali Rohár
2022-05-24 18:52     ` Segher Boessenkool
2022-05-24 18:52       ` Segher Boessenkool
2022-05-24 19:16       ` Pali Rohár
2022-05-24 19:16         ` Pali Rohár
2022-05-24 19:52         ` Segher Boessenkool
2022-05-24 19:52           ` Segher Boessenkool
2022-07-02  9:39           ` Pali Rohár
2022-07-02  9:39             ` Pali Rohár
2022-07-02  9:44 ` Pali Rohár
2022-07-02  9:44   ` Pali Rohár
2022-07-04 10:23   ` Michael Ellerman
2022-07-04 10:39     ` Pali Rohár
2022-07-04 12:07       ` Arnd Bergmann
2022-07-04 13:13         ` Pali Rohár
2022-07-04 13:22           ` Arnd Bergmann
2022-07-04 13:22             ` Arnd Bergmann
2022-07-04 13:29             ` Pali Rohár
2022-07-04 13:43               ` Arnd Bergmann
2022-07-04 13:43                 ` Arnd Bergmann
2022-07-07  9:56                 ` Christophe Leroy
2022-07-07  9:59                   ` Pali Rohár
2022-07-07  9:59                     ` Pali Rohár
2022-07-08 17:14           ` Pali Rohár
2022-07-08 20:06             ` Arnd Bergmann
2022-07-08 20:06               ` Arnd Bergmann
2022-07-09  9:16             ` Christophe Leroy
2022-07-09 10:23               ` Pali Rohár
2022-07-09 10:23                 ` Pali Rohár
2022-07-10 17:38                 ` Christophe Leroy
2022-07-10 17:38                   ` Christophe Leroy
2022-07-10 17:57                   ` Pali Rohár
2022-07-10 17:57                     ` Pali Rohár
2022-07-11 14:20                     ` Christophe Leroy
2022-07-11 14:20                       ` Christophe Leroy
2022-07-08 17:12         ` Pali Rohár
2022-07-08 20:04           ` Arnd Bergmann
2022-07-08 20:04             ` Arnd Bergmann
2022-07-09  8:51             ` Christophe Leroy
2022-07-09  9:26             ` Christophe Leroy
2022-07-11 16:14               ` Segher Boessenkool
2022-07-11 16:14                 ` Segher Boessenkool
2022-07-11 17:32                 ` Christophe Leroy
2022-07-11 17:32                   ` Christophe Leroy
2022-07-11 21:48                   ` Segher Boessenkool
2022-07-11 21:48                     ` Segher Boessenkool
2022-07-12  9:22                     ` Christophe Leroy
2022-07-12  9:22                       ` Christophe Leroy
2022-07-12 14:11                       ` Segher Boessenkool
2022-07-12 14:11                         ` Segher Boessenkool

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.