diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/libmakepkg/tidy/strip.sh.in | 7 | ||||
-rw-r--r-- | scripts/makepkg.sh.in | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/scripts/libmakepkg/tidy/strip.sh.in b/scripts/libmakepkg/tidy/strip.sh.in index e88bde78..8a1d6096 100644 --- a/scripts/libmakepkg/tidy/strip.sh.in +++ b/scripts/libmakepkg/tidy/strip.sh.in @@ -57,15 +57,12 @@ strip_file() { # copy source files to debug directory local f t - while read -r f; do - t=${f/"$srcdir"/$dbgsrc} + while read -r t; do + f=${t/$dbgsrc/"$srcdir"} mkdir -p "${t%/*}" cp -- "$f" "$t" done < <(source_files "$binary") - # adjust debug symbols to point at sources - debugedit -b "${srcdir}" -d /usr/src/debug/ -i "$binary" &> /dev/null - # copy debug symbols to debug directory mkdir -p "$dbgdir/${binary%/*}" objcopy --only-keep-debug "$binary" "$dbgdir/$binary.debug" diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 1191e4ec..e5ebfee4 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -379,6 +379,10 @@ prepare_buildenv() { fi if check_option "debug" "y"; then + if [[ -v DBGSRCDIR ]]; then + DEBUG_CFLAGS+=" -fdebug-prefix-map=$srcdir=$DBGSRCDIR" + DEBUG_CXXFLAGS+=" -fdebug-prefix-map=$srcdir=$DBGSRCDIR" + fi CFLAGS+=" $DEBUG_CFLAGS" CXXFLAGS+=" $DEBUG_CXXFLAGS" fi |