build: make configure –enable-debug override CXXFLAGS from depends #26393

pull mruddy wants to merge 1 commits into bitcoin:master from mruddy:build_depends_debug_flags changing 3 files +4 −3
  1. mruddy commented at 12:48 pm on October 26, 2022: contributor

    Before this change, to compile with depends, and have your --enable-debug -O0 be effective, you’d still need to do:

    CONFIG_SITE="$PWD/depends/x86_64-pc-linux-gnu/share/config.site" ./configure --enable-debug CXXFLAGS="-O0"

    This is because the depends config.site is setting -O1 via CXXFLAGS. For more info, see here https://github.com/bitcoin/bitcoin/blob/69b10212ea5370606c7a5aa500a70c36b4cbb58f/depends/hosts/linux.mk#L17-L18

    This PR makes it so that you just have to run: CONFIG_SITE="$PWD/depends/x86_64-pc-linux-gnu/share/config.site" ./configure --enable-debug

  2. hebasto commented at 12:54 pm on October 26, 2022: member
    It is supposed to build depends with DEBUG=1. In that case no --enable-debug required as it is set in config.site.
  3. mruddy commented at 12:58 pm on October 26, 2022: contributor

    By doing that, you end up with -O1 instead of -O0 -g3 -ftrapv. Building depends with make DEBUG=1 is not enough.

    EDIT: Here’s my process:

    0cd depends/
    1make -j 4 DEBUG=1
    2cd ..
    3./autogen.sh
    4CONFIG_SITE="$PWD/depends/x86_64-pc-linux-gnu/share/config.site" ./configure --enable-debug
    5make -j 4 check
    
  4. DrahtBot added the label Build system on Oct 26, 2022
  5. bitcoin deleted a comment on Oct 27, 2022
  6. mruddy force-pushed on Oct 28, 2022
  7. build: make configure --enable-debug override CXXFLAGS from depends 6e2fca3216
  8. mruddy force-pushed on Oct 30, 2022
  9. fanquake commented at 8:35 am on October 31, 2022: member
    @mruddy you might want to take a look at #25972, which is related to this change, and contains fixes for some of the issues you’re seeing in the CI here.
  10. fanquake commented at 11:16 am on December 5, 2022: member
    Going to close this in favour of #25972, which solves the same issue. The CI failures here are the same as-in that PR, where solutions to most have been found. I think the next steps are to start splitting changes off the PR.
  11. fanquake closed this on Dec 5, 2022

  12. mruddy commented at 11:57 am on December 7, 2022: contributor
    @fanquake I think that this PR should follow (that is, build off of the changes that you guys are doing in) #25972, but I don’t think they solve the same issue. Fundamentally, this PR deals with getting the CXXFLAGS that are set by the depends build to not clobber the debug flags set by the subsequent configure.
  13. bitcoin locked this on Dec 7, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-22 18:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me