summaryrefslogtreecommitdiffstats
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2018-01-09 03:50:37 +0100
committerAllan McRae <allan@archlinux.org>2018-01-10 01:53:15 +0100
commit653d2dc86d5340c6854818bdab3dae65bf62d474 (patch)
tree1be55b8111a0b661adb96137af10d2380ce9dbd6 /scripts/makepkg.sh.in
parent4d80d87f9069fba17ebf4d91cdb097b433a57908 (diff)
downloadpacman-653d2dc86d5340c6854818bdab3dae65bf62d474.tar.gz
pacman-653d2dc86d5340c6854818bdab3dae65bf62d474.tar.xz
Fix moving source files into debug packages
Commit 8bec63bf92d8dd028aa88dbd5109c314cdb9ebea attempted to switch to using -fdebug-prefix-map to set file locations in debug packages. It make a few mistakes... 1) Adding debug C{,XX}FLAGS only worked if DBGSRCDIR was defined in makepkg.conf. Fix this by falling back to the default value. 2) Using -fdebug-prefix-map altered a lot of assumptions about file locations when copying source files into debug packages. This resulted in lots of messages of failed cp in packaging output. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 8251e71b..a74e7b39 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -379,10 +379,8 @@ 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
+ DEBUG_CFLAGS+=" -fdebug-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
+ DEBUG_CXXFLAGS+=" -fdebug-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
CFLAGS+=" $DEBUG_CFLAGS"
CXXFLAGS+=" $DEBUG_CXXFLAGS"
fi