Github messages for voidlinux
 help / color / mirror / Atom feed
From: ericonr <ericonr@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] llvm12: only disable sanitizer for arm*-musl.
Date: Tue, 18 May 2021 15:20:23 +0200	[thread overview]
Message-ID: <20210518132023.6OmvlVcRIQvKdlvJyp1aPrlTtx5-i2JwFDMcNyaqXeY@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30960@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1755 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages llvm12
https://github.com/void-linux/void-packages/pull/30960

llvm12: only disable sanitizer for arm*-musl.
The code erroneously disabled sanitizer support for all musl targets.

[ci skip]
@q66 

To merge when the builders have been restarted.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/30960.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-llvm12-30960.patch --]
[-- Type: text/x-diff, Size: 3773 bytes --]

From 24424a21e52f7ffb8f522c68d291999fcbf0a252 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Tue, 18 May 2021 02:28:33 -0300
Subject: [PATCH 1/2] 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
---
 .../compiler-rt-xray-ppc64-musl.patch            |  2 +-
 srcpkgs/llvm12/template                          | 16 +++++++---------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-xray-ppc64-musl.patch b/srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-xray-ppc64-musl.patch
index aac93c25fe8c..6db37ce06f76 100644
--- a/srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-xray-ppc64-musl.patch
+++ b/srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-xray-ppc64-musl.patch
@@ -44,7 +44,7 @@
 +        if (!ret) {
 +          continue;
 +        }
-+        ret += sizeof("timebase" - 1);
++        ret += sizeof("timebase") - 1;
 +        ret = strchr(ret, ':');
 +        if (!ret) {
 +          continue;
diff --git a/srcpkgs/llvm12/template b/srcpkgs/llvm12/template
index 7069f5449733..38937f68564f 100644
--- a/srcpkgs/llvm12/template
+++ b/srcpkgs/llvm12/template
@@ -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() {

From eb3466c137de2da95c83bd5a1a14772e191ed83b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Tue, 18 May 2021 10:19:11 -0300
Subject: [PATCH 2/2] Revert "bcc: fix build for musl"

This reverts commit 3001489a10ff839fed32bc900b3fa2703b25143a.

The libexecinfo-devel requirement for linking llvm-related things
statically should have been listed in the llvm12 template.
---
 srcpkgs/bcc/template | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/srcpkgs/bcc/template b/srcpkgs/bcc/template
index ec53dd8e3ba0..985568af0e55 100644
--- a/srcpkgs/bcc/template
+++ b/srcpkgs/bcc/template
@@ -20,10 +20,6 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 	makedepends+=" libatomic-devel"
 fi
 
-if [ "${XBPS_TARGET_LIBC}" = musl ]; then
-	makedepends+=" libexecinfo-devel"
-fi
-
 post_extract() {
 	sed -i '/tests/d' CMakeLists.txt  # break on musl
 	sed -i 's/<error.h>/<errno.h>/' examples/cpp/KModRetExample.cc

  parent reply	other threads:[~2021-05-18 13:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18  5:30 [PR PATCH] " ericonr
2021-05-18 13:15 ` [PR PATCH] [Updated] " ericonr
2021-05-18 13:20 ` ericonr [this message]
2021-05-18 13:28 ` [PR PATCH] [Merged]: " ericonr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210518132023.6OmvlVcRIQvKdlvJyp1aPrlTtx5-i2JwFDMcNyaqXeY@z \
    --to=ericonr@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).