diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2017-06-15 23:57:58 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2017-06-21 09:34:50 +0200 |
commit | 1c6ab56f2f0b0b21b10157a8c84215d1b0fbd839 (patch) | |
tree | 93f23df24467c12a93092a547ba0a25c46520fdb | |
parent | b2ab2eb421f308c29961730037472e6e40ffa1fb (diff) | |
download | ptxdist-1c6ab56f2f0b0b21b10157a8c84215d1b0fbd839.tar.gz ptxdist-1c6ab56f2f0b0b21b10157a8c84215d1b0fbd839.tar.xz |
wrapper: add gdb wrapper
Add arguments to set sysroot and debug-file-directory.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rwxr-xr-x | bin/ptxdist | 2 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_00-init.sh | 1 | ||||
-rwxr-xr-x | scripts/wrapper/gdb-wrapper | 11 |
3 files changed, 13 insertions, 1 deletions
diff --git a/bin/ptxdist b/bin/ptxdist index 2be232bd7..c8468e31e 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -772,7 +772,7 @@ check_compiler() { } ptxd_replace_link "${toolchain}" "${PTXDIST_PLATFORMDIR}/selected_toolchain" && - for cc in gcc g++ cpp ld; do + for cc in gcc g++ cpp ld gdb; do ptxd_replace_link "${toolchain}/${compiler_prefix}${cc}" "${wrapper_dir}/real/${compiler_prefix}${cc}" && ptxd_replace_link "${SCRIPTSDIR}/wrapper/${cc}-wrapper" "${wrapper_dir}/${compiler_prefix}${cc}" done && diff --git a/scripts/lib/ptxd_make_00-init.sh b/scripts/lib/ptxd_make_00-init.sh index 0ea48be80..9c280fb19 100644 --- a/scripts/lib/ptxd_make_00-init.sh +++ b/scripts/lib/ptxd_make_00-init.sh @@ -416,6 +416,7 @@ ptxd_init_save_wrapper_env() { PTXDIST_CROSS_LDFLAGS="${PTXDIST_CROSS_LDFLAGS}" PTXDIST_HOST_CPPFLAGS="${PTXDIST_HOST_CPPFLAGS}" PTXDIST_HOST_LDFLAGS="${PTXDIST_HOST_LDFLAGS}" + PTXDIST_PLATFORMDIR="${PTXDIST_PLATFORMDIR}" EOF } diff --git a/scripts/wrapper/gdb-wrapper b/scripts/wrapper/gdb-wrapper new file mode 100755 index 000000000..786f2be2c --- /dev/null +++ b/scripts/wrapper/gdb-wrapper @@ -0,0 +1,11 @@ +#!/bin/sh + +. "$(dirname "$(readlink -f "$0")")/libwrapper.sh" || exit + +unset PTXDIST_ICECC +unset PTXDIST_CCACHE + +wrapper_exec \ + --init-eval-command="set debug-file-directory ${PTXDIST_PLATFORMDIR}/root/usr/lib/debug" \ + --init-eval-command="set sysroot ${PTXDIST_PLATFORMDIR}/root" \ + "$@" |