Created attachment 295033 [details] hwloc-1.3-build.log sys-apps/hwloc's ./configure ignores the PKG_CONFIG envvar. Instead it respects HWLOC_PKG_CONFIG because hwloc's authors decided to maintain their own fork of pkg.m4. This causes a compilation failure on portage-multilib when a cross-toolchain created by crossdev (including /usr/bin/${CHOST}-pkg-config) is installed. This is because if HWLOC_PKG_CONFIG isn't set, ./configure will try to look for ${CHOST}-pkg-config and it finds it. portage-multilib works around this collision between cross-compilation sysroot tools and host tools by setting PKG_CONFIG=pkg-config. sys-apps/hwloc ebuild should make up for hwloc's ignoring this variable by exporting HWLOC_PKG_CONFIG=$PKG_CONFIG if PKG_CONFIG is nonempty.
Created attachment 295035 [details] emerge--info.txt
As a workaround and demonstration of the fix described in the description, the following command successfully installs hwloc onto a portage-multilib machine which has an (unrelated) cross-toolchain installed: HWLOC_PKG_CONFIG=pkg-config FEATURES=-test emerge -1v hwloc
(In reply to comment #0) > sys-apps/hwloc ebuild should make up for hwloc's > ignoring this variable by exporting HWLOC_PKG_CONFIG=$PKG_CONFIG if PKG_CONFIG > is nonempty. As long as the ebuild remains in working condition for non-mulitilib, pkg_setup() is all yours. Easier if you do the changes yourself and test afterwards :)
Thanks, I've committed the changes and the package seems to be unbroken enough :-).