From a69251864b378a7baebac60c82ec56d4b03129ae Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 18 Apr 2019 23:04:33 +0900 Subject: [PATCH] Fix mruby build error mruby minirake does not like CXX="clang++-7 -std=c++14" because it expects CXX to be an executable. To workaround this, split CXX so that CXX becomes a single word and move the rest of words to CXXFLAGS. --- third-party/Makefile.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/third-party/Makefile.am b/third-party/Makefile.am index ebc49458..61b03b11 100644 --- a/third-party/Makefile.am +++ b/third-party/Makefile.am @@ -49,8 +49,9 @@ mruby: MRUBY_CONFIG="${srcdir}/build_config.rb" \ BUILD_DIR="${abs_builddir}/mruby/build" \ INSTALL_DIR="${abs_builddir}/mruby/build/install/bin" \ - CC="${CC}" CXX="${CXX}" LD="${LD}" \ - CFLAGS="${CPPFLAGS} ${CFLAGS}" CXXFLAGS="${CPPFLAGS} ${CXXFLAGS}" \ + CC="${CC}" CXX="$(firstword $(CXX))" LD="${LD}" \ + CFLAGS="${CPPFLAGS} ${CFLAGS}" \ + CXXFLAGS="$(wordlist 2, $(words $(CXX)), $(CXX)) ${CPPFLAGS} ${CXXFLAGS}" \ LDFLAGS="${LDFLAGS}" \ "${srcdir}/mruby/minirake" -f "${srcdir}/mruby/Rakefile"