diff options
author | Samuli Piippo <samuli.piippo@digia.com> | 2013-05-27 13:51:04 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@digia.com> | 2013-06-03 08:54:50 +0300 |
commit | d5d69600e5afbf398e129071378a5655478ad4b9 (patch) | |
tree | ed39b462defd13b4839b41331468a9244fb615ba | |
parent | d24768d9e4a3a150daeff869ad5b96e585c17795 (diff) | |
download | meta-boot2qt-d5d69600e5afbf398e129071378a5655478ad4b9.tar.gz |
gdb-cross-canadian: use correct exec-prefix path for python
Incorrect exec-prefix path was given to gdb which leads to gdb
startup failure when SDK is not installed to its original destination.
Gdb relocates the exec-prefix path, so it will work for SDKs that
are installed to different location. PYTHONHOME env in no longer
neeeded for gdb.
Upstreamed to oe-core, putting here until it gets merged
Change-Id: If3f5125a6063bf9eae56b2b6ecbdebb9939ad362
Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
-rw-r--r-- | recipes/gdb/files/0001-help-python-find-itself-correctly.patch | 30 | ||||
-rw-r--r-- | recipes/gdb/gdb-cross-canadian_7.5.1.bbappend | 17 |
2 files changed, 13 insertions, 34 deletions
diff --git a/recipes/gdb/files/0001-help-python-find-itself-correctly.patch b/recipes/gdb/files/0001-help-python-find-itself-correctly.patch deleted file mode 100644 index c836507..0000000 --- a/recipes/gdb/files/0001-help-python-find-itself-correctly.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From d7496f873617892ce82b200c3acdf3d87141d06c Mon Sep 17 00:00:00 2001 | ||
2 | From: Samuli Piippo <samuli.piippo@digia.com> | ||
3 | Date: Thu, 9 May 2013 15:46:15 +0300 | ||
4 | Subject: [PATCH] help python find itself correctly | ||
5 | |||
6 | The WITH_PYTHON_PATH python path does not work with relocatable | ||
7 | SDK. Instead use program name since it's bound to be in correct place. | ||
8 | --- | ||
9 | gdb/main.c | 5 +---- | ||
10 | 1 file changed, 1 insertion(+), 4 deletions(-) | ||
11 | |||
12 | diff --git a/gdb/main.c b/gdb/main.c | ||
13 | index 976f8ae..aa1913d 100644 | ||
14 | --- a/gdb/main.c | ||
15 | +++ b/gdb/main.c | ||
16 | @@ -369,10 +369,7 @@ captured_main (void *data) | ||
17 | #ifdef WITH_PYTHON_PATH | ||
18 | { | ||
19 | /* For later use in helping Python find itself. */ | ||
20 | - char *tmp = concat (WITH_PYTHON_PATH, SLASH_STRING, "lib", NULL); | ||
21 | - | ||
22 | - python_libdir = relocate_gdb_directory (tmp, PYTHON_PATH_RELOCATABLE); | ||
23 | - xfree (tmp); | ||
24 | + python_libdir = gdb_program_name; | ||
25 | } | ||
26 | #endif | ||
27 | |||
28 | -- | ||
29 | 1.7.10.4 | ||
30 | |||
diff --git a/recipes/gdb/gdb-cross-canadian_7.5.1.bbappend b/recipes/gdb/gdb-cross-canadian_7.5.1.bbappend index 6f08842..a13df13 100644 --- a/recipes/gdb/gdb-cross-canadian_7.5.1.bbappend +++ b/recipes/gdb/gdb-cross-canadian_7.5.1.bbappend | |||
@@ -1,4 +1,13 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | 1 | do_compile_prepend() { |
2 | 2 | cat > ${WORKDIR}/python << EOF | |
3 | SRC_URI += "file://0001-help-python-find-itself-correctly.patch" | 3 | #! /bin/sh |
4 | 4 | case "\$2" in | |
5 | --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}/" ;; | ||
6 | --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;; | ||
7 | --exec-prefix) echo "${exec_prefix}" ;; | ||
8 | *) exit 1 ;; | ||
9 | esac | ||
10 | exit 0 | ||
11 | EOF | ||
12 | chmod +x ${WORKDIR}/python | ||
13 | } | ||