6 ms·
The "simple" code completely breaks with cross-compilation. This is because the autoconf macros will first look for the CHOST-pkg-config program (e.g. armv6j-ha
by ambrop7 14y ago
The "simple" code completely breaks with cross-compilation. This is because the autoconf macros will first look for the CHOST-pkg-config program (e.g. armv6j-hardfloat-linux-gnueabi-pkg-config), which will normally be a wrapper around pkg-config specifying PKG_CONFIG_SYSROOT_DIR to make pkg-config look for stuff in the target prefix instead of the host. For example, Gentoo's "crossdev" tool automatically generates such a wrapper.
So if we all just start "simplifying" the code like that, we'll end up with lots of cross-compile breakages for packages which cross compiled all right before, and I suppose many people will find the best fix to just revert to using the autoconf macros again, as opposed to hardcoding the procedure for finding the right pkg-config.