]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fix compiling a BE kernel with a powerpc64le toolchain
authorNicholas Piggin <npiggin@gmail.com>
Sun, 27 Nov 2016 02:46:20 +0000 (13:46 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 3 Mar 2017 00:24:50 +0000 (11:24 +1100)
commit62e1376eac1cd681c11ad9f3f7e1d35372e4085f
treecd6f657f665b9039afa66527ba1565e12d3ed139
parent0c4e735f6d51a3eabd6f8915ad12f27f90b7fa48
powerpc: Fix compiling a BE kernel with a powerpc64le toolchain

GCC can compile with either endian, but the default ABI version is set
based on the default endianness of the toolchain. Alan Modra says:

  you need both -mbig and -mabi=elfv1 to make a powerpc64le gcc
  generate powerpc64 code

The opposite is true for powerpc64 when generating -mlittle it
requires -mabi=elfv2 to generate v2 ABI, which we were already doing.

This change adds ABI annotations together with endianness for all cases,
LE and BE. This fixes the case of building a BE kernel with a toolchain
that is LE by default.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Tested-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/Makefile