mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-21 22:47:14 -08:00
ec695aaabeef9ef78ca38e22294b6523ed4075da
Per [1], we cannot have ${MULTILIB_USEDEP} in BDEPEND because it would
break cross-compiles, as ${MULTILIB_USEDEP} specifies ABIs of CHOST, not
of CBUILD.
However, this leads to a problem, as multilib.eclass does not preserve
the default build-machine toolchain before it appends the ABI flags to
the host-machine toolchain. Thus, when $(tc-getBUILD_CC) later pulls a
default value for BUILD_CC from CC, the ABI flags have already been
appended to CC, and BUILD_CC inherits those flags, thus causing any
build-time helper executables to be built for a non-default ABI, whose
build-time dependencies may not be installed in ${BROOT} since
${MULTILIB_USEDEP} makes no sense in BDEPEND.
Note, the behavior is inconsistent if the user has set BUILD_CC and
friends via their package.env, as then the ABI flags are *not* applied
to the build-machine toolchain via defaulting from the host-machine
toolchain.
This commit fixes up multilib.eclass so that it derives the build-
machine toolchain variables _before_ it appends the ABI flags to the
host-machine toolchain variables and so that it overrides CBUILD to the
default ABI in the non-cross-compiling case. The result is that build-
time helper executables are always built for the build machine's
_default_ ABI, even in the non-cross-compiling case.
[1] https://bugs.gentoo.org/960506#c9
Bug: https://bugs.gentoo.org/960506
Signed-off-by: Matt Whitlock <gentoo@mattwhitlock.name>
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
…
…
…
…
…
…
Description
No description provided
9.8 GiB
Languages
Shell
98%
Roff
1.4%
Emacs Lisp
0.2%
C
0.1%