https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67728

--- Comment #2 from Brett Neumeier <bneumeier at gmail dot com> ---
Thanks for your swift comment!

I disagree that the bug is in ISL.  The problem is that gmp, although the build
appears successful, is *not* correctly built.  Six object files that should be
compiled and linked into gmplib.a are not built because they are only built
correctly when assembly is enabled. One of those is invert_limb.o, which
contains the symbol __gmpn_invert_limb, which is needed by ISL.

So the *bug* is in the GMP build, but the *consequence* of the bug is that ISL
cannot be linked.

I agree that my patch is not adequate, though -- I just tested and found that I
couldn't build an x86_64-to-arm cross-gcc when my patch is installed. The
configure for GMP crashes with:

configure: error: --target is not appropriate for GMP
Use --build=CPU-VENDOR-OS if you need to specify your CPU and/or system
explicitly.  Use --host if cross-compiling (see "Installing GMP" in the
manual for more on this).

Obviously the best way to address this situation is by getting GMP to build
properly for all architectures regardless of whether assembly is enabled. Until
or unless that's done, though, it seems like it would be worthwhile to do
*something* to address the issue on the GCC side, since that's where I (and
others, according to google) have tripped over it. Maybe a documentation
change, to say that GMP shouldn't be built in-tree when cross-compiling GCC? Or
something of that sort?

Reply via email to