summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure b/configure
index e0389649ae..3e52e60f91 100755
--- a/configure
+++ b/configure
@@ -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