diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-06-22 00:10:20 -0700 |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2018-06-22 09:10:20 +0200 |
commit | 1bb9dd337ed5aa9eafc8e2ce017ceedf044145e3 (patch) | |
tree | de6fcccf27d0b29b9408bcd1147cf5e37ec7a5f2 /configure.ac | |
parent | d554414d981a8bfe38cc5df5751bc3efcb0c36c3 (diff) | |
download | cpython-git-1bb9dd337ed5aa9eafc8e2ce017ceedf044145e3.tar.gz |
bpo-30345: Add -g to LDFLAGS for LTO (GH-7709) (GH-7824)
Add -g to LDFLAGS when compiling with LTO to get debug symbols.
(cherry picked from commit 06fe77a84bd29d51506ab2ff703ae585a6121af2)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index b5beb08574..3885786aab 100644 --- a/configure.ac +++ b/configure.ac @@ -1339,6 +1339,14 @@ 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 + CFLAGS="$CFLAGS $LTOFLAGS" LDFLAGS="$LDFLAGS $LTOFLAGS" fi |