Commit Graph

10 Commits

Author SHA1 Message Date
David Michael
afff45366a build_toolchains: Update sysroot settings for newer portage
Since EAPI=7 was supported, portage can no longer use different
ROOT and SYSROOT values.  This adjusts the paths so that the first
phase builds cross-toolchains under /usr/${CHOST}, then the native
toolchains are built under /build/${BOARD} (as was being done
previously).  Now that the cross-toolchain development files can't
be used when building the native toolchain, the headers and libs
are stupidly copied into the board root to be used used and then
overwritten by the board packages as they are built.  Since this is
all done in a chroot, these changes shouldn't affect the SDK host.
2018-08-29 21:40:21 +00:00
Michael Marineau
6e6a0a4967 toolchain_util: include repos.conf in bootstrap build environments
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
2015-04-01 16:30:37 -07:00
Geoff Levand
ea6cf50b8d toolchain_util.sh: Fix _configure_sysroot CBUILD
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]
2015-04-01 15:54:43 -07:00
Michael Marineau
21614c5942 fix(toolchain_util): Move toolchain build-dep code from catalyst.
Now this code can be shared with setup_board. Only required if
setup_board is called with --nousepkg which is rare to never but feels
like the correct thing to do. Alternatively setup_board could always
use binary packages (as it basically does now).
2013-11-29 17:56:58 -08:00
Michael Marineau
d5a19a0700 fix(toolchain_util.sh): Move cross-toolchain install code to common lib.
This will eventually be used by setup_board instead of the even more
complicated toolchain code provided by chromite.
2013-11-07 13:28:13 -08:00
Michael Marineau
986548722d fix(toolchain_util.sh): Move native->cross pkg translation to function
Will be useful in other places and seems better to hide the bash magic.
2013-11-07 13:28:13 -08:00
Michael Marineau
9187adb7ca fix(catalyst_toolchains.sh): Fix error in doc comment 2013-10-23 12:07:39 -07:00
Michael Marineau
169cc17394 fix(build_toolchains): Fix simple logging typo 2013-10-23 12:02:25 -07:00
Michael Marineau
31d5ced3df fix(build_toolchains): Remove hard-coded portage profile 2013-10-23 11:58:19 -07:00
Michael Marineau
c503b0248b add(build_toolchains): New command to build cross and native target toolchains.
This replaces the cross-toolchain compile step in bootstrap_sdk and adds the
ability to build native toolchains using the cross toolchain. This is just
the first step towards actually providing the native toolchain in a container.
2013-10-23 11:07:01 -07:00