diff options
author | Travis Tilley <ttilley@gmail.com> | 2015-05-21 12:41:30 -0400 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-05-22 13:09:01 +0000 |
commit | 81d1b43c5af39e14cb91232c4afcb7839b96f5a1 (patch) | |
tree | 01d279a6a2c6859074d4b3045f851c2e36de13db /main/llvm/llvm-0001-fix-shared-build.patch | |
parent | 386a214b3a1b7586e4d37b94ae84d6830e159f52 (diff) | |
download | aports-81d1b43c5af39e14cb91232c4afcb7839b96f5a1.tar.bz2 aports-81d1b43c5af39e14cb91232c4afcb7839b96f5a1.tar.xz |
main/llvm: update patchset, switch to cmake, perform two-stage build with a minimal bootstrap compile of clang, add clang extras, update package list to split out clang documentation
Diffstat (limited to 'main/llvm/llvm-0001-fix-shared-build.patch')
-rw-r--r-- | main/llvm/llvm-0001-fix-shared-build.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/main/llvm/llvm-0001-fix-shared-build.patch b/main/llvm/llvm-0001-fix-shared-build.patch new file mode 100644 index 0000000000..ceeda806d7 --- /dev/null +++ b/main/llvm/llvm-0001-fix-shared-build.patch @@ -0,0 +1,49 @@ +From 0d03d2ea17b66d8cb0f6ca5f2181237228535845 Mon Sep 17 00:00:00 2001 +From: Sanjoy Das <sanjoy at azulsystems.com> +Date: Thu Jun 19 15:38:02 2014 -0700 +Subject: [PATCH 1/3] Fix the --enable-shared build. + +Currently a build configured with ./configure --enable-shared breaks +with an undefined "llvm::cl::parser<llvm::PassInfo +const*>::getOption(unsigned int) const" symbol when linking opt. This +body for this symbol gets emitted into Pass.o (along with the destructor +for PassNameParser), but gets linked into libLLVM-3.5svn.so with local +visibility, causing the link error. + +This fix uses the existing EXTERN_TEMPLATE machinery to force a globally +visible definition for the functions in parser<const PassInfo *> into +Pass.o. +--- + include/llvm/IR/LegacyPassNameParser.h | 2 ++ + lib/IR/Pass.cpp | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/include/llvm/IR/LegacyPassNameParser.h b/include/llvm/IR/LegacyPassNameParser.h +index e2e4912..a07e3fd 100644 +--- a/include/llvm/IR/LegacyPassNameParser.h ++++ b/include/llvm/IR/LegacyPassNameParser.h +@@ -95,6 +95,8 @@ private: + } + }; + ++EXTERN_TEMPLATE_INSTANTIATION(class cl::parser<const PassInfo *>); ++ + ///===----------------------------------------------------------------------===// + /// FilteredPassNameParser class - Make use of the pass registration + /// mechanism to automatically add a command line argument to opt for +diff --git a/lib/IR/Pass.cpp b/lib/IR/Pass.cpp +index 91d86ae..00ce223 100644 +--- a/lib/IR/Pass.cpp ++++ b/lib/IR/Pass.cpp +@@ -234,6 +234,8 @@ PassNameParser::~PassNameParser() { + // attempting to remove the registration listener is an error. + } + ++TEMPLATE_INSTANTIATION(class cl::parser<const PassInfo *>); ++ + //===----------------------------------------------------------------------===// + // AnalysisUsage Class Implementation + // +-- +2.1.4 + |