Similar to https://bugs.gentoo.org/630282, we should make tc-env_build handle the non-cross compiler case. See https://bugs.gentoo.org/653902#c5 for context. tc-env_build currently looks like so: tc-env_build() { tc-export_build_env CFLAGS=${BUILD_CFLAGS} \ CXXFLAGS=${BUILD_CXXFLAGS} \ CPPFLAGS=${BUILD_CPPFLAGS} \ LDFLAGS=${BUILD_LDFLAGS} \ AR=$(tc-getBUILD_AR) \ AS=$(tc-getBUILD_AS) \ CC=$(tc-getBUILD_CC) \ CPP=$(tc-getBUILD_CPP) \ CXX=$(tc-getBUILD_CXX) \ LD=$(tc-getBUILD_LD) \ NM=$(tc-getBUILD_NM) \ PKG_CONFIG=$(tc-getBUILD_PKG_CONFIG) \ RANLIB=$(tc-getBUILD_RANLIB) \ "$@" } In the non-cross case all the *FLAGS are overwritten. This will allow the meson eclass to be simplified and just call: tc-env_build "$@" || die for cross and non-cross cases.
Created attachment 529280 [details, diff] Copy *FLAGS to BUILD_*FLAGS so they get set correctly in tc-env_build
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2dd9b21e7b9003c1dd6e7e71578449d01302d610 commit 2dd9b21e7b9003c1dd6e7e71578449d01302d610 Author: Raul E Rangel <rrangel@chromium.org> AuthorDate: 2018-05-01 18:40:30 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2018-05-05 20:15:55 +0000 tc-export_build_env: handle non-cross compile case By handling the non-cross compiler case the meson.eclass can be simplified to `tc-env_build "$@" || die`. See https://bugs.gentoo.org/654424 Change-Id: I1a90da46366c490abbf7d5660bf90482c7f22747 Signed-off-by: Raul E Rangel <rrangel@chromium.org> Closes: https://bugs.gentoo.org/654424 eclass/toolchain-funcs.eclass | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-)