After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 671515 - Use of AC_PATH_PROG(NM, ...) in configure.ac hinders cross compilation
Use of AC_PATH_PROG(NM, ...) in configure.ac hinders cross compilation
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-03-07 01:41 UTC by James Limbouris
Modified: 2014-07-20 06:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description James Limbouris 2012-03-07 01:41:00 UTC
Use of AC_PATH_PROG() to configure 'nm' in particular does not play nicely with cross compiling distributions. AC_PATH_PROG is not cross compilation aware, and needs to be manually patched out when the host's native tools either do not support the cross compiled object files, or cannot determine their type uniquely.

Switching to AC_CHECK_TOOLS() for the 'nm' check will automatically check for the correct tool when cross compiling, and will not change the behavior otherwise. 

For instance, ./configure --host=arm-linux-gnu --build=x86_64-linux-gnu will generate code checking for arm-linux-gnu-nm, rather than just nm.

A suggested substitution (used in Openembedded Core) is AC_CHECK_TOOLS(NM, [$NM nm], nm), rather than AC_PATH_PROG(NM, nm, nm).