[OE-core] [oe-core][PATCH 2/4] gdb-cross-canadian: use NATIVESDK paths as it happens to be here

Richard Purdie richard.purdie at linuxfoundation.org
Sat Feb 25 15:42:31 UTC 2012


On Sat, 2012-02-25 at 14:12 +0100, Martin Jansa wrote:
> On Sat, Feb 25, 2012 at 01:02:48AM +0000, Richard Purdie wrote:
> > I seem to remember strongly disagreeing with:
> > 
> > SDK_NAME = "oecore-${SDK_ARCH}-${TARGET_ARCH}"
> > SDKPATH = "/usr/local/${SDK_NAME}"
> > 
> > that is in bitbake.conf but probably wasn't able to articulate why at
> > the time. You'll note that poky.conf does:
> > 
> > SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
> > SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TARGET_ARCH}"
> > SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}"
> > 
> > so the SDKPATH is not dependent on TARGET_ARCH. It doesn't need to
> > depend on SDK_ARCH either although that is not the problematic part
> > here.
> > 
> > If you think about what is happening, bitbake will reuse the sstate
> > files for each nativesdk, they are meant to be equivalent for each
> > SDKMACHINE. If you hardcode TARGET_ARCH into the path, they are not.
> 
> I'll update my first patch to remove TARGET_ARCH, I'm testing
> SDKPATH = "/usr/local/${SDK_NAME_PREFIX}"
> now, then we still have to deal with different toplevel SYSROOT (if we
> want to use STAGING_LIBDIR etc).

Ok, we need to do this one step at a time :)

> x86_64-nativesdk-oesdk-linux (python-nativesdk)
> x86_64-oesdk-linux-nativesdk (gdb-cross-canadian-*)

This looks broken, the python-nativesdk looks right, the cross-canadian
one looks wrong.

Thinking further, cross-candian is never used from staging. Its
therefore entirely possible the path is just totally broken in
cross-canadian.bbclass. We can probably do something like:

-STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk"
+STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}"

> And that looks even more like another wrong variable to me, but as I've
> said in 1st thread (SDK confusion) I normaly don't build SDKs so maybe
> there are hidden reasons to stage them in different dirs.
> 
> I can use Eric's
> ${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}
> to look into right sysroot, but maybe it's again not right direction.
> 
> > So I'd say that SDKPATH containing SDK_NAME is clearly bogus and
> > TARGET_ARCH needs to be removed in somehow at the very least. Fix that
> > and your problems should go away. 
> 
> Not really but it's getting better :).
> 
> > The patches you're sending don't fix the root problem though.
> 
> Originaly they were meant mostly to show the difference between
> nativesdk and cross-canadian paths.. so I'm not much surprised :).

Hopefully with the above we can resolve this!

Cheers,

Richard





More information about the Openembedded-core mailing list