diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-06-22 07:10:20 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2018-06-22 07:10:20 (GMT) |
commit | 1bb9dd337ed5aa9eafc8e2ce017ceedf044145e3 (patch) | |
tree | de6fcccf27d0b29b9408bcd1147cf5e37ec7a5f2 /configure | |
parent | d554414d981a8bfe38cc5df5751bc3efcb0c36c3 (diff) | |
download | cpython-1bb9dd337ed5aa9eafc8e2ce017ceedf044145e3.zip cpython-1bb9dd337ed5aa9eafc8e2ce017ceedf044145e3.tar.gz cpython-1bb9dd337ed5aa9eafc8e2ce017ceedf044145e3.tar.bz2 |
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')
-rwxr-xr-x | configure | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -6482,6 +6482,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 |