ruby-changes:52485
From: nobu <ko1@a...>
Date: Wed, 12 Sep 2018 16:02:06 +0900 (JST)
Subject: [ruby-changes:52485] nobu:r64694 (trunk): deduce versioned tools from CC
nobu 2018-09-12 16:01:59 +0900 (Wed, 12 Sep 2018) New Revision: 64694 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64694 Log: deduce versioned tools from CC Modified files: trunk/.travis.yml trunk/configure.ac Index: .travis.yml =================================================================== --- .travis.yml (revision 64693) +++ .travis.yml (revision 64694) @@ -33,8 +33,6 @@ matrix: https://github.com/ruby/ruby/blob/trunk/.travis.yml#L33 - ubuntu-toolchain-r-test packages: - gcc-8 - env: - - CC=gcc-8 AR=gcc-ar-8 NM=gcc-nm-8 RANLIB=gcc-ranlib-8 - os: linux language: ruby rvm: 2.3 Index: configure.ac =================================================================== --- configure.ac (revision 64693) +++ configure.ac (revision 64694) @@ -193,6 +193,14 @@ AS_IF([test x"${build}" != x"${host}"], https://github.com/ruby/ruby/blob/trunk/configure.ac#L193 ]) AC_PROG_CC +AS_CASE([$CC], +[gcc-*], [ + gcc_prefix=gcc- gcc_suffix=`echo "$CC" | sed 's/^gcc//'` + AC_PROG_CXX(g++${gcc_suffix})], +[clang-*], [ + gcc_prefix=clang- gcc_suffix=`echo "$CC" | sed 's/^gcc//'` + AC_PROG_CXX(clang++${gcc_suffix})], +[gcc_prefix= gcc_suffix=]) dnl Select the appropriate C++ compiler in OS X AS_CASE(["$build_os"], @@ -266,8 +274,8 @@ if libtool 2>&1 | grep no_warning_for_no https://github.com/ruby/ruby/blob/trunk/configure.ac#L274 rb_cv_arflags='-no_warning_for_no_symbols -o' fi ]) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(AR, ar) +AC_CHECK_TOOLS(RANLIB, [${gcc_prefix}ranlib${gcc_suffix} ranlib], :) +AC_CHECK_TOOLS(AR, [${gcc_prefix}ar${gcc_suffix} ar]) AS_IF([test -z "$AR"], [ AC_CHECK_PROGS(AR, aal, ar) ]) @@ -316,7 +324,7 @@ AS_CASE(["$target_os"], https://github.com/ruby/ruby/blob/trunk/configure.ac#L324 ], [aix*], [AC_CHECK_TOOL(NM, nm, /usr/ccs/bin/nm, /usr/ccs/bin:$PATH)], [hiuxmpp*], [AC_DEFINE(__HIUX_MPP__)]) # by TOYODA Eizi <toyoda@n...> -AC_CHECK_TOOL(NM, nm) +AC_CHECK_TOOLS(NM, [${gcc_prefix}nm${gcc_suffix} nm]) AC_PROG_LN_S AC_PROG_MAKE_SET -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/