summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2014-10-21 11:50:13 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-10-24 17:31:58 +0100
commit9237d18964ff0bf76f5c37fca21ab3974d81d0d2 (patch)
treec51042fba777279a6c49bc458e7f0970aa036dbd
parent1247955a907f51aac7efd305d26856e263c11a65 (diff)
downloadopenembedded-core-9237d18964ff0bf76f5c37fca21ab3974d81d0d2.tar.gz
openembedded-core-9237d18964ff0bf76f5c37fca21ab3974d81d0d2.tar.bz2
openembedded-core-9237d18964ff0bf76f5c37fca21ab3974d81d0d2.zip
native.bbclass: use BUILD_* variables
Instead of replicating the logic for the host compiler naming from bitbake.conf, use the BUILD_* variables directly. Also change BUILD_CPP to use gcc -E (which native.bbclass previously used), as some recipes (e.g. grub-efi) use ${CPP} with multiple input files, which gcc -E can handle but cpp can't. Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/classes/native.bbclass21
-rw-r--r--meta/conf/bitbake.conf2
2 files changed, 12 insertions, 11 deletions
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index dcd364b92c..4acc936ccd 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -61,16 +61,17 @@ PTEST_ENABLED = "0"
export CONFIG_SITE = "${COREBASE}/meta/site/native"
# set the compiler as well. It could have been set to something else
-export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
-export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}"
-export FC = "${CCACHE}${HOST_PREFIX}gfortran ${HOST_CC_ARCH}"
-export CPP = "${HOST_PREFIX}gcc ${HOST_CC_ARCH} -E"
-export LD = "${HOST_PREFIX}ld ${HOST_LD_ARCH} "
-export CCLD = "${CC}"
-export AR = "${HOST_PREFIX}ar"
-export AS = "${HOST_PREFIX}as ${HOST_AS_ARCH}"
-export RANLIB = "${HOST_PREFIX}ranlib"
-export STRIP = "${HOST_PREFIX}strip"
+export CC = "${BUILD_CC}"
+export CXX = "${BUILD_CXX}"
+export FC = "${BUILD_FC}"
+export CPP = "${BUILD_CPP}"
+export LD = "${BUILD_LD}"
+export CCLD = "${BUILD_CCLD}"
+export AR = "${BUILD_AR}"
+export AS = "${BUILD_AS}"
+export RANLIB = "${BUILD_RANLIB}"
+export STRIP = "${BUILD_STRIP}"
+export NM = "${BUILD_NM}"
# Path prefixes
base_prefix = "${STAGING_DIR_NATIVE}"
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 468b175edc..2a8a37f87b 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -459,7 +459,7 @@ PYTHON = "${@sys.executable}"
export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
export BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}"
export BUILD_FC = "${CCACHE}${BUILD_PREFIX}gfortran ${BUILD_CC_ARCH}"
-export BUILD_CPP = "${BUILD_PREFIX}cpp ${BUILD_CC_ARCH}"
+export BUILD_CPP = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH} -E"
export BUILD_LD = "${BUILD_PREFIX}ld ${BUILD_LD_ARCH}"
export BUILD_CCLD = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
export BUILD_AR = "${BUILD_PREFIX}ar"