]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/Makefile: Use cflags-y/aflags-y for setting endian options
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 9 Aug 2016 12:43:46 +0000 (22:43 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 10 Aug 2016 13:01:53 +0000 (23:01 +1000)
commit66270fe09aed94e1bc5cd48c5c572e9d18467d33
treebd8d5b3d11681d5a8859ef20efe4bb31be785eb6
parentda973cdea50133d8c7240da1e04ccb7a3ffde188
powerpc/Makefile: Use cflags-y/aflags-y for setting endian options

When we introduced the little endian support, we added the endian flags
to CC directly using override. I don't know the history of why we did
that, I suspect no one does.

Although this mostly works, it has one bug, which is that CROSS32CC
doesn't get -mbig-endian. That means when the compiler is little endian
by default and the user is building big endian, vdso32 is incorrectly
compiled as little endian and the kernel fails to build.

Instead we can add the endian flags to cflags-y/aflags-y, and then
append those to KBUILD_CFLAGS/KBUILD_AFLAGS.

This has the advantage of being 1) less ugly, 2) the documented way of
adding flags in the arch Makefile and 3) it fixes building vdso32 with a
LE toolchain.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/Makefile