Files
MINGW-packages/mingw-w64-cling-git/0002-Invoke-bash-when-looking-for-gcc-includes.patch
2015-02-23 14:27:12 +00:00

30 lines
1.0 KiB
Diff

From 3799f58fabd8236a6f6042a04a457c69b47c0e16 Mon Sep 17 00:00:00 2001
From: Martell Malone <martellmalone@gmail.com>
Date: Sun, 22 Feb 2015 19:36:04 +0000
Subject: [PATCH] Invoke bash when looking for gcc includes
---
lib/Interpreter/CIFactory.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/Interpreter/CIFactory.cpp b/lib/Interpreter/CIFactory.cpp
index 4b5b6fa..d7951b5 100644
--- a/lib/Interpreter/CIFactory.cpp
+++ b/lib/Interpreter/CIFactory.cpp
@@ -411,10 +411,10 @@ namespace {
}
#else // _MSC_VER
static const char *CppInclQuery =
- "echo | LC_ALL=C " LLVM_CXX " -xc++ -E -v - 2>&1 >/dev/null "
+ "bash -c \"echo | LC_ALL=C " LLVM_CXX " -xc++ -E -v - 2>&1 >/dev/null "
"| awk '/^#include </,/^End of search"
"/{if (!/^#include </ && !/^End of search/){ print }}' "
- "| grep -E \"(c|g)\\+\\+\"";
+ "| grep -E '(c|g)\\+\\+'\"";
if (FILE *pf = ::popen(CppInclQuery, "r")) {
HostCXXI.push_back("-nostdinc++");
--
2.3.0