ruby-changes:62670
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Fri, 21 Aug 2020 16:12:28 +0900 (JST)
Subject: [ruby-changes:62670] 3eb76e747e (master): configure.ac: try GCC-provided ld
https://git.ruby-lang.org/ruby.git/commit/?id=3eb76e747e From 3eb76e747e33d1a4439d2e83c53b538b6c536ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= <shyouhei@r...> Date: Fri, 21 Aug 2020 16:01:46 +0900 Subject: 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. diff --git a/configure.ac b/configure.ac index 9531ac9..4848495 100644 --- a/configure.ac +++ b/configure.ac @@ -135,7 +135,7 @@ AS_CASE(["/${rb_CC} "], https://github.com/ruby/ruby/blob/trunk/configure.ac#L135 ], [*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/`]) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/