Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] llvm12: only disable sanitizer for arm*-musl.
@ 2021-05-18  5:30 ericonr
  2021-05-18 13:15 ` [PR PATCH] [Updated] " ericonr
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ericonr @ 2021-05-18  5:30 UTC (permalink / raw)
  To: ml

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

There is a new 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: 1717 bytes --]

From 24f1d73079bab2081694a12df06fb11f07c2f674 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] llvm12: only disable sanitizer for arm*-musl.

The code erroneously disabled sanitizer support for all musl targets.
---
 srcpkgs/llvm12/template | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/srcpkgs/llvm12/template b/srcpkgs/llvm12/template
index 7069f5449733..e3fa1a607772 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="
@@ -233,19 +233,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() {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Updated] llvm12: only disable sanitizer for arm*-musl.
  2021-05-18  5:30 [PR PATCH] llvm12: only disable sanitizer for arm*-musl ericonr
@ 2021-05-18 13:15 ` ericonr
  2021-05-18 13:20 ` ericonr
  2021-05-18 13:28 ` [PR PATCH] [Merged]: " ericonr
  2 siblings, 0 replies; 4+ messages in thread
From: ericonr @ 2021-05-18 13:15 UTC (permalink / raw)
  To: ml

[-- 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: 2817 bytes --]

From ad4650518d8cb8de1a8f5b4ebbca0e1622e33f9b 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] 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() {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Updated] llvm12: only disable sanitizer for arm*-musl.
  2021-05-18  5:30 [PR PATCH] llvm12: only disable sanitizer for arm*-musl ericonr
  2021-05-18 13:15 ` [PR PATCH] [Updated] " ericonr
@ 2021-05-18 13:20 ` ericonr
  2021-05-18 13:28 ` [PR PATCH] [Merged]: " ericonr
  2 siblings, 0 replies; 4+ messages in thread
From: ericonr @ 2021-05-18 13:20 UTC (permalink / raw)
  To: ml

[-- 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Merged]: llvm12: only disable sanitizer for arm*-musl.
  2021-05-18  5:30 [PR PATCH] llvm12: only disable sanitizer for arm*-musl ericonr
  2021-05-18 13:15 ` [PR PATCH] [Updated] " ericonr
  2021-05-18 13:20 ` ericonr
@ 2021-05-18 13:28 ` ericonr
  2 siblings, 0 replies; 4+ messages in thread
From: ericonr @ 2021-05-18 13:28 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

llvm12: only disable sanitizer for arm*-musl.
https://github.com/void-linux/void-packages/pull/30960

Description:
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
-->


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-18 13:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18  5:30 [PR PATCH] llvm12: only disable sanitizer for arm*-musl ericonr
2021-05-18 13:15 ` [PR PATCH] [Updated] " ericonr
2021-05-18 13:20 ` ericonr
2021-05-18 13:28 ` [PR PATCH] [Merged]: " ericonr

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).