linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] powerpc: Update compilation flags with core specific options
@ 2013-07-25 11:54 Catalin Udma
  2013-07-26 15:50 ` Kumar Gala
  2013-07-29 23:53 ` Scott Wood
  0 siblings, 2 replies; 4+ messages in thread
From: Catalin Udma @ 2013-07-25 11:54 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Catalin Udma

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

Signed-off-by: Catalin Udma <catalin.udma@freescale.com>
---
changes for v2: 
    - update also KBUILD_AFLAGS with -mcpu and -msoft-float flags
  
 arch/powerpc/Makefile |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 0624909..cb5cbe2 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -140,6 +140,21 @@ ifeq ($(CONFIG_6xx),y)
 KBUILD_CFLAGS		+= -mcpu=powerpc
 endif
 
+ifeq ($(CONFIG_E500),y)
+ifeq ($(CONFIG_64BIT),y)
+KBUILD_CFLAGS		+= -mcpu=e5500
+KBUILD_AFLAGS		+= -mcpu=e5500 -msoft-float
+else
+ifeq ($(CONFIG_PPC_E500MC),y)
+KBUILD_CFLAGS		+= -mcpu=e500mc
+KBUILD_AFLAGS		+= -mcpu=e500mc -msoft-float
+else
+KBUILD_CFLAGS		+= -mcpu=8540
+KBUILD_AFLAGS		+= -mcpu=8540 -msoft-float
+endif
+endif
+endif
+
 # Work around a gcc code-gen bug with -fno-omit-frame-pointer.
 ifeq ($(CONFIG_FUNCTION_TRACER),y)
 KBUILD_CFLAGS		+= -mno-sched-epilog
@@ -147,7 +162,6 @@ endif
 
 cpu-as-$(CONFIG_4xx)		+= -Wa,-m405
 cpu-as-$(CONFIG_ALTIVEC)	+= -Wa,-maltivec
-cpu-as-$(CONFIG_E500)		+= -Wa,-me500
 cpu-as-$(CONFIG_E200)		+= -Wa,-me200
 
 KBUILD_AFLAGS += $(cpu-as-y)
-- 
1.7.8

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

* Re: [PATCH v2] powerpc: Update compilation flags with core specific options
  2013-07-25 11:54 [PATCH v2] powerpc: Update compilation flags with core specific options Catalin Udma
@ 2013-07-26 15:50 ` Kumar Gala
  2013-07-29  8:29   ` Udma Catalin-Dan-B32721
  2013-07-29 23:53 ` Scott Wood
  1 sibling, 1 reply; 4+ messages in thread
From: Kumar Gala @ 2013-07-26 15:50 UTC (permalink / raw)
  To: Catalin Udma; +Cc: linuxppc-dev


On Jul 25, 2013, at 6:54 AM, Catalin Udma wrote:

> If CONFIG_E500 is enabled, the compilation flags are updated
> specifying the target core -mcpu=e5500/e500mc/8540
> Also remove -Wa,-me500, being incompatible with -mcpu=e5500/e6500
> The assembler option is redundant if the -mcpu= flag is set.
> The patch fixes the kernel compilation problem for e5500/e6500
> when using gcc option -mcpu=e5500/e6500.
> 
> Signed-off-by: Catalin Udma <catalin.udma@freescale.com>
> ---
> changes for v2: 
>    - update also KBUILD_AFLAGS with -mcpu and -msoft-float flags
> 
> arch/powerpc/Makefile |   16 +++++++++++++++-
> 1 files changed, 15 insertions(+), 1 deletions(-)

Is the assembler redundant for older toolchains?

- k

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

* RE: [PATCH v2] powerpc: Update compilation flags with core specific options
  2013-07-26 15:50 ` Kumar Gala
@ 2013-07-29  8:29   ` Udma Catalin-Dan-B32721
  0 siblings, 0 replies; 4+ messages in thread
From: Udma Catalin-Dan-B32721 @ 2013-07-29  8:29 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev

> > 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>
> > ---
> > changes for v2:
> >    - update also KBUILD_AFLAGS with -mcpu and -msoft-float flags
> >
> > arch/powerpc/Makefile |   16 +++++++++++++++-
> > 1 files changed, 15 insertions(+), 1 deletions(-)
>=20
> Is the assembler redundant for older toolchains?
>=20
> - k
[CU] gcc defines the mapping from -mcpu to assembler options in file
gcc/config/rs6000/rs6000.h, like this:
	%{mcpu=3D8540: -me500} \
	%{mcpu=3D8548: -me500} \
	%{mcpu=3De300c2: -me300} \
	%{mcpu=3De300c3: -me300} \
	%{mcpu=3De500mc: -me500mc} \
	%{mcpu=3De500mc64: -me500mc64} \
	%{mcpu=3De5500: -me5500} \
	%{mcpu=3De6500: -me6500} \

I have checked this mapping from gcc 3.3 (where 8540 entry was added) to
3.4, 4.3, 4.4 and 4.8.1...The -Wa option is redundant for all these
older toolchains.
Catalin

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

* Re: [PATCH v2] powerpc: Update compilation flags with core specific options
  2013-07-25 11:54 [PATCH v2] powerpc: Update compilation flags with core specific options Catalin Udma
  2013-07-26 15:50 ` Kumar Gala
@ 2013-07-29 23:53 ` Scott Wood
  1 sibling, 0 replies; 4+ messages in thread
From: Scott Wood @ 2013-07-29 23:53 UTC (permalink / raw)
  To: Catalin Udma; +Cc: Catalin Udma, linuxppc-dev

On 07/25/2013 06:54:14 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>
> ---
> changes for v2:
>     - update also KBUILD_AFLAGS with -mcpu and -msoft-float flags
>=20
>  arch/powerpc/Makefile |   16 +++++++++++++++-
>  1 files changed, 15 insertions(+), 1 deletions(-)
>=20
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index 0624909..cb5cbe2 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -140,6 +140,21 @@ ifeq ($(CONFIG_6xx),y)
>  KBUILD_CFLAGS		+=3D -mcpu=3Dpowerpc
>  endif
>=20
> +ifeq ($(CONFIG_E500),y)
> +ifeq ($(CONFIG_64BIT),y)
> +KBUILD_CFLAGS		+=3D -mcpu=3De5500
> +KBUILD_AFLAGS		+=3D -mcpu=3De5500 -msoft-float
> +else
> +ifeq ($(CONFIG_PPC_E500MC),y)
> +KBUILD_CFLAGS		+=3D -mcpu=3De500mc
> +KBUILD_AFLAGS		+=3D -mcpu=3De500mc -msoft-float
> +else
> +KBUILD_CFLAGS		+=3D -mcpu=3D8540
> +KBUILD_AFLAGS		+=3D -mcpu=3D8540 -msoft-float
> +endif
> +endif
> +endif

Instead of specifying -msoft-float here, shouldn't it go on the main =20
KBUILD_AFLAGS in arch/powerpc/Makefile, right next to where it's added =20
for KBUILD_CFLAGS?

-Scott=

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

end of thread, other threads:[~2013-07-29 23:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-25 11:54 [PATCH v2] powerpc: Update compilation flags with core specific options Catalin Udma
2013-07-26 15:50 ` Kumar Gala
2013-07-29  8:29   ` Udma Catalin-Dan-B32721
2013-07-29 23:53 ` Scott Wood

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).