diff options
author | Michael Neuling <mikey@neuling.org> | 2013-11-20 22:59:07 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-11-24 19:49:11 -0500 |
commit | 924dd50bc4ad26612efbc75f7e60492c5faaa868 (patch) | |
tree | c04a14f1feb0478af2075a21f7c1ac2cd6b18121 /arch/powerpc/Makefile | |
parent | 02ce6e879eb6f260ee48e822f20b94c360fdd4d3 (diff) |
powerpc: Fix error when cross building TAGS & cscope
Currently if I cross build TAGS or cscope from x86 I get this:
% make ARCH=powerpc TAGS
gcc-4.8.real: error: unrecognized command line option ‘-mbig-endian’
GEN TAGS
%
I'm not setting CROSS_COMPILE= as logically I shouldn't need to and I
haven't needed to in the past when building TAGS or cscope. Also, the
above completess correct as the error is not fatal to the build.
This was caused by:
commit d72b08017161ab385d4ae080ea415c9eb7ceef83
Author: Ian Munsie <imunsie@au1.ibm.com>
powerpc: Add ability to build little endian kernels
The below fixes this by testing for the -mbig-endian option before
adding it.
I've not done the same thing in the little endian case as if
-mlittle-endian doesn't exist, we probably want to fail quickly as you
probably have an old big endian compiler.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/Makefile')
-rw-r--r-- | arch/powerpc/Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index a284d7fbc97f..0f4344e6fbca 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -75,8 +75,10 @@ LDEMULATION := lppc | |||
75 | GNUTARGET := powerpcle | 75 | GNUTARGET := powerpcle |
76 | MULTIPLEWORD := -mno-multiple | 76 | MULTIPLEWORD := -mno-multiple |
77 | else | 77 | else |
78 | ifeq ($(call cc-option-yn,-mbig-endian),y) | ||
78 | override CC += -mbig-endian | 79 | override CC += -mbig-endian |
79 | override AS += -mbig-endian | 80 | override AS += -mbig-endian |
81 | endif | ||
80 | override LD += -EB | 82 | override LD += -EB |
81 | LDEMULATION := ppc | 83 | LDEMULATION := ppc |
82 | GNUTARGET := powerpc | 84 | GNUTARGET := powerpc |