Page MenuHomePhabricator

Make --enable-debug to pick better options
ClosedPublic

Authored by Fabien on Feb 16 2019, 15:36.

Details

Summary

Various changes:

  • Don't check $GCC and $GXX
  • Prefer -Og instead of -O0
  • If -g3 isn't available, use -g

This also incidentally fixes compiler warnings with GCC and glibc when
using
--enable-debug, as the old default values mixed poorly with the
hardening flags.

Backport of core PR13005
This is a follow-up for D2556

Note: there is a dependency which is not backported here, and provides
gprof support. As it is not related with this diff, and likely no one is
running gprof, I prefer not backporting it. It can always be added later
if necessary.

Test Plan
./autogen.sh
mkdir build && cd build
../configure --enable-debug

Check in the configure report that the optimization CXXFLAGS are correct
(depends on your compiler, but likely -Og -g3)

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

configure.ac
226 ↗(On Diff #7371)

This was clearly removed in the PR by core. Clearly there are pieces missing here that needs to be backported before this one.

configure.ac
226 ↗(On Diff #7371)

This part has been added in PR13445 (see D2556) which has been merged in core after this PR, this is why this part doesn't exist in the original PR.

This revision is now accepted and ready to land.Feb 19 2019, 14:18
This revision was automatically updated to reflect the committed changes.