All of lore.kernel.org
 help / color / mirror / Atom feed
* about ${KERNEL_CC} and ${CC}
@ 2010-12-23  6:11 Tian, Kevin
  2010-12-23  9:44 ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Tian, Kevin @ 2010-12-23  6:11 UTC (permalink / raw)
  To: poky@pokylinux.org

I'm a bit confused why a specific ${KERNEL_CC} is introduced instead of
reusing ${CC}, especially when two are defined differently:

<kernel.bbclass>
KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}"

<bitbake.conf>
export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"

I'm not sure whether kernel build requires "--sysroot" option, but it looks that it works well
so far even without that option (why?)

However this causes one issue under sstate, if the whole toolchain is installed from sstate
packages which are built from another machine. In such case the default path (decided at
compilation time) of gcc also points to the path on another machine, which is missing in
current machine doing build. Perf compilation is:

do_compile_perf() {
        oe_runmake -C ${S}/tools/perf CC="${KERNEL_CC}" LD="${KERNEL_LD}" prefix=${prefix}
}

Without an explicit "--sysroot" options, perf compilation is broken due to failing to check some 
header files like gnu/libc-version.h. I can workaround it by:

do_compile_perf() {
        oe_runmake -C ${S}/tools/perf CC="${CC}" LD="${LD}" AR="${AR}" prefix=${prefix}
}

Before going with that fix, I'd like to understand the difference between {KERNEL_CC} and
${CC} first, e.g. another option Is to simply attach TOOLCHAIN_OPTIONS to KERNEL_CC..

Thanks
Kevin


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

end of thread, other threads:[~2010-12-30 18:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-23  6:11 about ${KERNEL_CC} and ${CC} Tian, Kevin
2010-12-23  9:44 ` Richard Purdie
2010-12-23 12:27   ` Gary Thomas
2010-12-24  1:01     ` Tian, Kevin
2010-12-30 10:21     ` Richard Purdie
2010-12-30 18:02       ` Gary Thomas

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.