toolchain: bump Codescape IMG MIPS version to 2016.05-06
[buildroot-gz.git] / package / gdb / gdb-python-config
blob0f002281d7b0ee7dc48fb16a6694af01a2f0dca7
1 #!/bin/sh
3 # This shell script is used to fake Python. Gdb wants to be passed a
4 # Python interpreter, to run its own python-config.py program, which
5 # uses sysconfig. However, when cross-compiling, this doesn't work
6 # well since we would have to use the host Python, whose sysconfig
7 # module would return host values.
9 # As recommended at
10 # https://sourceware.org/gdb/wiki/CrossCompilingWithPythonSupport,
11 # this wrapper shell script can be used as a replacement. It ignores
12 # the python-config.py script passed as first arguments, and
13 # "emulates" its behavior.
15 if [ $# -ne 2 ] ; then
16 echo "Bad # args." >&2
17 exit 1
20 # The first argument is the path to python-config.py, ignore it.
22 case "$2" in
23 --includes)
24 echo "-I${STAGING_DIR}/usr/include/python2.7"
26 --ldflags)
27 echo "-lpthread -ldl -lutil -lm -lpython2.7"
29 --exec-prefix)
30 echo "/usr"
33 echo "Bad arg $2." >&2
34 exit 1
36 esac