summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-06-22 07:10:42 (GMT)
committerGitHub <noreply@github.com>2018-06-22 07:10:42 (GMT)
commit78392885c9b08021c89649728053d31503d8a509 (patch)
tree51ebf236ba009fc11a13934bcd6a95f10fcf786e /configure.ac
parenta0622f1071164bc67a307cfec1173c295901c4b9 (diff)
downloadcpython-78392885c9b08021c89649728053d31503d8a509.zip
cpython-78392885c9b08021c89649728053d31503d8a509.tar.gz
cpython-78392885c9b08021c89649728053d31503d8a509.tar.bz2
bpo-30345: Add -g to LDFLAGS for LTO (GH-7709) (GH-7826)
Add -g to LDFLAGS when compiling with LTO to get debug symbols.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 338be3b..f2cd117 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1347,6 +1347,13 @@ if test "$Py_LTO" = 'true' ; then
esac
;;
esac
+
+ if test "$ac_cv_prog_cc_g" = "yes"
+ then
+ # bpo-30345: Add -g to LDFLAGS when compiling with LTO
+ # to get debug symbols.
+ LTOFLAGS="$LTOFLAGS -g"
+ fi
fi
# Enable PGO flags.