ruby-changes:53361
From: nobu <ko1@a...>
Date: Tue, 6 Nov 2018 21:09:02 +0900 (JST)
Subject: [ruby-changes:53361] nobu:r65577 (trunk): Expand MJIT_CC in configure
nobu 2018-11-06 21:08:54 +0900 (Tue, 06 Nov 2018) New Revision: 65577 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65577 Log: Expand MJIT_CC in configure Modified files: trunk/Makefile.in trunk/configure.ac Index: Makefile.in =================================================================== --- Makefile.in (revision 65576) +++ Makefile.in (revision 65577) @@ -598,11 +598,6 @@ mjit_config.h: https://github.com/ruby/ruby/blob/trunk/Makefile.in#L598 esac; \ done; \ }; \ - mjit_cc="$(MJIT_CC)"; \ - if [ "$(CROSS_COMPILING)" = no ]; then \ - mjit_cc="`command -v $$mjit_cc`"; \ - case $(arch) in *-mingw*) mjit_cc="`cygpath -m $$mjit_cc`";; esac; \ - fi; \ test "$(Q)" = @ || set -x; \ archs="$(UNIVERSAL_ARCHNAMES)"; \ arch_flag=""; \ @@ -615,7 +610,7 @@ mjit_config.h: https://github.com/ruby/ruby/blob/trunk/Makefile.in#L610 quote MJIT_BUILD_DIR "`$(CHDIR) . && pwd`"; \ quote MJIT_MIN_HEADER_NAME "/$(MJIT_HEADER_INSTALL_DIR)/$(MJIT_MIN_HEADER_NAME)"; \ sep=,; \ - quote "MJIT_CC_COMMON " "$${mjit_cc}"; \ + quote "MJIT_CC_COMMON " $(MJIT_CC); \ quote "MJIT_CFLAGS $${need_mjit_archflag:+ MJIT_ARCHFLAG}" $(MJIT_CFLAGS); \ quote "MJIT_OPTFLAGS " $(MJIT_OPTFLAGS); \ quote "MJIT_DEBUGFLAGS " $(MJIT_DEBUGFLAGS); \ Index: configure.ac =================================================================== --- configure.ac (revision 65576) +++ configure.ac (revision 65577) @@ -252,6 +252,15 @@ AC_SUBST(OUTFLAG) https://github.com/ruby/ruby/blob/trunk/configure.ac#L252 AC_SUBST(COUTFLAG) AC_SUBST(CSRCFLAG) +: ${MJIT_CC=$CC} +AS_IF([test "x$cross_compiling" = xno], [ + AC_PATH_PROG([MJIT_CC], ${MJIT_CC-$CC}) + AS_CASE([$build_os:$host_os], + [*mingw*:*cygwin*], [MJIT_CC=`cygpath -ma $MJIT_CC`]) + shift 2 + MJIT_CC="$MJIT_CC${1+ }$*" +]) + AS_CASE(["$build_os"], [darwin1*.*], [ # Xcode linker warns for deprecated architecture and wrongly @@ -260,7 +269,6 @@ AS_CASE(["$build_os"], https://github.com/ruby/ruby/blob/trunk/configure.ac#L269 echo 'int main(void) {return 0;}' > conftest.c AS_IF([$CC -framework Foundation -o conftest conftest.c 2>&1 | grep '^ld: warning: text-based stub file' >/dev/null], [ - : ${MJIT_CC="$CC"} CC_WRAPPER=`cd -P "$srcdir/tool" && pwd`/darwin-cc CC="$CC_WRAPPER $CC" ]) @@ -2538,7 +2546,7 @@ AC_SUBST(DLDFLAGS)dnl https://github.com/ruby/ruby/blob/trunk/configure.ac#L2546 AC_SUBST(ARCH_FLAG)dnl AC_SUBST(MJIT_HEADER_FLAGS)dnl AC_SUBST(MJIT_HEADER_INSTALL_DIR)dnl -AC_SUBST(MJIT_CC, [${MJIT_CC-'$(CC)'}])dnl +AC_SUBST(MJIT_CC)dnl AC_SUBST(MJIT_CFLAGS, [${MJIT_CFLAGS-"-w ${orig_cflags}"}])dnl AC_SUBST(MJIT_OPTFLAGS, [${MJIT_OPTFLAGS-'$(optflags)'}])dnl AC_SUBST(MJIT_DEBUGFLAGS, [${MJIT_DEBUGFLAGS-'$(debugflags)'}])dnl -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/