ruby-changes:62815
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Thu, 3 Sep 2020 15:14:29 +0900 (JST)
Subject: [ruby-changes:62815] 50b18e8129 (master): configuRe: detect that there is no g++
https://git.ruby-lang.org/ruby.git/commit/?id=50b18e8129 From 50b18e81295ad2d45975e4d8ea1e0c7e85140b97 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: Thu, 3 Sep 2020 15:06:56 +0900 Subject: configure: detect that there is no g++ AC_PROG_CXX checks for several C++ compilers INCLUDING g++. When none of them were found it sets the CXX variable to be g++. This doesn't make any sense. Absense of g++ has already been made sure. Because we don't want insanity (that's the whole reason we test the environment using autoconf), we need to swipe such insane variable out. diff --git a/configure.ac b/configure.ac index e4a7542..cbfce07 100644 --- a/configure.ac +++ b/configure.ac @@ -197,6 +197,14 @@ AC_CHECK_TOOLS([STRIP], [gstrip strip], [:]) https://github.com/ruby/ruby/blob/trunk/configure.ac#L197 AS_IF([test ! $rb_test_CFLAGS], [AS_UNSET(CFLAGS)]); AS_UNSET(rb_test_CFLAGS) AS_IF([test ! $rb_test_CXXFLAGS], [AS_UNSET(CXXFLAGS)]); AS_UNSET(rb_save_CXXFLAGS) +AS_IF([test "${CXX}" = "g++" -a -z "${GXX}"], [ + # AC_PROG_CXX sets $CXX to "g++" when it purposefully finds that there is + # _no_ g++. This brain-damaged design must be worked around. Thankfully, + # similar thing doesn't happen for AC_PROG_CC. + AC_MSG_NOTICE([C++ features disabled due to lack of a C++ compiler.]) + AS_UNSET(CXX) +]) + test x"$target_alias" = x && target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'` ac_install_sh='' # unusable for extension libraries. -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/