Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] gdb-cross-canadian: Fix linking issues when python support is enabled
Date: Fri, 23 Mar 2012 14:02:03 +0100	[thread overview]
Message-ID: <20120323140203.51a7823b@eb-e6520> (raw)
In-Reply-To: <1332507041-30674-1-git-send-email-raj.khem@gmail.com>

Le Fri, 23 Mar 2012 05:50:41 -0700,
Khem Raj <raj.khem@gmail.com> a écrit :

> gdb-cross-canadian was linking with static version of libpython
> and looking for build host python when run. This could be mismatch
> between python-nativesdk and build host provided python. So we
> make it consistent to always use python-nativesdk
> 
> Instead of adding bunch of -L we add -rpath and -rpath-link
> so that gdb finds all needed libraries in SDK and does not
> reach out into host
> 
> This should fix yocto PR# 2077 as well.
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Tested-by: Eric Bénard <eric@eukrea.com>
> ---
>  meta/recipes-devtools/gdb/gdb-cross-canadian.inc   |    7 ++++---
>  .../recipes-devtools/gdb/gdb-cross-canadian_7.4.bb |    2 +-
>  2 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
> index a7cac61..59412c4 100644
> --- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
> +++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
> @@ -1,4 +1,5 @@
>  inherit cross-canadian
> +inherit python-dir
>  
>  DESCRIPTION = "cross-canadian gdb for ${TARGET_ARCH} target - GNU debugger"
>  PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}"
> @@ -14,9 +15,9 @@ do_configure_prepend() {
>  cat > ${WORKDIR}/python << EOF
>  #! /bin/sh
>  case "\$2" in
> -        --includes) echo "-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}/" ;;
> -        --ldflags) echo "-L${STAGING_LIBDIR}/../python${PYTHON_BASEVERSION}/config -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
> -        --exec-prefix) echo "/usr" ;;
> +        --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}/" ;;
> +        --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
> +        --exec-prefix) echo "${exec_prefix}/bin" ;;
>          *) exit 1 ;;
>  esac
>  exit 0
> diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.4.bb b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.4.bb
> index dbcffde..dfb7d81 100644
> --- a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.4.bb
> +++ b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.4.bb
> @@ -1,7 +1,7 @@
>  require gdb-common.inc
>  require gdb-cross-canadian.inc
>  
> -PR = "${INC_PR}.3"
> +PR = "${INC_PR}.4"
>  
>  GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
>  EXPAT = "--with-expat"




  reply	other threads:[~2012-03-23 13:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23 12:50 [PATCH] gdb-cross-canadian: Fix linking issues when python support is enabled Khem Raj
2012-03-23 13:02 ` Eric Bénard [this message]
2012-03-23 14:01 ` Richard Purdie
2012-03-23 18:16 ` Kamble, Nitin A
2012-03-23 20:51   ` Khem Raj

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=20120323140203.51a7823b@eb-e6520 \
    --to=eric@eukrea.com \
    --cc=openembedded-core@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