diff options
author | Dima Panov <fluffy@FreeBSD.org> | 2012-06-26 10:13:38 +0000 |
---|---|---|
committer | Dima Panov <fluffy@FreeBSD.org> | 2012-06-26 10:13:38 +0000 |
commit | 29b3026f4a8cf6382cc00f8dac6182afbe92c42c (patch) | |
tree | 1d256fe6e8e9bc4457f1f6d7650ae1298d0b4713 /lang/clay | |
parent | - Unbreak with LLVM 3.1 (diff) |
- Adopt patch from git repo to fix fuild with LLVM 3.1
Notes
Notes:
svn path=/head/; revision=299998
Diffstat (limited to 'lang/clay')
-rw-r--r-- | lang/clay/Makefile | 1 | ||||
-rw-r--r-- | lang/clay/files/patch-git9ee1902 | 88 |
2 files changed, 89 insertions, 0 deletions
diff --git a/lang/clay/Makefile b/lang/clay/Makefile index b2e3be6d91e7..5682b7b40ae5 100644 --- a/lang/clay/Makefile +++ b/lang/clay/Makefile @@ -7,6 +7,7 @@ PORTNAME= clay PORTVERSION= 0.1.1 +PORTREVISION= 1 CATEGORIES= lang MASTER_SITES= https://github.com/jckarter/${PORTNAME}/tarball/v${PORTVERSION}/ DISTNAME= jckarter-${PORTNAME}-v${PORTVERSION}-0-g${GITVERSION} diff --git a/lang/clay/files/patch-git9ee1902 b/lang/clay/files/patch-git9ee1902 new file mode 100644 index 000000000000..b1b9059b8134 --- /dev/null +++ b/lang/clay/files/patch-git9ee1902 @@ -0,0 +1,88 @@ +diff --git ./CMakeLists.txt ./CMakeLists.txt +index fce24ac..dabedff 100644 +--- ./CMakeLists.txt ++++ ./CMakeLists.txt +@@ -23,8 +23,8 @@ if(UNIX) + OUTPUT_VARIABLE LLVM_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +- if(NOT ${LLVM_VERSION} STREQUAL "3.0") +- message(FATAL_ERROR "Clay requires LLVM 3.0.") ++ if(NOT ${LLVM_VERSION} STREQUAL "3.1") ++ message(FATAL_ERROR "Clay requires LLVM 3.1.") + endif() + + execute_process( +diff --git ./compiler/src/codegen.cpp ./compiler/src/codegen.cpp +index fb66668..59055b9 100644 +--- ./compiler/src/codegen.cpp ++++ ./compiler/src/codegen.cpp +@@ -956,9 +956,7 @@ + case STRING_LITERAL : { + StringLiteral *x = (StringLiteral *)expr.ptr(); + llvm::Constant *initializer = +- llvm::ConstantArray::get(llvm::getGlobalContext(), +- x->value, +- true); ++ llvm::ConstantDataArray::getString(llvm::getGlobalContext(), x->value, true); + TypePtr type = arrayType(int8Type, x->value.size() + 1); + ostringstream symbolName; + symbolName << "StringConstant " << x->value << " clay"; +@@ -2775,7 +2773,7 @@ + + if(!llvm::ParseAssembly(buf, llvmModule, err, + llvm::getGlobalContext())) { +- err.Print("\n", out); ++ err.print("\n", out); + std::cerr << out.str() << std::endl; + error("llvm assembly parse error"); + } +@@ -6151,7 +6149,7 @@ + llvm::getGlobalContext())) { + string errBuf; + llvm::raw_string_ostream errOut(errBuf); +- err.Print("\n", errOut); ++ err.print("\n", errOut); + std::cerr << errOut.str() << std::endl; + error("llvm assembly parse error"); + } +@@ -6459,7 +6457,7 @@ + llvm::CodeModel::Model codeModel = llvm::CodeModel::Default; + + llvm::TargetMachine *targetMachine = target->createTargetMachine( +- targetTriple, "", "", reloc, codeModel); ++ targetTriple, "", "", llvm::TargetOptions(), reloc, codeModel); + + if (targetMachine != NULL) { + llvmTargetData = targetMachine->getTargetData(); +diff --git ./compiler/src/main.cpp ./compiler/src/main.cpp +index 9e73160..85941b9 100644 +--- ./compiler/src/main.cpp ++++ ./compiler/src/main.cpp +@@ -119,7 +119,7 @@ static void generateAssembly(llvm::Module *module, + bool debug) + { + if (optLevel < 2 || debug) +- llvm::NoFramePointerElim = true; ++ targetMachine->Options.NoFramePointerElim = 1; + + llvm::FunctionPassManager fpasses(module); + +@@ -366,7 +366,7 @@ int main2(int argc, char **argv, char const* const* envp) { + + string clayFile; + string outputFile; +- string targetTriple = llvm::sys::getHostTriple(); ++ string targetTriple = llvm::sys::getDefaultTargetTriple(); + + string clayScriptImports; + string clayScript; +@@ -553,7 +553,7 @@ int main2(int argc, char **argv, char const* const* envp) { + llvm::errs() << "error: target name missing after -target\n"; + return 1; + } +- crossCompiling = targetTriple != llvm::sys::getHostTriple(); ++ crossCompiling = targetTriple != llvm::sys::getDefaultTargetTriple(); + } + else if (strstr(argv[i], "-Wl") == argv[i]) { + linkerFlags += argv[i] + strlen("-Wl"); |