Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add -g to LDFLAGS when compiling with LTO to get debug symbols.
8 changes: 8 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down