From 728844136bc9d0d0e82c0394671a78aa91826c78 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 7 Sep 2014 11:02:55 +0200 Subject: [PATCH] llvm: add patch from upstream to fix build on linux with --enable-shared. See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140616/222509.html --- .../patches/enable-shared-build-fix.patch | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 srcpkgs/llvm/patches/enable-shared-build-fix.patch diff --git a/srcpkgs/llvm/patches/enable-shared-build-fix.patch b/srcpkgs/llvm/patches/enable-shared-build-fix.patch new file mode 100644 index 00000000000..084f7165d9f --- /dev/null +++ b/srcpkgs/llvm/patches/enable-shared-build-fix.patch @@ -0,0 +1,26 @@ +diff --git a/include/llvm/IR/LegacyPassNameParser.h b/include/llvm/IR/LegacyPassNameParser.h +index e2e4912..a07e3fd 100644 +--- include/llvm/IR/LegacyPassNameParser.h ++++ include/llvm/IR/LegacyPassNameParser.h +@@ -95,6 +95,8 @@ private: + } + }; + ++EXTERN_TEMPLATE_INSTANTIATION(class cl::parser); ++ + ///===----------------------------------------------------------------------===// + /// 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 +--- lib/IR/Pass.cpp ++++ lib/IR/Pass.cpp +@@ -234,6 +234,8 @@ PassNameParser::~PassNameParser() { + // attempting to remove the registration listener is an error. + } + ++TEMPLATE_INSTANTIATION(class cl::parser); ++ + //===----------------------------------------------------------------------===// + // AnalysisUsage Class Implementation + //