[oe] [OE-core] SDK confusion Was: [meta-oe] gdb-cross-canadian: build gdb with python support

Martin Jansa martin.jansa at gmail.com
Fri Feb 3 11:44:51 UTC 2012


On Fri, Feb 03, 2012 at 11:20:37AM +0100, Eric Bénard wrote:
> Hi Martin,
> 
> Le Fri, 3 Feb 2012 10:41:05 +0100,
> Martin Jansa <martin.jansa at gmail.com> a écrit :
> > in x86_64-oesdk-linux there are only gcc+binutils crosssdk
> > binutils-crosssdk-2.22-r2  gcc-crosssdk-4.6.2+svnr181430-r22  gcc-crosssdk-initial-4.6.2+svnr181430-r22  gcc-crosssdk-intermediate-4.6.2+svnr181430-r22
> > the rest is in 
> > x86_64-nativesdk-oesdk-linux
> > 
> > gdb-cross-canadian-arm is only package were exec_prefix points to oecore-x86_64-arm
> > ./gdb-cross-canadian-arm-7.3.1-r5.1/temp/run.do_configure.1688
> > export exec_prefix="/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr"
> > 
> > while all nativesdk packages are using oecore-x86_64-x86_64
> > ./python-nativesdk-2.7.2-r0.5/temp/run.do_configure.14043
> > export exec_prefix="/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr"
> > 
> here is the big difference when using Angstrom :
> python-nativesdk-2.7.2-r0.5/temp/run.do_configure.30951:73:export
> exec_prefix="/usr/local/angstrom-eglibc-x86_64-armv7a/sysroots/x86_64-angstromsdk-linux/usr"
> I don't yet know where this difference comes from.

I also don't really understand using oecore-x86_64-x86_64 when building
for qemuarm

Last part should be TARGET_ARCH from
conf/bitbake.conf:SDK_NAME = "oecore-${SDK_ARCH}-${TARGET_ARCH}"

but TARGET_ARCH is defined couple of times:
conf/bitbake.conf:TARGET_ARCH = "${TUNE_ARCH}"

classes/native.bbclass:TARGET_ARCH = "${BUILD_ARCH}"
classes/crosssdk.bbclass:TARGET_ARCH = "${SDK_ARCH}"
classes/nativesdk.bbclass:TARGET_ARCH = "${SDK_ARCH}"

So it looks like TARGET_ARCH from bitbake.conf wins for you and here
it's using TARGET_ARCH = "${SDK_ARCH}" from nativesdk.bbclass

With following modification I was able to configure and build it fine,
but seems like your oecore-x86_64-arm correct and oecore-x86_64-x86_64
should be used only e.g. for qemux86-64 not qemuarm

Cheers,

diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index b5746ce..bac63b7 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -10,12 +10,18 @@ RDEPENDS += "python-nativesdk-core python-nativesdk-lang python-nativesdk-re \

 EXTRA_OECONF_append = "--with-python=${WORKDIR}/python"

+NATIVESDK_NAME = "oecore-${SDK_ARCH}-${SDK_ARCH}"
+NATIVESDK_PATH = "/usr/local/${NATIVESDK_NAME}"
+NATIVESDK_PATHNATIVE = "${NATIVESDK_PATH}/sysroots/${SDK_SYS}"
+NATIVESDK_LIBDIR = "${NATIVESDK_PATHNATIVE}${libdir_nativesdk}"
+NATIVESDK_INCLUDEDIR = "${NATIVESDK_PATHNATIVE}${includedir_nativesdk}"
+
 do_configure_prepend() {
 cat > ${WORKDIR}/python << EOF
 #! /bin/sh
 case "\$2" in
-        --includes) echo "-I${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${exec_prefix}/include/python${PYTHON_BASEVERSION}/" ;;
-        --ldflags) echo "-L${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${libdir}/python${PYTHON_BASEVERSION}/config/config -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
+        --includes) echo "-I${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${NATIVESDK_INCLUDEDIR}/python${PYTHON_BASEVERSION}/" ;;
+        --ldflags) echo "-L${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${NATIVESDK_LIBDIR}/python${PYTHON_BASEVERSION}/config -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
         --exec-prefix) echo "/usr" ;;
         *) exit 1 ;;
 esac

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20120203/9df43707/attachment-0002.sig>


More information about the Openembedded-devel mailing list