On Thu, Feb 23, 2012 at 10:27:53AM +0000, Richard Purdie wrote:
> On Mon, 2012-02-13 at 16:40 +0100, Martin Jansa wrote:
> > * seems like config/config in -L was also wrong
> > 
> > Signed-off-by: Martin Jansa <[email protected]>
> > ---
> >  meta/recipes-devtools/gdb/gdb-cross-canadian.inc |   10 ++++++++--
> >  1 files changed, 8 insertions(+), 2 deletions(-)
> > 
> > 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
> 
> I made some experiments with "bitbake gdb-cross-canadian-x86-64 -e" and
> it seems to me that:
> 
>        --includes) echo "-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}/" ;;
>        --ldflags) echo 
> "-L${STAGING_LIBDIR}/../python${PYTHON_BASEVERSION}/config -lpthread -ldl 
> -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
> 
> should work ok here?

No it's not the same.

With default oe-core settings it behaves like this:

python-nativesdk is staged in the same directory for all 3 MACHINEs I
was using for test (qemuarm, qemux86, qemux86-64)

SDKMACHINE=i686:   
SYSROOTS/i686-nativesdk-oesdk-linux/usr/local/oecore-i686-i686/sysroots/i686-oesdk-linux/
SDKMACHINE=x86-64: 
SYSROOTS/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux

while STAGING_INCDIR is different for each machine
SDKMACHINE=i686:
  
STAGING_LIBDIR="SYSROOTS/i686-oesdk-linux-nativesdk/usr/local/oecore-i686-i586/sysroots/i686-oesdk-linux/usr/lib/i586-oe-linux"
  
STAGING_LIBDIR="SYSROOTS/i686-oesdk-linux-nativesdk/usr/local/oecore-i686-x86_64/sysroots/i686-oesdk-linux/usr/lib/x86_64-oe-linux"
  
STAGING_LIBDIR="SYSROOTS/i686-oesdk-linux-nativesdk/usr/local/oecore-i686-arm/sysroots/i686-oesdk-linux/usr/lib/armv5te-oe-linux-gnueabi"
SDKMACHINE=x86-64:
  
STAGING_LIBDIR="SYSROOTS/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-i586/sysroots/x86_64-oesdk-linux/usr/lib/i586-oe-linux"
  
STAGING_LIBDIR="SYSROOTS/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/x86_64-oe-linux"
  
STAGING_LIBDIR="SYSROOTS/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv5te-oe-linux-gnueabi"

notice that not only SDK_NAME tripple is changing
SDK_NAME = "${SDK_NAME_PREFIX}-${SDK_ARCH}-${TARGET_ARCH}"
so we keep it the same across all MACHINES with:
NATIVESDK_SDK_NAME = "${SDK_NAME_PREFIX}-${SDK_ARCH}-${SDK_ARCH}"

but also toplevel SYSROOT is different
i686-nativesdk-oesdk-linux
i686-oesdk-linux-nativesdk
and
x86_64-nativesdk-oesdk-linux
x86_64-oesdk-linux-nativesdk

So nativesdk staging is broken and python-nativesdk should be staged
separately for each SDK_ARCH/TARGET_ARCH combination or we need those
NATIVESDK_SDK_NAME variables for cross-canadian -> nativesdk deps.

Attaching complete list of combinations I've built to be sure :).

Cheers,
-- 
Martin 'JaMa' Jansa     jabber: [email protected]
SYSROOTS = /OE/oe-core/SYSROOTS
= SDKMACHINE=x86-64 ==
SDKMACHINE=x86-64 MACHINE=qemux86 bitbake python-nativesdk
                  
SYSROOTS/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/include/python2.7/Python.h
                  
SYSROOTS/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/python2.7/config/
SDKMACHINE=x86-64 MACHINE=qemux86 bitbake gdb-cross-canadian-i586
  
STAGING_INCDIR="SYSROOTS/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-i586/sysroots/x86_64-oesdk-linux/usr/include"
  
STAGING_LIBDIR="SYSROOTS/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-i586/sysroots/x86_64-oesdk-linux/usr/lib/i586-oe-linux"
                                     
NATIVESDK_LIBDIR="/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/lib"
                                     
NATIVESDK_INCDIR="/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/include"

SDKMACHINE=x86-64 MACHINE=qemux86-64 bitbake python-nativesdk
                  
SYSROOTS/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/include/python2.7/Python.h
                  
SYSROOTS/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/python2.7/config/
SDKMACHINE=x86-64 MACHINE=qemux86-64 bitbake gdb-cross-canadian-x86-64
  
STAGING_LIBDIR="SYSROOTS/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/x86_64-oe-linux"
  
