Re: [PATCH RFC v2 04/70] MIPS: Add build support for the MIPS R6 ISA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 16 Jan 2015, Markos Chandras wrote:

> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> index 2563a088d3b8..b54d5a14b9f0 100644
> --- a/arch/mips/Makefile
> +++ b/arch/mips/Makefile
> @@ -156,10 +156,14 @@ cflags-$(CONFIG_CPU_MIPS32_R1)	+= $(call cc-option,-march=mips32,-mips32 -U_MIPS
>  			-Wa,-mips32 -Wa,--trap
>  cflags-$(CONFIG_CPU_MIPS32_R2)	+= $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
>  			-Wa,-mips32r2 -Wa,--trap
> +cflags-$(CONFIG_CPU_MIPS32_R6)	+= $(call cc-option,-march=mips32r6,-mips32r6 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
> +			-Wa,-mips32r6 -Wa,--trap
>  cflags-$(CONFIG_CPU_MIPS64_R1)	+= $(call cc-option,-march=mips64,-mips64 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \
>  			-Wa,-mips64 -Wa,--trap
>  cflags-$(CONFIG_CPU_MIPS64_R2)	+= $(call cc-option,-march=mips64r2,-mips64r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \
>  			-Wa,-mips64r2 -Wa,--trap
> +cflags-$(CONFIG_CPU_MIPS64_R6)	+= $(call cc-option,-march=mips64r6,-mips64r6 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
> +			-Wa,-mips64r6 -Wa,--trap

 I think there is no sense to carry on this GCC 3.2/3.3 compatibility 
cruft for R6, there's no chance for this to work with those ancient 
compilers that these hacks have been intended for.  These arrangements 
come from 9200c0b2:

commit 9200c0b2a07c430bd98c546fc44b94f50e67ac62
Author: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
Date:   Thu Apr 6 00:44:25 2006 +0100

    [MIPS] Fix Makefile bugs for MIPS32/MIPS64 R1 and R2.

    This fixes kernel builds with gcc 3.2 (not 64-bit, that is looking like
    it is beyond recovery) and 3.3.  With these bugs fixed we now also can
    get undo 3b4c4996a0c24da9e6f8be764e3950b756b18cc0 and similar bits for
    SMTC that were added in 79cc8007b93838a670b164b8a55ab3e735a12a8b.

(where the arrangement switched from older yet a fallback that used flags 
like `-mips2 -mtune=r4600 -Wa,-mips32' to support GCC 2.95.x or suchlike) 
-- so please just make them plain:

cflags-$(CONFIG_CPU_MIPS32_R6)	+= -march=mips32r6 -Wa,--trap
cflags-$(CONFIG_CPU_MIPS64_R6)	+= -march=mips64r6 -Wa,--trap

Any compiler that supports R6 (and `-mips64r6' for that matter) will 
support `-march=mips64r6' and will pass this option down to GAS.

 I can take blame for some of this stuff BTW, with 2c6e7315:

commit 2c6e7315369ff6195c816d804b1e89d206aed06a
Author: Maciej W. Rozycki <macro@xxxxxxxxxxxxxx>
Date:   Mon Dec 22 16:59:09 2003 +0000

    Support for newer gcc/gas options.

-- so I roughly know what is going on here and I think you can trust me 
that you don't want to go down the complicated path.

  Maciej




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux