this introduces a new build-style void-cross, which can be used
to write system crosstoolchain templates; this is to reduce the
amount of maintenance, resolve existing problems with the cross
toolchain templates and remove repeated code
this will rewrite total paths to be relative to CCACHE_BASEDIR before caching,
helps prevent cache misses due to changed wrksrc with build systems like cmake
that use total paths in their Makefiles
git-worktree(1), and Git shared repository can use a plain text file
named `.git` at the root of working tree, containing `gitdir: <path>` to
point to the real directory that has repository.
See: gitrepository-layout(5).
But, that directory is usually inaccessible inside chroot.
In order to support git-worktree(1) and Git shared repository, compute
SOURCE_DATE_EPOCH from outside of chroot, and the chroot will carry it
over to inside chroot.
I've only tested again xbps-uunshare(1).
git-ls-files(1) is plumbing command, its output will never change
regardless of configuration, version.
git-status(1) output will be changed depends on configuration.
At least, 986d4dbc7d (common/environment/setup/git.sh: ensure untracked
files are checked., 2017-11-24) was added to address a different output
on `status.showUntrackedFiles`.
By doing this, also reduce a pipe, and a fork-exec.
Technically, git-log(1) is also a porcelain, but I _think_ `%ct` is
stable enough to stay there. If the day has come, that `git-log(1)` can
be replaced with:
git cat-file commit HEAD |
sed -ne '/^committer/{s/.* \([0-9]*\) [-+][0-9][0-9][0-9][0-9]$/\1/p;q}'
This checks if gcc-go-tools have been specified in host deps
and if so, use gccgo to build (gcc-go-tools conflicts with go).
Also, since gccgo is not a multi-compiler, we need to override GCCGO
to get cross-builds. The gccgo for target is always installed, as
it's a part of our cross-toolchains.
[ci skip]
This is necessary so that crossbuilds to unsupported architectures
are not actually attempted. There is a default archs set which
covers all architectures supported by the official compiler,
and setting it in the template can be used to restrict it more.
Also, add missing GOARCHs. These are irrelevant to whether we
can currently build for that arch or not. Just keep it around
as a list of potential archs to support. These are taken from
gccgo, and in case support for anything is added in the official
compiler, they should match.