Skip to content

Commit

Permalink
toolchain-funcs.eclass: Set CHOST within econf_build to fix config.site
Browse files Browse the repository at this point in the history
We were setting CBUILD within econf_build but not CHOST. crossdev's
/usr/share/config.site relies on both of these to decide whether to load
configure overrides needed when cross-compiling. Using the wrong
overrides leads to packages such as Python failing.

Doing this also avoids the need to duplicate the --build and --host
configure arguments.

Signed-off-by: James Le Cuirot <[email protected]>
  • Loading branch information
chewi committed Dec 6, 2022
1 parent 7f73d0a commit 65f7023
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eclass/toolchain-funcs.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,8 @@ tc-env_build() {
# @CODE
econf_build() {
local CBUILD=${CBUILD:-${CHOST}}
tc-env_build econf --build=${CBUILD} --host=${CBUILD} "$@"
econf_env() { CHOST=${CBUILD} econf "$@"; }
tc-env_build econf_env "$@"
}

# @FUNCTION: tc-ld-is-gold
Expand Down

0 comments on commit 65f7023

Please sign in to comment.