From a6105d78212565d370a1904377e72d420bb27b0e Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Thu, 31 Dec 2015 15:07:37 -0800 Subject: [PATCH] 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. --- .../sys-libs/glibc/files/eblits/src_compile.eblit | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/eblits/src_compile.eblit b/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/eblits/src_compile.eblit index 7a38b3e6e4..6d513fc1d1 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/eblits/src_compile.eblit +++ b/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/eblits/src_compile.eblit @@ -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