Index: head/devel/llvm40/Makefile =================================================================== --- head/devel/llvm40/Makefile +++ head/devel/llvm40/Makefile @@ -2,7 +2,7 @@ PORTNAME= llvm DISTVERSION= 4.0.1rc1 -PORTREVISION= 4 +PORTREVISION= 1 CATEGORIES= devel lang MASTER_SITES= http://llvm.org/${PRE_}releases/${LLVM_RELEASE}/${RCDIR} PKGNAMESUFFIX= ${LLVM_SUFFIX} @@ -87,7 +87,7 @@ LIT_VARS= _USES_PYTHON=python LLD_DESC= Install lld, the LLVM linker LLD_DISTFILES= lld-${DISTVERSION}.src${EXTRACT_SUFX} -LLDB_BUILD_DEPENDS= swig:devel/swig13 +LLDB_BUILD_DEPENDS= swig3.0:devel/swig30 LLDB_DESC= Install lldb, the LLVM debugger LLDB_DISTFILES= lldb-${DISTVERSION}.src${EXTRACT_SUFX} LLDB_EXTRA_PATCHES= ${PATCHDIR}/lldb-patch-tools_lldb_source_Host_common_FileSpec.cpp @@ -320,10 +320,6 @@ ${PYTHON_PKGNAMEPREFIX}enum34>0:devel/py-enum34 .endif -.if ${PORT_OPTIONS:MLLDB} && ${PYTHON_REL} >= 3000 -BROKEN= LLDB does not build with Python 3 -.endif - post-extract-CLANG-on: ${MV} ${WRKSRC_clang} ${PATCH_WRKSRC}/tools/clang @@ -339,6 +335,10 @@ post-extract-OPENMP-on: ${MV} ${WRKSRC_openmp} ${PATCH_WRKSRC}/tools/openmp +post-patch-COMPILER_RT-on: + cd ${WRKSRC_compiler_rt} && patch < ${PATCHDIR}/compiler-rt-patch-canonical-syscalls + cd ${WRKSRC_compiler_rt} && patch < ${PATCHDIR}/compiler-rt-patch-ino64 + post-patch: ${REINPLACE_CMD} -e 's|import lit|import lit${LLVM_SUFFIX}|' \ -e 's|from lit|from lit${LLVM_SUFFIX}|' \ @@ -441,6 +441,8 @@ build-plist: ${RM} ${PLIST} ${PLIST}.tmp + ${ECHO_CMD} "@comment >>>>> GENERATED FILE, DO NOT EDIT <<<<<" >> ${PLIST}.tmp + ${ECHO_CMD} "@comment Alter build-plist target and regenerate as required" >> ${PLIST}.tmp .for command in ${COMMANDS} ${ECHO_CMD} bin/${command}%%LLVM_SUFFIX%% >> ${PLIST}.tmp .endfor @@ -456,7 +458,8 @@ -e 's|release.cmake|%%CMAKE_BUILD_TYPE%%.cmake|' \ -e 's|${LLVM_RELEASE:C/\./\\./g}|%%LLVM_RELEASE%%|' \ -e 's|${LLVM_MAJOR:C/\./\\./}|%%LLVM_MAJOR%%|' \ - -e 's|${LLVM_MAJOR:C/\.//}|%%LLVM_LIB_VER%%|' | \ + -e 's|${LLVM_MAJOR:C/\.//}|%%LLVM_LIB_VER%%|' \ + -e 's|${PYTHON_SITELIBDIR:C|${PREFIX}/||}|%%PYTHON_SITELIBDIR%%|' | \ ${SORT} >> ${PLIST}.tmp ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR}/lit${LLVM_SUFFIX} -type f | \ ${SED} -e 's|${STAGEDIR}${PYTHON_SITELIBDIR}|%%LIT%%%%PYTHON_SITELIBDIR%%|' \ Index: head/devel/llvm40/files/compiler-rt-patch-canonical-syscalls =================================================================== --- head/devel/llvm40/files/compiler-rt-patch-canonical-syscalls +++ head/devel/llvm40/files/compiler-rt-patch-canonical-syscalls @@ -0,0 +1,35 @@ +diff --git lib/sanitizer_common/sanitizer_linux.cc lib/sanitizer_common/sanitizer_linux.cc +index 7328a5c0ac1..4b59a39ee27 100644 +--- lib/sanitizer_common/sanitizer_linux.cc ++++ lib/sanitizer_common/sanitizer_linux.cc +@@ -223,7 +223,8 @@ static void kernel_stat_to_stat(struct kernel_stat *in, struct stat *out) { + + uptr internal_stat(const char *path, void *buf) { + #if SANITIZER_FREEBSD +- return internal_syscall(SYSCALL(stat), path, buf); ++ return internal_syscall(SYSCALL(fstatat), AT_FDCWD, (uptr)path, ++ (uptr)buf, 0); + #elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS + return internal_syscall(SYSCALL(newfstatat), AT_FDCWD, (uptr)path, + (uptr)buf, 0); +@@ -247,7 +248,8 @@ uptr internal_stat(const char *path, void *buf) { + + uptr internal_lstat(const char *path, void *buf) { + #if SANITIZER_FREEBSD +- return internal_syscall(SYSCALL(lstat), path, buf); ++ return internal_syscall(SYSCALL(fstatat), AT_FDCWD, (uptr)path, ++ (uptr)buf, AT_SYMLINK_NOFOLLOW); + #elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS + return internal_syscall(SYSCALL(newfstatat), AT_FDCWD, (uptr)path, + (uptr)buf, AT_SYMLINK_NOFOLLOW); +@@ -590,7 +592,9 @@ uptr internal_getppid() { + } + + uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count) { +-#if SANITIZER_USES_CANONICAL_LINUX_SYSCALLS ++#if SANITIZER_FREEBSD ++ return internal_syscall(SYSCALL(getdirentries), fd, (uptr)dirp, count, NULL); ++#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS + return internal_syscall(SYSCALL(getdents64), fd, (uptr)dirp, count); + #else + return internal_syscall(SYSCALL(getdents), fd, (uptr)dirp, count); Index: head/devel/llvm40/files/compiler-rt-patch-ino64 =================================================================== --- head/devel/llvm40/files/compiler-rt-patch-ino64 +++ head/devel/llvm40/files/compiler-rt-patch-ino64 @@ -0,0 +1,15 @@ +--- lib/sanitizer_common/sanitizer_platform_limits_posix.h.orig 2017-05-24 19:09:24.000000000 +0000 ++++ lib/sanitizer_common/sanitizer_platform_limits_posix.h 2017-05-24 20:12:47.183536000 +0000 +@@ -485,7 +485,12 @@ + }; + #elif SANITIZER_FREEBSD + struct __sanitizer_dirent { ++#if __FreeBSD_version < 1200031 + unsigned int d_fileno; ++#else ++ unsigned long long d_fileno; ++ unsigned long long d_off; ++#endif + unsigned short d_reclen; + // more fields that we don't care about + }; Index: head/devel/llvm40/pkg-plist =================================================================== --- head/devel/llvm40/pkg-plist +++ head/devel/llvm40/pkg-plist @@ -1,3 +1,5 @@ +@comment >>>>> GENERATED FILE, DO NOT EDIT <<<<< +@comment Alter build-plist target and regenerate as required bin/bugpoint%%LLVM_SUFFIX%% bin/llc%%LLVM_SUFFIX%% bin/lli%%LLVM_SUFFIX%% @@ -64,6 +66,23 @@ %%LIT%%llvm%%LLVM_SUFFIX%%/bin/llvm-lit %%LIT%%bin/FileCheck%%LLVM_SUFFIX%% %%LIT%%llvm%%LLVM_SUFFIX%%/bin/FileCheck +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/lldb/__init__.py +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/lldb/_lldb.so +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/lldb/embedded_interpreter.py +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/lldb/formatters/Logger.py +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/lldb/formatters/__init__.py +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/lldb/formatters/attrib_fromdict.py +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/lldb/formatters/cache.py +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/lldb/formatters/cpp/__init__.py +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/lldb/formatters/cpp/gnu_libstdcpp.py +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/lldb/formatters/cpp/libcxx.py +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/lldb/formatters/metrics.py +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/lldb/formatters/synth.py +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/lldb/lldb-argdumper +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/lldb/runtime/__init__.py +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/lldb/utils/__init__.py +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/lldb/utils/symbolication.py +%%LLDB%%llvm%%LLVM_LIB_VER%%/%%PYTHON_SITELIBDIR%%/six.py %%COMPILER_RT%%llvm%%LLVM_LIB_VER%%/asan_blacklist.txt llvm%%LLVM_LIB_VER%%/bin/bugpoint %%CLANG%%llvm%%LLVM_LIB_VER%%/bin/c-index-test @@ -2578,23 +2597,6 @@ %%LLDB%%llvm%%LLVM_LIB_VER%%/lib/liblldbTarget.a %%LLDB%%llvm%%LLVM_LIB_VER%%/lib/liblldbUtility.a %%OPENMP%%llvm%%LLVM_LIB_VER%%/lib/libomp.so -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/lldb/__init__.py -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/lldb/_lldb.so -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/lldb/embedded_interpreter.py -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/lldb/formatters/Logger.py -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/lldb/formatters/__init__.py -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/lldb/formatters/attrib_fromdict.py -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/lldb/formatters/cache.py -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/lldb/formatters/cpp/__init__.py -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/lldb/formatters/cpp/gnu_libstdcpp.py -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/lldb/formatters/cpp/libcxx.py -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/lldb/formatters/metrics.py -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/lldb/formatters/synth.py -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/lldb/lldb-argdumper -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/lldb/runtime/__init__.py -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/lldb/utils/__init__.py -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/lldb/utils/symbolication.py -%%LLDB%%llvm%%LLVM_LIB_VER%%/lib/python2.7/site-packages/six.py %%CLANG%%llvm%%LLVM_LIB_VER%%/libexec/c++-analyzer %%CLANG%%llvm%%LLVM_LIB_VER%%/libexec/ccc-analyzer %%CLANG%%llvm%%LLVM_LIB_VER%%/share/clang/clang-format-bbedit.applescript