linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Udma Catalin-Dan-B32721 <B32721@freescale.com>
To: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Cc: Udma Catalin-Dan-B32721 <B32721@freescale.com>
Subject: [PATCH] powerpc: Update compilation flags with core specific options
Date: Mon, 1 Jul 2013 09:33:53 +0000	[thread overview]
Message-ID: <FE751157F0442848A159F3AB4CB1F55B3DBA47@039-SN1MPN1-001.039d.mgd.msft.net> (raw)

From: Catalin Udma <catalin.udma@freescale.com>

If CONFIG_E500 is enabled, the compilation flags are updated
specifying the target core -mcpu=3De5500/e500mc/8540
Also remove -Wa,-me500, being incompatible with -mcpu=3De5500/e6500
The assembler option is redundant if the -mcpu=3D flag is set.
The patch fixes the kernel compilation problem for e5500/e6500
when using gcc option -mcpu=3De5500/e6500.

Signed-off-by: Catalin Udma <catalin.udma@freescale.com>
---
 arch/powerpc/Makefile |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 0624909..82808b5 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -140,6 +140,18 @@ ifeq ($(CONFIG_6xx),y)
 KBUILD_CFLAGS		+=3D -mcpu=3Dpowerpc
 endif
=20
+ifeq ($(CONFIG_E500),y)
+ifeq ($(CONFIG_64BIT),y)
+KBUILD_CFLAGS		+=3D -mcpu=3De5500
+else
+ifeq ($(CONFIG_PPC_E500MC),y)
+KBUILD_CFLAGS		+=3D -mcpu=3De500mc
+else
+KBUILD_CFLAGS		+=3D -mcpu=3D8540
+endif
+endif
+endif
+
 # Work around a gcc code-gen bug with -fno-omit-frame-pointer.
 ifeq ($(CONFIG_FUNCTION_TRACER),y)
 KBUILD_CFLAGS		+=3D -mno-sched-epilog
@@ -147,7 +159,6 @@ endif
=20
 cpu-as-$(CONFIG_4xx)		+=3D -Wa,-m405
 cpu-as-$(CONFIG_ALTIVEC)	+=3D -Wa,-maltivec
-cpu-as-$(CONFIG_E500)		+=3D -Wa,-me500
 cpu-as-$(CONFIG_E200)		+=3D -Wa,-me200
=20
 KBUILD_AFLAGS +=3D $(cpu-as-y)
--=20
1.7.8

                 reply	other threads:[~2013-07-01  9:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FE751157F0442848A159F3AB4CB1F55B3DBA47@039-SN1MPN1-001.039d.mgd.msft.net \
    --to=b32721@freescale.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).