[PATCH v2] powerpc: Update compilation flags with core specific options

Scott Wood scottwood at freescale.com
Tue Jul 30 09:53:13 EST 2013


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=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 at 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

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

-Scott


More information about the Linuxppc-dev mailing list