[oe] Specify GCC version for building native applications

Burton, Ross ross.burton at intel.com
Wed Mar 23 11:51:22 UTC 2016


On 22 March 2016 at 23:06, Matt Schuckmann <Matt.Schuckmann at planar.com>
wrote:

> I can install both gcc 4.9 and gcc 5.0 on my system and use
> update-alternatives to switch back and forth when I need to but it would be
> nice if I could just configure bitbake/OE to use gcc 4.9 directly.
>
> So is there a way to tell bitbake/OE what version of GCC on the host to
> use to build native applications?
>

Yes, looking at native.bbclass shows that it uses BUILD_CC etc.  Just
assign those in your local.conf or similar, this works on my Debian box to
pick gcc5.3 over 4.9:

BUILD_CC = "gcc-5 ${BUILD_CC_ARCH}"
BUILD_CXX = "g++-5 ${BUILD_CC_ARCH}"
BUILD_CPP = "gcc-5 ${BUILD_CC_ARCH} -E"
BUILD_CCLD = "gcc-5 ${BUILD_CC_ARCH}"
BUILD_RANLIB = "gcc-ranlib-5"
BUILD_NM = "gcc-nm-5"

Ross



More information about the Openembedded-devel mailing list