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.
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
20 # The first argument is the path to python-config.py, ignore it.
24 echo "-I${STAGING_DIR}/usr/include/python2.7"
27 echo "-lpthread -ldl -lutil -lm -lpython2.7"
33 echo "Bad arg $2." >&2