dongcarl
commented at 5:41 pm on August 7, 2020:
member
Hello clang/lib/frontend,
I search your headers once again.
Because it’s time for some housekeeping,
Within the code I was tweaking,
And the targets I was making with my build,
Are unfulfilled,
It’s just language compliance.
In reference works I scroll alone
Pages cribbed from holy tomes
In the details of a template
My code’s behaviour has now found its fate
When my hopes were dashed as a note left it as described:
As undefined
It’s not in compliance
And from the standard text I saw
Ten thousand errors, maybe more
Threading used without locking
Pointers referenced after freeing
Linters writing warnings that coders will never fix
But still they tick
The box that claims compliance
“Fools,” said I, “you do not know”
Errors, like a cancer, grow
Hear my words that I might reach you
Use -Wall and it might teach you
But my words and compiler errors fade.
Schedules forbade compliance.
And the people bowed and prayed
With static checking torn and frayed
The markets flashed out their warning
In the words that they were forming
As recruiters said “The search for more profits leads to writing stuff in CSS,
And node.js.
Without a need for compliance”
Many thanks to ajtowns for the above contribution!
This PR is ready for review!
When cross-compiling for macOS, the SDK gives us the entire context/sysroot on which we should base the build. This means that we can be extremely specific w/re our search path ordering in order to avoid build problems that arise out of a user’s specific environment/system setup and improve the robustness of our macOS toolchain. This PR does 2 things to this end:
Unset environment variables which are known to alter search paths.
Makes us (in the case of macOS builds) explicitly specify the list of system include search paths and its ordering, rather than rely on clang’s unreliable autodetection routine. Here is the rabbit-hole gist.
See the added comments in depends/hosts/darwin.mk for more details:
We can be this specific only because macOS builds are neatly contained in an SDK, and we are cross-compiling. Native toolchains should rely on the environment/distro/user to know how best to build for the running system.
Note: Although the -u flag of env is not a POSIX standard flag, it seems like it is useful enough to be implemented in coreutils, busybox, FreeBSD.
dongcarl added the label
Build system
on Aug 7, 2020
dongcarl requested review from theuni
on Aug 7, 2020
dongcarl added this to the "PRs" column in a project
fanquake
commented at 7:55 am on August 10, 2020:
member
Concept ACK - did not read the @ajtowns poem. Did you want to link to your other recent gist here as well?
dongcarl
commented at 3:08 pm on August 10, 2020:
member
Did you want to link to your other recent gist here as well?
Added to description! It’s also in the comments added to darwin.mk.
dongcarl added the label
Needs gitian build
on Aug 21, 2020
dongcarl added the label
Needs Guix build
on Aug 21, 2020
DrahtBot
commented at 10:06 am on August 25, 2020:
member
DrahtBot removed the label
Needs gitian build
on Aug 28, 2020
dongcarl force-pushed
on Sep 25, 2020
dongcarl renamed this:
WIP: depends: Explicitly specify clang search paths for darwin host
depends: Pin clang search paths for darwin host
on Sep 25, 2020
dongcarl marked this as ready for review
on Sep 25, 2020
dongcarl
commented at 9:12 pm on September 25, 2020:
member
This PR is now based on #20019, please review that first. I’ve added some more details to the original description and I believe this is in a good state to be reviewed and merged (after #20019 ofc).
DrahtBot
commented at 9:27 pm on October 24, 2020:
member
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Conflicts
Reviewers, this pull request conflicts with the following ones:
#18298 (build: Fix Qt processing of configure script for depends with DEBUG=1 by hebasto)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
dongcarl force-pushed
on Nov 23, 2020
dongcarl
commented at 0:02 am on November 24, 2020:
member
Restored previous behavior of pinning CC/CXX/AR/etc when generating config.site, but with a (more flexible) env PATH= wrapper rather than prefixing the bindir
I also evaluated the recommended alternative of calling ccache with clang as argv[1] and measured the effects on ccache’s hits and misses.
My procedure:
Compile depends
Do an initial build
Clear ccache statistics, but not cache
Do a second build (presumable that should have quite a few cache hits from the initial build)
clang as argv[1]:
0cache directory /home/dongcarl/.ccache
1primary config /home/dongcarl/.ccache/ccache.conf
2secondary config (readonly) /etc/ccache.conf
3stats updated Fri Dec 18 16:47:22 2020
4stats zeroed Fri Dec 18 16:47:07 2020
5cache hit (direct) 478
6cache hit (preprocessed) 1
7cache miss 1
8cache hit rate 99.79 %
9called for link 7
10cleanups performed 0
11files in cache 1175
12cache size 60.5 MB
13max cache size 5.0 GB
This PR:
0cache directory /home/dongcarl/.ccache
1primary config /home/dongcarl/.ccache/ccache.conf
2secondary config (readonly) /etc/ccache.conf
3stats updated Fri Dec 18 01:38:46 2020
4stats zeroed Fri Dec 18 01:38:29 2020
5cache hit (direct) 471
6cache hit (preprocessed) 0
7cache miss 1
8cache hit rate 99.79 %
9called for link 6
10cleanups performed 0
11files in cache 888
12cache size 57.9 MB
13max cache size 5.0 GB
Given that the difference in number of cache hits is so small, and the code required to make “clang as argv[1]” work is somewhat complex, I decided it was not worth it.
dongcarl force-pushed
on Jan 7, 2021
dongcarl force-pushed
on Jan 7, 2021
depends: Delay expansion of per-package vars
Prior to this commit, when int_vars was called for packages, it would
immediately expand the "single-dollar variables", which may be defined
in terms of variables which are not yet determined (e.g. variables
defined in package/*.mk, which are included after int_vars is called).
This is required for the next commit as after that commit, for darwin
cross-builds:
0. int_vars is defined in terms of $(1)_cc
1. $(1)_cc is defined in terms of darwin_CC
2. ... which is defined in terms of clang_resource_dir
3. ... which is defined in terms of native_cctools_clang_version
4. which is undetermined at the time when int_vars is being expanded and evaluated
107f33d434
depends: Pin clang search paths for darwin host3007339218
depends: Remove -fuse-ld line
clang warns when a command line option is unused, and some of our tests
use Werror, so unfortunately we cannot use this flag to pin our linker
for now. Leaving this commit in for future reference, as it would be
great if there's more granularity to Werror and we can be explicit about
what linker we want to use.
77b1ef89a0
depends: Quote to prevent word splitting in config.site
SC2086 is disabled in our linter script so this wasn't caught.
8033110741
dongcarl force-pushed
on Jan 7, 2021
dongcarl
commented at 7:06 pm on January 7, 2021:
member
Use "${var}/bar" instead of "$var/bar" to be more more explicit
Simplify how $PATH is determined
depends: Fully determine path for darwin_{CC,CXX}
Instead of doing the awkward /bin path prepending at config.site
creation time, set darwin_{CC,CXX} in a way that fully determines the
program's path (clang/clang++) similar to how AC_PATH_{TOOL,PROG} would
do.
Also see the added comment block in depends/Makefile for more context on
determining $PATH for our config.site.
880660acfa
depends: Fully determine path for darwin cctools
See previous commit for description.
949c480e52
depends: Add comment about cache invalidation196b727649
dongcarl force-pushed
on Jan 7, 2021
dongcarl
commented at 7:26 pm on January 7, 2021:
member
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-18 18:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me