All of lore.kernel.org
 help / color / mirror / Atom feed
* [Jethro] Can't compile gcc-cross when gcc-6 is the host compiler
@ 2016-08-11 12:40 Jérémy Rosen
  2016-08-11 19:38 ` Burton, Ross
  2016-08-11 19:49 ` Khem Raj
  0 siblings, 2 replies; 6+ messages in thread
From: Jérémy Rosen @ 2016-08-11 12:40 UTC (permalink / raw)
  To: openembeded-devel

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_CC = "${CCACHE}${BUILD_PREFIX}gcc-5 ${BUILD_CC_ARCH}"
export BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++-5 ${BUILD_CC_ARCH}"
export BUILD_FC = "${CCACHE}${BUILD_PREFIX}gfortran-5 ${BUILD_CC_ARCH}"
export BUILD_CPP = "${BUILD_PREFIX}gcc-5 ${BUILD_CC_ARCH} -E"
export BUILD_LD = "${BUILD_PREFIX}ld ${BUILD_LD_ARCH}"
export BUILD_CCLD = "${BUILD_PREFIX}gcc-5 ${BUILD_CC_ARCH}"
export BUILD_AR = "${BUILD_PREFIX}gcc-ar-5"
export BUILD_AS = "${BUILD_PREFIX}as ${BUILD_AS_ARCH}"
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...


Regards

Jeremy Rosen



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-13  3:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-11 12:40 [Jethro] Can't compile gcc-cross when gcc-6 is the host compiler Jérémy Rosen
2016-08-11 19:38 ` Burton, Ross
2016-08-12 13:38   ` Jérémy Rosen
2016-08-12 16:37     ` Burton, Ross
2016-08-13  3:13     ` Khem Raj
2016-08-11 19:49 ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.