Re: [PATCH] MIPS: Fix -mabi=64 build of vdso.lds

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

 



On Thu, 6 Oct 2016, James Hogan wrote:

> The native ABI vDSO linker script vdso.lds is built by preprocessing
> vdso.lds.S, with the native -mabi flag passed in to get the correct ABI
> definitions. Unfortunately however certain toolchains choke on -mabi=64
> without a corresponding compatible -march flag, for example:
> 
> cc1: error: ʽ-march=mips32r2ʼ is not compatible with the selected ABI
> scripts/Makefile.build:338: recipe for target 'arch/mips/vdso/vdso.lds' failed
> 
> Fix this by including ccflags-vdso in the KBUILD_CPPFLAGS for vdso.lds,
> which includes the appropriate -march flag.
> 
> Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO")
> Signed-off-by: James Hogan <james.hogan@xxxxxxxxxx>
> Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
> Cc: linux-mips@xxxxxxxxxxxxxx
> Cc: <stable@xxxxxxxxxxxxxxx> # 4.4.x-
> ---

Reviewed-by: Maciej W. Rozycki <macro@xxxxxxxxxx>

 NB by default GCC is configured for the default of `-march=from-abi', 
which is why saying `-mabi=64' only often works as such GCC implicitly 
switches to a compatible `-march=' setting (i.e. `mips3' vs `mips1' for 
o32).  However when configured with `-march=' set to a particular ISA 
level, such as `mips32r2' quoted above you need to select a compatible ISA 
explicitly when switching to a 64-bit ABI (arguably you could configure 
with `-march=mips64r2' instead as with a 32-bit ABI such a setting would 
limit the instruction set to the 32-bit subset automatically).

 Also I've noticed $(aflags-vdso) duplicate `-I' and `-E' options already 
included with $(ccflags-vdso); I wonder if the duplicates should simply be 
removed or whether $(cflags-vdso) ought to filter from $(KBUILD_CFLAGS) 
and $(aflags-vdso) -- from $(KBUILD_AFLAGS) instead (or $(ccflags-vdso) 
should just take the options from $(KBUILD_CPPFLAGS)).  Also why `-E' is 
supposed to take an argument?  Can you please have a look at it?

  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