gdb: add PACKAGECONFIG for Python support

(From OE-Core rev: 4f7fd6ba77e3c233faafe490c1986527789ed80c)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Jonathan Liu 2013-07-14 17:04:20 +10:00 committed by Richard Purdie
parent 1820d33ac3
commit 344cf64642
1 changed files with 21 additions and 0 deletions

View File

@ -1,2 +1,23 @@
require gdb.inc
require gdb-7.6.inc
inherit python-dir
PACKAGECONFIG ??= ""
PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python"
do_configure_prepend() {
if [ -n "${@base_contains('PACKAGECONFIG', 'python', 'python', '', d)}" ]; then
cat > ${WORKDIR}/python << EOF
#!/bin/sh
case "\$2" in
--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}" ;;
*) exit 1 ;;
esac
exit 0
EOF
chmod +x ${WORKDIR}/python
fi
}