зеркало из https://github.com/github/ruby.git
disable ccache if $CC is in /usr/lib/ccache/$CC.
MJIT with ccache has a problem on docker environment, so we need to use original CC (/usr/bin/gcc, for example). Ubuntu system provides /usr/lib/ccache/gcc and so on to use gcc with ccache. It is easy to setup ccache by adding /usr/lib/ccache to $PATH. However we need to use /usr/bin/gcc (and so on) for MJIT_CC. We can specify MJIT_CC option at configure, but specifying them is troublesome. This patch choose original $CC (/usr/bin/gcc, for example) if $CC is /usr/lib/ccache/$CC.
This commit is contained in:
Родитель
b884eb59eb
Коммит
27fae1d4ad
|
@ -274,6 +274,11 @@ AC_SUBST(CSRCFLAG)
|
||||||
: ${MJIT_CC=$CC}
|
: ${MJIT_CC=$CC}
|
||||||
AS_IF([test "x$cross_compiling" = xno], [
|
AS_IF([test "x$cross_compiling" = xno], [
|
||||||
AC_PATH_PROG([MJIT_CC], ${MJIT_CC})
|
AC_PATH_PROG([MJIT_CC], ${MJIT_CC})
|
||||||
|
|
||||||
|
# if $CC is in /usr/lib/ccache/$CC, search original $CC (disable ccache)
|
||||||
|
AS_IF([echo $MJIT_CC | grep ^/usr/lib/ccache > /dev/null], [
|
||||||
|
PATH=`echo $PATH | sed "s/\/usr\/lib\/ccache://"` MJIT_CC=`which $CC`])
|
||||||
|
|
||||||
AS_CASE([$target_os],
|
AS_CASE([$target_os],
|
||||||
[*mingw*], [command -v cygpath > /dev/null && MJIT_CC=`cygpath -ma $MJIT_CC`])
|
[*mingw*], [command -v cygpath > /dev/null && MJIT_CC=`cygpath -ma $MJIT_CC`])
|
||||||
shift 2
|
shift 2
|
||||||
|
|
Загрузка…
Ссылка в новой задаче