• Michael Neuling's avatar
    powerpc: Fix error when cross building TAGS & cscope · 924dd50b
    Michael Neuling authored
    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 d72b0801
        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: default avatarMichael Neuling <mikey@neuling.org>
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    924dd50b
Makefile 10.4 KB