pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

compiler-rt-netbsd: Install compiler-rt files into subdir of clang



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Wed Jun 21 17:48:56 2017 +0200
Changeset:	bc369097ecf993571f0b676263c0d2267369b000

Modified Files:
	compiler-rt-netbsd/Makefile
	compiler-rt-netbsd/PLIST

Log Message:
compiler-rt-netbsd: Install compiler-rt files into subdir of clang

This is required to get clang find the files out-of-the box.

Tested on NetBSD.

This command:
/usr/pkg/bin/clang -fno-omit-frame-pointer -O0 -g -ggdb -U_FORTIFY_SOURCE -fsanitize=address -lasan test.c

Started to find the libraries and print new kind of errors, this time about
unrecognized symbols. For example:

/usr/pkg/lib/clang/5.0.0/lib/netbsd8.99/libclang_rt.asan-x86_64.a(asan_allocator.cc.o): In function `__sanitizer::SizeClassAllocator64<__asan::AP64>::PrintStats()':
/tmp/pkgsrc-tmp/wip/compiler-rt-netbsd/work/compiler-rt/lib/asan/../sanitizer_common/sanitizer_allocator_primary64.h:254: undefined reference to `__sanitizer::GetMemoryProfile(void (*)(unsigned long, unsigned long, bool, unsigned long*, unsigned long), unsigned long*, unsigned long)'
/usr/pkg/lib/clang/5.0.0/lib/netbsd8.99/libclang_rt.asan-x86_64.a(asan_interceptors.cc.o): In function `ioctl_common_pre':
/tmp/pkgsrc-tmp/wip/compiler-rt-netbsd/work/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors_ioctl.inc:584: undefined reference to `__sanitizer::IOCTL_SIOCGIFCONF'
/usr/pkg/lib/clang/5.0.0/lib/netbsd8.99/libclang_rt.asan-x86_64.a(asan_interceptors.cc.o): In function `ioctl_common_post':
/tmp/pkgsrc-tmp/wip/compiler-rt-netbsd/work/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors_ioctl.inc:600: undefined reference to `__sanitizer::IOCTL_SIOCGIFCONF'
/usr/pkg/lib/clang/5.0.0/lib/netbsd8.99/libclang_rt.asan-x86_64.a(asan_interceptors.cc.o): In function `__interceptor_getitimer':
/tmp/pkgsrc-tmp/wip/compiler-rt-netbsd/work/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:2028: undefined reference to `__sanitizer::struct_itimerval_sz'
/usr/pkg/lib/clang/5.0.0/lib/netbsd8.99/libclang_rt.asan-x86_64.a(asan_interceptors.cc.o): In function `__interceptor_setitimer':
/tmp/pkgsrc-tmp/wip/compiler-rt-netbsd/work/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:2036: undefined reference to `__sanitizer::struct_itimerval_sz'
/tmp/pkgsrc-tmp/wip/compiler-rt-netbsd/work/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:2042: undefined reference to `__sanitizer::struct_itimerval_sz'

Sponsored by <The NetBSD Foundation>

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=bc369097ecf993571f0b676263c0d2267369b000

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 compiler-rt-netbsd/Makefile |   5 +++
 compiler-rt-netbsd/PLIST    | 104 ++++++++++++++++++++++----------------------
 2 files changed, 57 insertions(+), 52 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/Makefile b/compiler-rt-netbsd/Makefile
index cda921db6c..063b57064e 100644
--- a/compiler-rt-netbsd/Makefile
+++ b/compiler-rt-netbsd/Makefile
@@ -23,6 +23,11 @@ CMAKE_ARG_PATH=		${WRKSRC}
 CMAKE_ARGS+=	-DCMAKE_BUILD_TYPE=Release
 CMAKE_ARGS+=	-DCMAKE_C_COMPILER=${CC:Q}
 CMAKE_ARGS+=	-DCMAKE_CXX_COMPILER=${CXX:Q}
+CMAKE_ARGS+=	-DCOMPILER_RT_OS_DIR:STRING=${LOWER_OPSYS}${OS_VERSION:R}
+CMAKE_ARGS+=	-DCOMPILER_RT_INSTALL_PATH:STRING=lib/clang/${PKGVERSION_NOREV}
+
+
+PLIST_SUBST+=	COMPILER_RT_OS_DIR=${LOWER_OPSYS}${OS_VERSION:R}
 
 post-extract:
 	${RUN} mkdir -p ${WRKDIR}/build
diff --git a/compiler-rt-netbsd/PLIST b/compiler-rt-netbsd/PLIST
index f65cd22727..bac7aecbb1 100644
--- a/compiler-rt-netbsd/PLIST
+++ b/compiler-rt-netbsd/PLIST
@@ -1,53 +1,53 @@
 @comment $NetBSD$
-asan_blacklist.txt
-include/sanitizer/allocator_interface.h
-include/sanitizer/asan_interface.h
-include/sanitizer/common_interface_defs.h
-include/sanitizer/coverage_interface.h
-include/sanitizer/dfsan_interface.h
-include/sanitizer/esan_interface.h
-include/sanitizer/linux_syscall_hooks.h
-include/sanitizer/lsan_interface.h
-include/sanitizer/msan_interface.h
-include/sanitizer/tsan_interface.h
-include/sanitizer/tsan_interface_atomic.h
-include/xray/xray_interface.h
-include/xray/xray_log_interface.h
-lib/netbsd/libclang_rt.asan-i386.a
-lib/netbsd/libclang_rt.asan-i386.so
-lib/netbsd/libclang_rt.asan-preinit-i386.a
-lib/netbsd/libclang_rt.asan-preinit-x86_64.a
-lib/netbsd/libclang_rt.asan-x86_64.a
-lib/netbsd/libclang_rt.asan-x86_64.a.syms
-lib/netbsd/libclang_rt.asan-x86_64.so
-lib/netbsd/libclang_rt.asan_cxx-i386.a
-lib/netbsd/libclang_rt.asan_cxx-x86_64.a
-lib/netbsd/libclang_rt.asan_cxx-x86_64.a.syms
-lib/netbsd/libclang_rt.builtins-i386.a
-lib/netbsd/libclang_rt.builtins-x86_64.a
-lib/netbsd/libclang_rt.dd-x86_64.a
-lib/netbsd/libclang_rt.dyndd-x86_64.so
-lib/netbsd/libclang_rt.lsan-i386.a
-lib/netbsd/libclang_rt.lsan-x86_64.a
-lib/netbsd/libclang_rt.profile-i386.a
-lib/netbsd/libclang_rt.profile-x86_64.a
-lib/netbsd/libclang_rt.safestack-i386.a
-lib/netbsd/libclang_rt.safestack-x86_64.a
-lib/netbsd/libclang_rt.stats-i386.a
-lib/netbsd/libclang_rt.stats-x86_64.a
-lib/netbsd/libclang_rt.stats_client-i386.a
-lib/netbsd/libclang_rt.stats_client-x86_64.a
-lib/netbsd/libclang_rt.tsan-x86_64.a
-lib/netbsd/libclang_rt.tsan-x86_64.a.syms
-lib/netbsd/libclang_rt.tsan_cxx-x86_64.a
-lib/netbsd/libclang_rt.tsan_cxx-x86_64.a.syms
-lib/netbsd/libclang_rt.ubsan_standalone-i386.a
-lib/netbsd/libclang_rt.ubsan_standalone-i386.so
-lib/netbsd/libclang_rt.ubsan_standalone-x86_64.a
-lib/netbsd/libclang_rt.ubsan_standalone-x86_64.a.syms
-lib/netbsd/libclang_rt.ubsan_standalone-x86_64.so
-lib/netbsd/libclang_rt.ubsan_standalone_cxx-i386.a
-lib/netbsd/libclang_rt.ubsan_standalone_cxx-i386.so
-lib/netbsd/libclang_rt.ubsan_standalone_cxx-x86_64.a
-lib/netbsd/libclang_rt.ubsan_standalone_cxx-x86_64.a.syms
-lib/netbsd/libclang_rt.ubsan_standalone_cxx-x86_64.so
+lib/clang/${PKGVERSION}/asan_blacklist.txt
+lib/clang/${PKGVERSION}/include/sanitizer/allocator_interface.h
+lib/clang/${PKGVERSION}/include/sanitizer/asan_interface.h
+lib/clang/${PKGVERSION}/include/sanitizer/common_interface_defs.h
+lib/clang/${PKGVERSION}/include/sanitizer/coverage_interface.h
+lib/clang/${PKGVERSION}/include/sanitizer/dfsan_interface.h
+lib/clang/${PKGVERSION}/include/sanitizer/esan_interface.h
+lib/clang/${PKGVERSION}/include/sanitizer/linux_syscall_hooks.h
+lib/clang/${PKGVERSION}/include/sanitizer/lsan_interface.h
+lib/clang/${PKGVERSION}/include/sanitizer/msan_interface.h
+lib/clang/${PKGVERSION}/include/sanitizer/tsan_interface.h
+lib/clang/${PKGVERSION}/include/sanitizer/tsan_interface_atomic.h
+lib/clang/${PKGVERSION}/include/xray/xray_interface.h
+lib/clang/${PKGVERSION}/include/xray/xray_log_interface.h
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.asan-i386.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.asan-i386.so
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.asan-preinit-i386.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.asan-preinit-x86_64.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.asan-x86_64.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.asan-x86_64.a.syms
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.asan-x86_64.so
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.asan_cxx-i386.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.asan_cxx-x86_64.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.asan_cxx-x86_64.a.syms
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.builtins-i386.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.builtins-x86_64.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.dd-x86_64.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.dyndd-x86_64.so
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.lsan-i386.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.lsan-x86_64.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.profile-i386.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.profile-x86_64.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.safestack-i386.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.safestack-x86_64.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.stats-i386.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.stats-x86_64.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.stats_client-i386.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.stats_client-x86_64.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.tsan-x86_64.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.tsan-x86_64.a.syms
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.tsan_cxx-x86_64.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.tsan_cxx-x86_64.a.syms
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.ubsan_standalone-i386.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.ubsan_standalone-i386.so
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.ubsan_standalone-x86_64.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.ubsan_standalone-x86_64.a.syms
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.ubsan_standalone-x86_64.so
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.ubsan_standalone_cxx-i386.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.ubsan_standalone_cxx-i386.so
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.ubsan_standalone_cxx-x86_64.a
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.ubsan_standalone_cxx-x86_64.a.syms
+lib/clang/${PKGVERSION}/lib/${COMPILER_RT_OS_DIR}/libclang_rt.ubsan_standalone_cxx-x86_64.so


Home | Main Index | Thread Index | Old Index