llvm12: multiple fixes.

- only disable sanitizer for arm*-musl. the template erroneously
  disabled sanitizer support for all musl targets.
- add libexecinfo-devel to depends, since applications statically
  linking llvm will require it
- fix the xray-ppc64 patch, pointed out by sgn
This commit is contained in:
Érico Nogueira 2021-05-18 02:28:33 -03:00 committed by Érico Nogueira Rolim
parent b531af242b
commit d77534ffae
2 changed files with 8 additions and 10 deletions

View File

@ -44,7 +44,7 @@
+ if (!ret) { + if (!ret) {
+ continue; + continue;
+ } + }
+ ret += sizeof("timebase" - 1); + ret += sizeof("timebase") - 1;
+ ret = strchr(ret, ':'); + ret = strchr(ret, ':');
+ if (!ret) { + if (!ret) {
+ continue; + continue;

View File

@ -1,7 +1,7 @@
# Template file for 'llvm12' # Template file for 'llvm12'
pkgname=llvm12 pkgname=llvm12
version=12.0.0 version=12.0.0
revision=1 revision=2
wrksrc="llvm-${version}.src" wrksrc="llvm-${version}.src"
build_style=cmake build_style=cmake
configure_args=" configure_args="
@ -60,6 +60,7 @@ python_version=3
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
configure_args+=" -DLIBCXX_HAS_MUSL_LIBC=YES" configure_args+=" -DLIBCXX_HAS_MUSL_LIBC=YES"
makedepends+=" libexecinfo-devel" makedepends+=" libexecinfo-devel"
depends+=" libexecinfo-devel"
fi fi
# "operand out of range" assembler failures # "operand out of range" assembler failures
@ -233,19 +234,16 @@ post_patch() {
;; ;;
esac esac
# some sanitizer currently only on x86_64 stuff needs backtrace
case "$XBPS_TARGET_MACHINE" in case "$XBPS_TARGET_MACHINE" in
x86_64-musl) x86_64-musl) # some sanitizer currently only on x86_64 stuff needs backtrace
vsed -i 's,# Set common link flags.,list(APPEND SANITIZER_COMMON_LINK_LIBS execinfo),' \ vsed -i 's,# Set common link flags.,list(APPEND SANITIZER_COMMON_LINK_LIBS execinfo),' \
${wrksrc}/projects/compiler-rt/CMakeLists.txt ${wrksrc}/projects/compiler-rt/CMakeLists.txt
;; ;;
esac arm*-musl) # sanitizer code is broken on arm*-musl since it duplicates some libc bits
# sanitizer code is broken on arm*-musl since it duplicates some libc bits
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
vsed -i 's/set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)/set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)/' \ vsed -i 's/set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)/set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)/' \
${wrksrc}/projects/compiler-rt/cmake/config-ix.cmake ${wrksrc}/projects/compiler-rt/cmake/config-ix.cmake
fi ;;
esac
} }
pre_configure() { pre_configure() {