public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale•com>
To: Catalin Udma <catalin.udma@freescale•com>
Cc: linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH] Update compilation flags with core specific options
Date: Tue, 23 Jul 2013 19:11:17 -0500	[thread overview]
Message-ID: <1374624677.15592.48@snotra> (raw)
In-Reply-To: <1372764004-18896-1-git-send-email-catalin.udma@freescale.com> (from catalin.udma@freescale.com on Tue Jul  2 06:20:04 2013)

On 07/02/2013 06:20:04 AM, Catalin Udma wrote:
> 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.
>=20
> Signed-off-by: Catalin Udma <catalin.udma@freescale•com>
> ---
>  arch/powerpc/Makefile |   13 ++++++++++++-
>  1 files changed, 12 insertions(+), 1 deletions(-)
>=20
> 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)

This breaks the vdso for e500v1/v2 (userspace dies with SIGILL), since =20
KBUILD_CFLAGS doesn't get used when building asm files, and the vdso =20
uses mftbu/mftbl which are not being assembled to the form that =20
e500v1/v2 support.

We should be setting -mcpu=3Dwhatever and -msoft-float in both CFLAGS and =20
AFLAGS, since we don't call "as" directly, and target selection should =20
not differ based on whether we're building a C file or an asm file.

-Scott=

  parent reply	other threads:[~2013-07-24  0:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02 11:20 [PATCH] Update compilation flags with core specific options Catalin Udma
2013-07-09 23:48 ` Scott Wood
2013-07-24  0:11 ` Scott Wood [this message]
2013-07-24 16:25   ` Udma Catalin-Dan-B32721
2013-07-24 17:45     ` Scott Wood

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=1374624677.15592.48@snotra \
    --to=scottwood@freescale$(echo .)com \
    --cc=catalin.udma@freescale$(echo .)com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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