aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2016-11-16 07:28:23 +0800
committerbrooks <brooks@FreeBSD.org>2016-11-16 07:28:23 +0800
commitff6a3787c123ac187868c376c0a737c03541b1b3 (patch)
treece6103375098972d3cb4559716278c84ff1f46ce /devel
parent69467c51c7fa9b8f8acb2a8f92c6199c96d60175 (diff)
downloadfreebsd-ports-gnome-ff6a3787c123ac187868c376c0a737c03541b1b3.tar.gz
freebsd-ports-gnome-ff6a3787c123ac187868c376c0a737c03541b1b3.tar.zst
freebsd-ports-gnome-ff6a3787c123ac187868c376c0a737c03541b1b3.zip
Build shared libraries.
PR: 214549 Submitted by: kwm
Diffstat (limited to 'devel')
-rw-r--r--devel/llvm39/Makefile4
-rw-r--r--devel/llvm39/files/patch-tools_llvm-shlib_CMakeLists.txt13
-rw-r--r--devel/llvm39/pkg-plist3
3 files changed, 18 insertions, 2 deletions
diff --git a/devel/llvm39/Makefile b/devel/llvm39/Makefile
index b9b42ce805b7..30ef039d8b68 100644
--- a/devel/llvm39/Makefile
+++ b/devel/llvm39/Makefile
@@ -2,7 +2,7 @@
PORTNAME= llvm
DISTVERSION= 3.9.0
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/${PRE_}releases/${LLVM_RELEASE}/${RCDIR}
DISTNAME= ${PORTNAME}-${DISTVERSION}.src
@@ -38,7 +38,7 @@ SUB_FILES= llvm-wrapper.sh
SUB_LIST= LLVM_PREFIX="${LLVM_PREFIX}" LLVM_SUFFIX="${LLVM_SUFFIX}"
CMAKE_INSTALL_PREFIX= ${LLVM_PREFIX}
-CMAKE_ARGS=
+CMAKE_ARGS= -DLLVM_BUILD_LLVM_DYLIB=ON
OPTIONS_DEFINE= CLANG DOCS EXTRAS LIT LLD LLDB
OPTIONS_DEFINE_amd64= COMPILER_RT GOLD OPENMP
diff --git a/devel/llvm39/files/patch-tools_llvm-shlib_CMakeLists.txt b/devel/llvm39/files/patch-tools_llvm-shlib_CMakeLists.txt
new file mode 100644
index 000000000000..6695770c2c79
--- /dev/null
+++ b/devel/llvm39/files/patch-tools_llvm-shlib_CMakeLists.txt
@@ -0,0 +1,13 @@
+Otherwise we end up with a 4k library without any symbols.
+
+--- tools/llvm-shlib/CMakeLists.txt.orig 2016-05-26 06:35:35.000000000 +0200
++++ tools/llvm-shlib/CMakeLists.txt 2016-11-15 17:07:29.937965000 +0100
+@@ -39,7 +39,7 @@
+ add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
+
+ list(REMOVE_DUPLICATES LIB_NAMES)
+-if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") # FIXME: It should be "GNU ld for elf"
++if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")) # FIXME: It should be "GNU ld for elf"
+ # GNU ld doesn't resolve symbols in the version script.
+ set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
+ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
diff --git a/devel/llvm39/pkg-plist b/devel/llvm39/pkg-plist
index 4add4535feda..0af5f96e84f2 100644
--- a/devel/llvm39/pkg-plist
+++ b/devel/llvm39/pkg-plist
@@ -2180,6 +2180,9 @@ llvm39/lib/cmake/llvm/LLVMInstallSymlink.cmake
llvm39/lib/cmake/llvm/LLVMProcessSources.cmake
llvm39/lib/cmake/llvm/TableGen.cmake
llvm39/lib/cmake/llvm/VersionFromVCS.cmake
+llvm39/lib/libLLVM-%%LLVM_MAJOR%%.so
+llvm39/lib/libLLVM-%%LLVM_RELEASE%%.so
+llvm39/lib/libLLVM.so
llvm39/lib/libLLVMAArch64AsmParser.a
llvm39/lib/libLLVMAArch64AsmPrinter.a
llvm39/lib/libLLVMAArch64CodeGen.a