pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/llvm
Module Name: pkgsrc
Committed By: adam
Date: Sun Mar 19 19:01:48 UTC 2017
Modified Files:
pkgsrc/lang/llvm: Makefile PLIST distinfo
pkgsrc/lang/llvm/patches: patch-cmake_modules_AddLLVM.cmake
Added Files:
pkgsrc/lang/llvm/patches: patch-cmake_modules_HandleLLVMOptions.cmake
patch-tools_llvm-shlib_CMakeLists.txt
Log Message:
Create and use shared library libLLVM; fix install_name for shared object on Darwin.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/lang/llvm/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/llvm/PLIST
cvs rdiff -u -r1.6 -r1.7 pkgsrc/lang/llvm/distinfo
cvs rdiff -u -r1.2 -r1.3 \
pkgsrc/lang/llvm/patches/patch-cmake_modules_AddLLVM.cmake
cvs rdiff -u -r0 -r1.1 \
pkgsrc/lang/llvm/patches/patch-cmake_modules_HandleLLVMOptions.cmake \
pkgsrc/lang/llvm/patches/patch-tools_llvm-shlib_CMakeLists.txt
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/llvm/Makefile
diff -u pkgsrc/lang/llvm/Makefile:1.15 pkgsrc/lang/llvm/Makefile:1.16
--- pkgsrc/lang/llvm/Makefile:1.15 Fri Mar 17 22:38:17 2017
+++ pkgsrc/lang/llvm/Makefile Sun Mar 19 19:01:48 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2017/03/17 22:38:17 adam Exp $
+# $NetBSD: Makefile,v 1.16 2017/03/19 19:01:48 adam Exp $
#
# when updating this, please also update:
# devel/include-what-you-use
@@ -11,6 +11,7 @@
DISTNAME= llvm-4.0.0.src
PKGNAME= ${DISTNAME:S/.src//}
+PKGREVISION= 1
CATEGORIES= lang devel
MASTER_SITES= http://llvm.org/releases/${PKGVERSION_NOREV}/
EXTRACT_SUFX= .tar.xz
@@ -31,7 +32,10 @@ CMAKE_ARG_PATH= ${WRKSRC}
CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release
CMAKE_ARGS+= -DCMAKE_C_COMPILER=gcc
CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=g++
+CMAKE_ARGS+= -DLLVM_BUILD_LLVM_DYLIB=ON
+CMAKE_ARGS+= -DLLVM_INCLUDE_TESTS=OFF
CMAKE_ARGS+= -DLLVM_INSTALL_UTILS=ON
+CMAKE_ARGS+= -DLLVM_LINK_LLVM_DYLIB=ON
CMAKE_ARGS.Darwin+= -DCMAKE_LIBTOOL=/usr/bin/libtool
@@ -100,16 +104,6 @@ CXXFLAGS+= -std=c++11
CXXFLAGS+= -march=i586
.endif
-.if ${OPSYS} == "Darwin"
-.PHONY: fix-darwin-install-name
-post-install: fix-darwin-install-name
-fix-darwin-install-name:
-. for lib in BugpointPasses LLVMHello libLTO
- install_name_tool -id ${PREFIX}/lib/${lib}.${SOEXT} \
- ${DESTDIR}${PREFIX}/lib/${lib}.${SOEXT}
-. endfor
-.endif
-
.include "options.mk"
# replacing config.guess is required even for cmake.
Index: pkgsrc/lang/llvm/PLIST
diff -u pkgsrc/lang/llvm/PLIST:1.4 pkgsrc/lang/llvm/PLIST:1.5
--- pkgsrc/lang/llvm/PLIST:1.4 Fri Mar 17 22:38:17 2017
+++ pkgsrc/lang/llvm/PLIST Sun Mar 19 19:01:48 2017
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2017/03/17 22:38:17 adam Exp $
+@comment $NetBSD: PLIST,v 1.5 2017/03/19 19:01:48 adam Exp $
bin/FileCheck
bin/bugpoint
bin/count
@@ -1236,6 +1236,9 @@ ${PLIST.XCore}lib/libLLVMXCoreDisassembl
${PLIST.XCore}lib/libLLVMXCoreInfo.a
lib/libLLVMXRay.a
lib/libLLVMipo.a
+lib/libLLVM.${SOEXT}
+${PLIST.notdylib}lib/libLLVM-4.0.${SOEXT}
+${PLIST.notdylib}lib/libLLVM-${PKGVERSION}.${SOEXT}
lib/libLTO.${SOEXT}
${PLIST.notdylib}lib/libLTO.${SOEXT}.4
${PLIST.notdylib}lib/libLTO.${SOEXT}.${PKGVERSION}
Index: pkgsrc/lang/llvm/distinfo
diff -u pkgsrc/lang/llvm/distinfo:1.6 pkgsrc/lang/llvm/distinfo:1.7
--- pkgsrc/lang/llvm/distinfo:1.6 Fri Mar 17 22:38:17 2017
+++ pkgsrc/lang/llvm/distinfo Sun Mar 19 19:01:48 2017
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.6 2017/03/17 22:38:17 adam Exp $
+$NetBSD: distinfo,v 1.7 2017/03/19 19:01:48 adam Exp $
SHA1 (llvm-4.0.0.src.tar.xz) = aee4524e2407f9fe5afc6f70c753180b907011d0
RMD160 (llvm-4.0.0.src.tar.xz) = 468ae2502ba523b35c5e8340724ddaa50b31ccb5
SHA512 (llvm-4.0.0.src.tar.xz) = cf681f0626ef6d568d951cdc3e143471a1d7715a0ba11e52aa273cf5d8d421e1357ef2645cc85879eaefcd577e99e74d07b01566825b3d0461171ef2cbfc7704
Size (llvm-4.0.0.src.tar.xz) = 21016340 bytes
-SHA1 (patch-cmake_modules_AddLLVM.cmake) = 73725f49c7814f54f9286afe796bc2a466ee9611
+SHA1 (patch-cmake_modules_AddLLVM.cmake) = 4bfb98c5d99797155d0fb13a43352d31f6cfe783
+SHA1 (patch-cmake_modules_HandleLLVMOptions.cmake) = 271e6f5a8cebf8162c4e3b758e96f451b434269b
SHA1 (patch-include_llvm_Support_Host.h) = a4e19a72714084b211b0182c04ccc51bd606e150
+SHA1 (patch-tools_llvm-shlib_CMakeLists.txt) = 18e6ec7b8895e55ecdf93c9d4781e92052a6fcb1
Index: pkgsrc/lang/llvm/patches/patch-cmake_modules_AddLLVM.cmake
diff -u pkgsrc/lang/llvm/patches/patch-cmake_modules_AddLLVM.cmake:1.2 pkgsrc/lang/llvm/patches/patch-cmake_modules_AddLLVM.cmake:1.3
--- pkgsrc/lang/llvm/patches/patch-cmake_modules_AddLLVM.cmake:1.2 Fri Mar 17 22:38:17 2017
+++ pkgsrc/lang/llvm/patches/patch-cmake_modules_AddLLVM.cmake Sun Mar 19 19:01:48 2017
@@ -1,10 +1,11 @@
-$NetBSD: patch-cmake_modules_AddLLVM.cmake,v 1.2 2017/03/17 22:38:17 adam Exp $
+$NetBSD: patch-cmake_modules_AddLLVM.cmake,v 1.3 2017/03/19 19:01:48 adam Exp $
Don't use non-portable -z discard-unused on SunOS.
+On Darwin, use correct install-name for shared libraries.
---- cmake/modules/AddLLVM.cmake.orig 2016-02-12 17:52:29.000000000 +0000
+--- cmake/modules/AddLLVM.cmake.orig 2017-01-17 21:47:58.000000000 +0000
+++ cmake/modules/AddLLVM.cmake
-@@ -174,9 +174,6 @@ function(add_link_opts target_name)
+@@ -182,9 +182,6 @@ function(add_link_opts target_name)
# ld64's implementation of -dead_strip breaks tools that use plugins.
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-dead_strip")
@@ -14,3 +15,12 @@ Don't use non-portable -z discard-unused
elseif(NOT WIN32 AND NOT LLVM_LINKER_IS_GOLD)
# Object files are compiled with -ffunction-data-sections.
# Versions of bfd ld < 2.23.1 have a bug in --gc-sections that breaks
+@@ -1419,7 +1416,7 @@ function(llvm_setup_rpath name)
+ endif()
+
+ if (APPLE)
+- set(_install_name_dir INSTALL_NAME_DIR "@rpath")
++ set(_install_name_dir INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
+ set(_install_rpath "@loader_path/../lib" ${extra_libdir})
+ elseif(UNIX)
+ set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
Added files:
Index: pkgsrc/lang/llvm/patches/patch-cmake_modules_HandleLLVMOptions.cmake
diff -u /dev/null pkgsrc/lang/llvm/patches/patch-cmake_modules_HandleLLVMOptions.cmake:1.1
--- /dev/null Sun Mar 19 19:01:48 2017
+++ pkgsrc/lang/llvm/patches/patch-cmake_modules_HandleLLVMOptions.cmake Sun Mar 19 19:01:48 2017
@@ -0,0 +1,14 @@
+$NetBSD: patch-cmake_modules_HandleLLVMOptions.cmake,v 1.1 2017/03/19 19:01:48 adam Exp $
+
+DragonflyBSD support
+
+--- cmake/modules/HandleLLVMOptions.cmake.orig 2016-01-06 19:05:19.000000000 +0000
++++ cmake/modules/HandleLLVMOptions.cmake
+@@ -132,6 +132,7 @@ endif()
+ # Pass -Wl,-z,defs. This makes sure all symbols are defined. Otherwise a DSO
+ # build might work on ELF but fail on MachO/COFF.
+ if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR
++ ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" OR
+ ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
+ ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND
+ NOT LLVM_USE_SANITIZER)
Index: pkgsrc/lang/llvm/patches/patch-tools_llvm-shlib_CMakeLists.txt
diff -u /dev/null pkgsrc/lang/llvm/patches/patch-tools_llvm-shlib_CMakeLists.txt:1.1
--- /dev/null Sun Mar 19 19:01:48 2017
+++ pkgsrc/lang/llvm/patches/patch-tools_llvm-shlib_CMakeLists.txt Sun Mar 19 19:01:48 2017
@@ -0,0 +1,23 @@
+$NetBSD: patch-tools_llvm-shlib_CMakeLists.txt,v 1.1 2017/03/19 19:01:48 adam Exp $
+
+Use the Linux style linking everywhere except Darwin and SunOS.
+
+--- tools/llvm-shlib/CMakeLists.txt.orig 2016-05-26 04:35:35.000000000 +0000
++++ tools/llvm-shlib/CMakeLists.txt
+@@ -37,11 +37,12 @@ endif()
+ add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
+
+ list(REMOVE_DUPLICATES LIB_NAMES)
+-if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR MINGW) # 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")
++if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
+ set(LIB_NAMES -Wl,-all_load ${LIB_NAMES})
++elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
++ set(LIB_NAMES -Wl,-Bsymbolic -Wl,-z -Wl,allextract ${LIB_NAMES} -Wl,-z -Wl,defaultextract)
++else()
++ set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
+ endif()
+
+ target_link_libraries(LLVM PRIVATE ${LIB_NAMES})
Home |
Main Index |
Thread Index |
Old Index