Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Cc: openembedded-devel@lists.openembedded.org
Subject: Re: [oe] SDK confusion Was: [meta-oe] gdb-cross-canadian: build gdb with python support
Date: Fri, 3 Feb 2012 12:44:51 +0100	[thread overview]
Message-ID: <20120203114451.GF3893@jama.jama.net> (raw)
In-Reply-To: <20120203112037.314f9004@eb-e6520>

[-- Attachment #1: Type: text/plain, Size: 3654 bytes --]

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@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@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

  reply	other threads:[~2012-02-03 11:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1324624336-18713-1-git-send-email-eric@eukrea.com>
     [not found] ` <20120104051849.GG31275@sakrah.homelinux.org>
     [not found]   ` <20120104090523.066ae2d7@eb-e6520>
     [not found]     ` <CA+chaQe-XFR6XVAoept8+d8kqoZ1y2qBoVXgetEPpD2n50nYBA@mail.gmail.com>
     [not found]       ` <20120202084000.GD3697@jama.jama.net>
     [not found]         ` <20120202091726.GG3697@jama.jama.net>
     [not found]           ` <20120202111127.0b9d886a@eb-e6520>
     [not found]             ` <20120203072808.GB3893@jama.jama.net>
2012-02-03  9:41               ` SDK confusion Was: [oe] [meta-oe] gdb-cross-canadian: build gdb with python support Martin Jansa
2012-02-03 10:20                 ` [oe] SDK confusion Was: " Eric Bénard
2012-02-03 11:44                   ` Martin Jansa [this message]
2012-02-03 13:52                     ` Eric Bénard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120203114451.GF3893@jama.jama.net \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox