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) {
+ continue;
+ }
+ ret += sizeof("timebase" - 1);
+ ret += sizeof("timebase") - 1;
+ ret = strchr(ret, ':');
+ if (!ret) {
+ continue;

View File

@ -1,7 +1,7 @@
# Template file for 'llvm12'
pkgname=llvm12
version=12.0.0
revision=1
revision=2
wrksrc="llvm-${version}.src"
build_style=cmake
configure_args="
@ -60,6 +60,7 @@ python_version=3
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
configure_args+=" -DLIBCXX_HAS_MUSL_LIBC=YES"
makedepends+=" libexecinfo-devel"
depends+=" libexecinfo-devel"
fi
# "operand out of range" assembler failures
@ -233,19 +234,16 @@ post_patch() {
;;
esac
# some sanitizer currently only on x86_64 stuff needs backtrace
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),' \
${wrksrc}/projects/compiler-rt/CMakeLists.txt
;;
arm*-musl) # sanitizer code is broken on arm*-musl since it duplicates some libc bits
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
;;
esac
# 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)/' \
${wrksrc}/projects/compiler-rt/cmake/config-ix.cmake
fi
}
pre_configure() {