STAGING_INCDIR="SYSROOTS/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/include"
                                     
NATIVESDK_LIBDIR="/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/lib"
                                     
NATIVESDK_INCDIR="/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/include"

SDKMACHINE=x86-64 MACHINE=qemuarm bitbake python-nativesdk
                  
SYSROOTS/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/include/python2.7/Python.h
                  
SYSROOTS/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/python2.7/config/
SDKMACHINE=x86-64 MACHINE=qemuarm bitbake gdb-cross-canadian-arm
  
STAGING_LIBDIR="SYSROOTS/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv5te-oe-linux-gnueabi"
  
STAGING_INCDIR="SYSROOTS/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/include"
                                     
NATIVESDK_INCDIR="/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/include"
                                     
NATIVESDK_LIBDIR="/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/lib"

== SDKMACHINE=i686 ==
SDKMACHINE=i686 MACHINE=qemux86 bitbake python-nativesdk
                  
SYSROOTS/i686-nativesdk-oesdk-linux/usr/local/oecore-i686-i686/sysroots/i686-oesdk-linux/usr/include/python2.7/Python.h
                  
SYSROOTS/i686-nativesdk-oesdk-linux/usr/local/oecore-i686-i686/sysroots/i686-oesdk-linux/usr/lib/python2.7/config/
SDKMACHINE=i686 MACHINE=qemux86 bitbake gdb-cross-canadian-i586
  
STAGING_LIBDIR="SYSROOTS/i686-oesdk-linux-nativesdk/usr/local/oecore-i686-i586/sysroots/i686-oesdk-linux/usr/lib/i586-oe-linux"
  
STAGING_INCDIR="SYSROOTS/i686-oesdk-linux-nativesdk/usr/local/oecore-i686-i586/sysroots/i686-oesdk-linux/usr/include"
                                   
NATIVESDK_LIBDIR="/usr/local/oecore-i686-i686/sysroots/i686-oesdk-linux/usr/lib"
                                   
NATIVESDK_INCDIR="/usr/local/oecore-i686-i686/sysroots/i686-oesdk-linux/usr/include"

SDKMACHINE=i686 MACHINE=qemux86-64 bitbake python-nativesdk
                  
SYSROOTS/i686-nativesdk-oesdk-linux/usr/local/oecore-i686-i686/sysroots/i686-oesdk-linux/usr/include/python2.7/Python.h
                  
SYSROOTS/i686-nativesdk-oesdk-linux/usr/local/oecore-i686-i686/sysroots/i686-oesdk-linux/usr/lib/python2.7/config/
SDKMACHINE=i686 MACHINE=qemux86-64 bitbake gdb-cross-canadian-x86-64
  
STAGING_LIBDIR="SYSROOTS/i686-oesdk-linux-nativesdk/usr/local/oecore-i686-x86_64/sysroots/i686-oesdk-linux/usr/lib/x86_64-oe-linux"
  
STAGING_INCDIR="SYSROOTS/i686-oesdk-linux-nativesdk/usr/local/oecore-i686-x86_64/sysroots/i686-oesdk-linux/usr/include"
                                   
NATIVESDK_LIBDIR="/usr/local/oecore-i686-i686/sysroots/i686-oesdk-linux/usr/lib"
                                   
NATIVESDK_INCDIR="/usr/local/oecore-i686-i686/sysroots/i686-oesdk-linux/usr/include"

SDKMACHINE=i686 MACHINE=qemuarm bitbake python-nativesdk
                  
SYSROOTS/i686-nativesdk-oesdk-linux/usr/local/oecore-i686-i686/sysroots/i686-oesdk-linux/usr/include/python2.7/Python.h
                  
SYSROOTS/i686-nativesdk-oesdk-linux/usr/local/oecore-i686-i686/sysroots/i686-oesdk-linux/usr/lib/python2.7/config/
SDKMACHINE=i686 MACHINE=qemuarm bitbake gdb-cross-canadian-arm
  
STAGING_LIBDIR="SYSROOTS/i686-oesdk-linux-nativesdk/usr/local/oecore-i686-arm/sysroots/i686-oesdk-linux/usr/lib/armv5te-oe-linux-gnueabi"
  
STAGING_INCDIR="SYSROOTS/i686-oesdk-linux-nativesdk/usr/local/oecore-i686-arm/sysroots/i686-oesdk-linux/usr/include"
                                   
NATIVESDK_LIBDIR="/usr/local/oecore-i686-i686/sysroots/i686-oesdk-linux/usr/lib"
                                   
NATIVESDK_INCDIR="/usr/local/oecore-i686-i686/sysroots/i686-oesdk-linux/usr/include"

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to