Skip to contentSkip to conversation

fix compilation error with CROSS_COMPILE

PATCH New Wu Fengguang 1 participant 1 message Aug 21, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 fix compilation error with CROSS_COMPILE

        $ ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu- make
        ...
        cc1: error: unrecognized command line option "-m64"
        cc1: error: unrecognized command line option "-mno-red-zone"
        cc1: error: unrecognized command line option "-mcmodel=kernel"
        cc1: error: unrecognized command line option "-maccumulate-outgoing-args"
Cc Tiago Maluta <[email protected]>
Cc Michal Marek <[email protected]>
Cc Sam Ravnborg <[email protected]>

---

Andrew: the compile error only occurs in the -mm tree

The error was introduced by patch kbuild-fix-config_cross_compile-issue-in-config.patch

Makefile +1 -1
index d646d69..af8864e 100644
@@ -190,7 +190,7 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
 export KBUILD_BUILDHOST := $(SUBARCH)
 ARCH		?= $(SUBARCH)
 CROSS_COMPILE	?=
-CROSS_COMPILE	:= $(shell grep CONFIG_CROSS_COMPILE .config | cut -d'"' -f2)
+CROSS_COMPILE	?= $(shell grep CONFIG_CROSS_COMPILE .config | cut -d'"' -f2)
 
 # Architecture as present in compile.h
 UTS_MACHINE 	:= $(ARCH)