Browse Source

bpo-30345: Add -g to LDFLAGS for LTO (GH-7709)

Add -g to LDFLAGS when compiling with LTO to get debug symbols.
pull/7728/merge
Victor Stinner 8 years ago
committed by GitHub
parent
commit
06fe77a84b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      Misc/NEWS.d/next/Build/2018-06-15-18-18-16.bpo-30345.j-xRE1.rst
  2. 8
      configure
  3. 8
      configure.ac

1
Misc/NEWS.d/next/Build/2018-06-15-18-18-16.bpo-30345.j-xRE1.rst

@ -0,0 +1 @@
Add -g to LDFLAGS when compiling with LTO to get debug symbols.

8
configure

@ -6427,6 +6427,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

8
configure.ac

@ -1302,6 +1302,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

Loading…
Cancel
Save