glibc: ensure cross-rpcgen is compiled during the compile phase

When bootstrapping glibc installs headers but is not built. However a
native tool, cross-rpcgen, must be built in order to generate rpcsvc
header files. By skipping directly to `make headers-install` the tool
winds up getting built during src_install, building as root instead of
the portage user and so on. Although uncommon this may lead to
permission issues with ccache.
This commit is contained in:
Michael Marineau 2015-12-31 15:07:37 -08:00
parent bfa49f1871
commit a6105d7821

View File

@ -14,9 +14,21 @@ toolchain-glibc_src_compile() {
done
}
## COREOS: fix compilation of cross-rpcgen during compiler bootstrap
toolchain-glibc_headers_compile() {
[[ ${EAPI:-0} == [01] ]] && toolchain-glibc_headers_configure
tc-export_build_env
local builddir=$(builddir "headers")
cd "${builddir}"
emake -C "${S}/sunrpc" subdir=sunrpc objdir="${builddir}" \
"${builddir}/sunrpc/cross-rpcgen" || die "make cross-rpcgen failed"
}
eblit-glibc-src_compile() {
if just_headers ; then
[[ ${EAPI:-0} == [01] ]] && toolchain-glibc_headers_configure
export ABI=default
toolchain-glibc_headers_compile
return
fi