depends: disable builtin rules and suffixes. #33045

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:22126_rebased changing 1 files +2 −0
  1. fanquake commented at 3:24 pm on July 23, 2025: member

    This picks up #22126. Previously, this was more complicated to do, as depends packages (upnp, natpmp) used the rules being disabled. Those packages have since been removed, and we should be able to use the flag directly.

    When there is no rule to build a target in the makefile, make looks for a builtin rule. When -r is specified make no longer performs this lookup.

    E.g. the following in an excerpt from make -d output. Here, make looks for a rule to build all.

     0Considering target file 'all'.
     1 File 'all' does not exist.
     2 Looking for an implicit rule for 'all'.
     3 Trying pattern rule with stem 'all'.
     4 Trying implicit prerequisite 'all.o'.
     5 Trying pattern rule with stem 'all'.
     6 Trying implicit prerequisite 'all.c'.
     7 Trying pattern rule with stem 'all'.
     8 Trying implicit prerequisite 'all.cc'.
     9 Trying pattern rule with stem 'all'.
    10 Trying implicit prerequisite 'all.C'.
    11 Trying pattern rule with stem 'all'.
    12 Trying implicit prerequisite 'all.cpp'.
    13 Trying pattern rule with stem 'all'.
    14 Trying implicit prerequisite 'all.p'.
    15 Trying pattern rule with stem 'all'.
    16 Trying implicit prerequisite 'all.f'.
    17...
    

    Many more lines like this are omitted.

    Because this build system does not use make builtin rules or suffixes, there is no benefit in having builtin rules enabled.

    There are 2 benefits in having builtin rules disabled.

    1. Improves performance by eliminating redundant lookups.
    2. Simplifies troubleshooting by reducing the output of make -d or make -p.

    Also see: https://www.gnu.org/software/make/manual/make.html#index-_002d_002dno_002dbuiltin_002drules.

  2. DrahtBot added the label Build system on Jul 23, 2025
  3. DrahtBot commented at 3:24 pm on July 23, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33045.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  4. fanquake added the label DrahtBot Guix build requested on Jul 23, 2025
  5. DrahtBot commented at 11:21 am on July 24, 2025: contributor

    Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]

    File commit 73e754bd01b0653d1fda2d947fcaed0742da81c3(master) commit 21f4a31c8a7f054e85e0e978bdd23c19ca487a69(pull/33045/merge)
    *-aarch64-linux-gnu-debug.tar.gz 66323aae7b9ce287... 913afa27e7edcace...
    *-aarch64-linux-gnu.tar.gz f91f331b0f58ca41... 8e0a47321ef370f2...
    *-arm-linux-gnueabihf-debug.tar.gz 35514683e2c806eb... 3f654c51e8fca816...
    *-arm-linux-gnueabihf.tar.gz 03b34325a162d549... 4f5b75460a1b99bd...
    *-arm64-apple-darwin-codesigning.tar.gz f22f13c2eca5fdfb... e6ce8199724a107b...
    *-arm64-apple-darwin-unsigned.tar.gz 3391effee20ec6af... 34e88ab254c31f2d...
    *-arm64-apple-darwin-unsigned.zip a502fe719ba93cd6... 551be5fd8181cfbf...
    *-powerpc64-linux-gnu-debug.tar.gz 5056cab7e5846f1a... 24eb381acb4a0e21...
    *-powerpc64-linux-gnu.tar.gz 8f2a3dc992ad2528... d58c2be9bbdc0a1e...
    *-riscv64-linux-gnu-debug.tar.gz dff0790128ad3e3b... 8fe4b7b1d494eebd...
    *-riscv64-linux-gnu.tar.gz 36f075d3e82d8118... ca4c95d02bc10b7c...
    *-x86_64-apple-darwin-codesigning.tar.gz f5c98678f07abadb... 29d3165d030c199c...
    *-x86_64-apple-darwin-unsigned.tar.gz 92f3bdbf703a28ba... 01b2a075580bea08...
    *-x86_64-apple-darwin-unsigned.zip 1ce72bf9ece268b9... 253a27b1fb825dd7...
    *-x86_64-linux-gnu-debug.tar.gz 6378973406ab790c... 77c232b9b592bd82...
    *-x86_64-linux-gnu.tar.gz 852bd5993a5e0af6... 4654cfb476133c39...
    *.tar.gz c374850b77d3191b... b677fe2965b77171...
    SHA256SUMS.part bb4156ff76c39233... e89eb8569e44abd8...
    guix_build.log 945c1eaecc45dbdd... f6a192c8fa22676a...
    guix_build.log.diff 61d0d7d432f7f2b2...
  6. DrahtBot removed the label DrahtBot Guix build requested on Jul 24, 2025
  7. fanquake force-pushed on Jul 31, 2025
  8. fanquake requested review from theuni on Aug 1, 2025
  9. fanquake force-pushed on Aug 1, 2025
  10. fanquake force-pushed on Aug 6, 2025
  11. depends: disable builtin rules and suffixes.
    When there is no rule to build a target in the makefile, make looks
    for a builtin rule.
    When -r is specified make no longer performs this lookup.
    
    E.g. the following in an excerpt from make -d output.
    Here, make looks for a rule to build 'all'.
    
    Considering target file 'all'.
     File 'all' does not exist.
     Looking for an implicit rule for 'all'.
     Trying pattern rule with stem 'all'.
     Trying implicit prerequisite 'all.o'.
     Trying pattern rule with stem 'all'.
     Trying implicit prerequisite 'all.c'.
     Trying pattern rule with stem 'all'.
     Trying implicit prerequisite 'all.cc'.
     Trying pattern rule with stem 'all'.
     Trying implicit prerequisite 'all.C'.
     Trying pattern rule with stem 'all'.
     Trying implicit prerequisite 'all.cpp'.
     Trying pattern rule with stem 'all'.
     Trying implicit prerequisite 'all.p'.
     Trying pattern rule with stem 'all'.
     Trying implicit prerequisite 'all.f'.
    ...
    Many more lines like this are omitted.
    
    Because this build system does not use make builtin rules or suffixes,
    there is no benefit in having builtin rules enabled.
    
    There are 2 benefits in having builtin rules disabled.
    
    1. Improves performance by eliminating redundant lookups.
    2. Simplifies troubleshooting by reducing the output of make -d or
    make -p.
    3243f04ea0
  12. fanquake force-pushed on Aug 13, 2025


fanquake DrahtBot


theuni

Labels
Build system


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: 2025-08-31 12:12 UTC

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