URL: <http://savannah.gnu.org/support/?108405>
Summary: False negative for $cross_compiling when cross-compiling on Linux for Windows. Project: Autoconf Submitted by: jehan_zemarmot Submitted on: Wed 02 Oct 2013 06:27:00 AM GMT Category: None Priority: 5 - Normal Severity: 3 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Operating System: GNU/Linux _______________________________________________________ Details: If --host is set, and --build is not set, the current autoconf would make a test program run and if it succeeds, it considers we are not cross-compiling. Well this fails on a Linux mint with Wine installed by default (and probably Ubuntu, and likely even any Debian and derivative). Indeed by default, Wine would automatically handle any Windows executable (without the user even asking explicitly). I have done the test by copying the conftest.exe generated by autoconf and running "./conftest.exe", and... it succeeds without an error and with $? = 0. The workaround to this right now is to run as a super-user: $ update-binfmts --disable wine Or else to specify both --host and --build in the ./configure line, but I find this being really inconvenient, whereas config.guess works awesomely well to do this job. And this is just a relics from the past, in my opinion. Anyway I believe Debian and derivative are quite common nowadays, and this makes this false negative $cross_compiling quite annoying. Of course it could be argued that if Wine were able to perform all the tests, this is all just good. But actually Wine often fails to perform more complicated tests (for instance I discovered this issue when compiling GTK+, and it passed the basic cross-compiling test, but not the bigger glib-test), and also the value of $cross_compiling is often tested for other usage in projects' configure.ac and Makefile.am (for instance in GTK+, once again). So I propose the attached patch. Basically if --host is set, but not --build, once the the finale $host and $build values are set, processed and modified by config.guess and config.sub, we check if there are any different, and we don't make the run test in this specific case because its result may not be relevant to tell whether we are really cross-compiling. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Wed 02 Oct 2013 06:27:00 AM GMT Name: 0001-cross-compiling-handling-modern-platforms-able-to-ru.patch Size: 2kB By: jehan_zemarmot <http://savannah.gnu.org/support/download.php?file_id=29281> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/support/?108405> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/