DORMANTno replies

[PATCH] powerpc: Fix error when cross building TAGS & cscope

From: Michael Neuling <hidden>
Date: 2013-11-21 03:59:07
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

Currently if I cross build TAGS or cscope from x86 I get this:
  % make ARCH=3Dpowerpc TAGS
  gcc-4.8.real: error: unrecognized command line option =E2=80=98-mbig-endi=
an=E2=80=99
  GEN     TAGS
  %=20

I'm not setting CROSS_COMPILE=3D 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 [off-list ref]
    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 <redacted>
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 8a24636..273ace7 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -75,8 +75,10 @@ LDEMULATION	:=3D lppc
 GNUTARGET	:=3D powerpcle
 MULTIPLEWORD	:=3D -mno-multiple
 else
+ifeq ($(call cc-option-yn,-mbig-endian),y)
 override CC	+=3D -mbig-endian
 override AS	+=3D -mbig-endian
+endif
 override LD	+=3D -EB
 LDEMULATION	:=3D ppc
 GNUTARGET	:=3D powerpc
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help