From 0b48d598275f132a3e7ffe65849af8f46449df4c Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 9 May 2013 15:58:09 +0300 Subject: gdb: fix gdb's dependency to PYTHONHOME env gdb was unable to locate python without using PYTHONHOME environment variable. Change-Id: I5fe5d37ab88a0d186f91dbedcab1a480869da311 Reviewed-by: Samuli Piippo --- .../0001-help-python-find-itself-correctly.patch | 30 ++++++++++++++++++++++ recipes/gdb/gdb-cross-canadian_7.5.1.bbappend | 4 +++ 2 files changed, 34 insertions(+) create mode 100644 recipes/gdb/files/0001-help-python-find-itself-correctly.patch create mode 100644 recipes/gdb/gdb-cross-canadian_7.5.1.bbappend (limited to 'recipes/gdb') diff --git a/recipes/gdb/files/0001-help-python-find-itself-correctly.patch b/recipes/gdb/files/0001-help-python-find-itself-correctly.patch new file mode 100644 index 0000000..c836507 --- /dev/null +++ b/recipes/gdb/files/0001-help-python-find-itself-correctly.patch @@ -0,0 +1,30 @@ +From d7496f873617892ce82b200c3acdf3d87141d06c Mon Sep 17 00:00:00 2001 +From: Samuli Piippo +Date: Thu, 9 May 2013 15:46:15 +0300 +Subject: [PATCH] help python find itself correctly + +The WITH_PYTHON_PATH python path does not work with relocatable +SDK. Instead use program name since it's bound to be in correct place. +--- + gdb/main.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/gdb/main.c b/gdb/main.c +index 976f8ae..aa1913d 100644 +--- a/gdb/main.c ++++ b/gdb/main.c +@@ -369,10 +369,7 @@ captured_main (void *data) + #ifdef WITH_PYTHON_PATH + { + /* For later use in helping Python find itself. */ +- char *tmp = concat (WITH_PYTHON_PATH, SLASH_STRING, "lib", NULL); +- +- python_libdir = relocate_gdb_directory (tmp, PYTHON_PATH_RELOCATABLE); +- xfree (tmp); ++ python_libdir = gdb_program_name; + } + #endif + +-- +1.7.10.4 + diff --git a/recipes/gdb/gdb-cross-canadian_7.5.1.bbappend b/recipes/gdb/gdb-cross-canadian_7.5.1.bbappend new file mode 100644 index 0000000..6f08842 --- /dev/null +++ b/recipes/gdb/gdb-cross-canadian_7.5.1.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "file://0001-help-python-find-itself-correctly.patch" + -- cgit v1.2.3-54-g00ecf