[oe] [Jethro] Can't compile gcc-cross when gcc-6 is the host compiler

Khem Raj raj.khem at gmail.com
Thu Aug 11 19:49:50 UTC 2016

> On Aug 11, 2016, at 5:40 AM, Jérémy Rosen <jeremy.rosen at smile.fr> wrote:
> Hello everybody
> I am working on a jethro-based project on my Debian/testing machine, and debian just migrated it's default gcc from gcc-5 to gcc-6
> As expected, this caused all sort of errors in my build, starting by pkgconfig-native not being compilable anymore (new gcc warnings coupled with -Werror)
> That's OK. I don't expect jethro to support future compilers out of the box so I installed gcc-5 in parallel to gcc-6 while keeping gcc-6 as the default compiler.
> I then set the following variables in local.conf
> #gcc-5
> export BUILD_FC = "${CCACHE}${BUILD_PREFIX}gfortran-5 ${BUILD_CC_ARCH}"
> export BUILD_CPP = "${BUILD_PREFIX}gcc-5 ${BUILD_CC_ARCH} -E"
> export BUILD_AR = "${BUILD_PREFIX}gcc-ar-5"
> export BUILD_RANLIB = "${BUILD_PREFIX}gcc-ranlib-5"
> export BUILD_STRIP = "${BUILD_PREFIX}strip"
> export BUILD_NM = "${BUILD_PREFIX}gcc-nm-5"
> This helped, and allowed me to go much further in my build, but the recipe gcc-cross-arm still failed. To be able to compile my build I had to add the following to my local.conf
> CC_pn-gcc-cross-arm= "${BUILD_CC}"
> CXX_pn-gcc-cross-arm= "${BUILD_CXX}"
> CC_pn-gcc-crosssdk-x86_64= "${BUILD_CC}"
> CXX_pn-gcc-crosssdk-x86_64= "${BUILD_CXX}"
> So apparently, gcc still has some reference to $CC and $CXX hardcoded somewhere (I think it's in do_configure)
> It seems to set $CC in the do_compile correctly, but not in do_configure. And it never sets $CXX
> I tried to understand what the GCC recipe was doing wrong, but I couldn't find out on first look and it's a really complicated recipe
> I hope this is enough clues to allow someone more knowledgeable to create a proper fix…

Just change the default gcc to gcc5 on your host. The host packages do not isolate compiler as well as target packages.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20160811/492adc0b/attachment-0002.sig>

More information about the Openembedded-devel mailing list