The cros-workon eclass was a mix of all sorts of magic tricks from
ChromeOS but the only ones we care about are the abilities to clone from
local git repos and manage live ebuilds. Many of the extra config
options are unused now in CoreOS and the whole "common.mk" build system
is completely irrelevant. Gutting it all will hopefully make problems we
encounter with it easier to understand.
Also, by moving from the git-2 to the git-r3 eclass for fetching remote
repositories we can use the new EGIT_CLONE_TYPE=mirror option to fetch
all refs of remote repositories, hopefully avoiding the difficulty of
managing packages with multiple development branches like systemd.
Portage is not processing the rocket->rkt package move for me in
/build/amd64-usr for some reason. Not sure what trick we are missing. As
an alternative to the package move use a conflict to remove the old
package instead.
This is required for the eventual removal of `$PORTDIR` and
`$PORTDIR_OVERLAY` and ensures toolchain rebuilds/updates with
`./build_packages --nousepkg` don't erroniously try to use ebuilds from
`/usr/portage` inside of the SDK.
In order to fix up the build_toolchains script the crossdev overlay
needs to be setup properly, previously only setup_board did it.
Overall silences a lot of warnings and fixes an issue with crossdev:
/usr/bin/emerge-wrapper: line 48: /eclass/toolchain-funcs.eclass: No such file or directory
/usr/bin/emerge-wrapper: line 49: tc-arch: command not found
The portage CBUILD and HOSTCC variables need to be set to the SDK host to get
a proper cross build when building target binaries.
Change _configure_sysroot to use the CBUILD environment variable to set the
CBUILD and HOSTCC variables of ${ROOT}/etc/portage/make.conf. Also, fix up all
calls to _configure_sysroot to set the CBUILD environment variable.
Fixes setup_board failure when the host and target architectures differ.
Signed-off-by: Geoff Levand <geoff@infradead.org>
[marineam: fixed a copy/paste error]
commit 03e8d451bf7d5dc66994ccdc90af39e6128689e5 (setup_board: setup
gdb wrapper and debug symbol path) added hard coded paths for the
symbol path. Change those to use the BOARD_ROOT variable.
Signed-off-by: Geoff Levand <geoff@infradead.org>