1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

configure.ac: try GCC-provided ld

In case of cross-compilation, GCC might provide its own linker.  Its
behaviour seems slightly different from that of gcc(1).  This is not a
big deal for normal situations, but the difference can cause libtool to
go mad.

We ship bundled libffi for windows users, and libffi uses libtool.  If
we use cross-compiler version of gcc instead of its ld conterpart, we
fail to compile fiddle.  That should not be what we want.
This commit is contained in:
卜部昌平 2020-08-21 16:01:46 +09:00
parent 73b6bc5790
commit 3eb76e747e

View file

@ -135,7 +135,7 @@ AS_CASE(["/${rb_CC} "],
],
[*gcc*], [
# Dito for GCC.
: ${LD:="${CC}"}
AC_CHECK_TOOL([LD], [`echo "${rb_CC}" | sed s/gcc/ld/`])
AC_CHECK_TOOL([AR], [`echo "${rb_CC}" | sed s/gcc/gcc-ar/`])
AC_CHECK_TOOL([CXX], [`echo "${rb_CC}" | sed s/gcc/g++/`])
AC_CHECK_TOOL([NM], [`echo "${rb_CC}" | sed s/gcc/gcc-nm/`])