Github messages for voidlinux
 help / color / mirror / Atom feed
From: Calandracas606 <Calandracas606@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] Llvm17 fix compiler-rt, add liblldb17
Date: Mon, 26 Feb 2024 17:57:50 +0100	[thread overview]
Message-ID: <20240226165750.357C9232D5@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-48679@inbox.vuxu.org>

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

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

https://github.com/Calandracas606/void-packages llvm17-fix-compiler-cross
https://github.com/void-linux/void-packages/pull/48679

Llvm17 fix compiler-rt, add liblldb17
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, x86_64-musl
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64 (cross)

[ci skip]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-llvm17-fix-compiler-cross-48679.patch --]
[-- Type: text/x-diff, Size: 7634 bytes --]

From 247487037789805d4e923eccd71944522107158a Mon Sep 17 00:00:00 2001
From: Daniel Martinez <danielmartinez@cock.li>
Date: Mon, 12 Feb 2024 16:47:24 -0500
Subject: [PATCH 1/3] llvm17: cross compile compiler-rt properly, add liblldb17

---
 common/shlibs           |  2 +-
 srcpkgs/compiler-rt17   |  1 +
 srcpkgs/liblldb17       |  1 +
 srcpkgs/llvm17/template | 58 +++++++++++++++++++++++------------------
 srcpkgs/llvm17/update   |  2 +-
 5 files changed, 37 insertions(+), 27 deletions(-)
 create mode 120000 srcpkgs/compiler-rt17
 create mode 120000 srcpkgs/liblldb17

diff --git a/common/shlibs b/common/shlibs
index 363b157bd5fc9c..ad0068090b7a90 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -982,7 +982,7 @@ libuchardet.so.0 uchardet-0.0.6_1
 libgtksourceviewmm-3.0.so.0 gtksourceviewmm-3.2.0_1
 libyajl.so.2 yajl-2.0.1_1
 libconfuse.so.2 confuse-3.2.1_1
-liblldb.so.17 lldb17-17.0.6_1
+liblldb.so.17 liblldb17-17.0.6_3
 liblldb.so.15 lldb15-15.0.7_4
 libclang.so.17 libclang17-17.0.6_1
 libclang.so.15 libclang15-15.0.7_4
diff --git a/srcpkgs/compiler-rt17 b/srcpkgs/compiler-rt17
new file mode 120000
index 00000000000000..96970d5c02c13a
--- /dev/null
+++ b/srcpkgs/compiler-rt17
@@ -0,0 +1 @@
+llvm17
\ No newline at end of file
diff --git a/srcpkgs/liblldb17 b/srcpkgs/liblldb17
new file mode 120000
index 00000000000000..96970d5c02c13a
--- /dev/null
+++ b/srcpkgs/liblldb17
@@ -0,0 +1 @@
+llvm17
\ No newline at end of file
diff --git a/srcpkgs/llvm17/template b/srcpkgs/llvm17/template
index de5603085382c1..a93afe00a641a5 100644
--- a/srcpkgs/llvm17/template
+++ b/srcpkgs/llvm17/template
@@ -1,7 +1,7 @@
 # Template file for 'llvm17'
 pkgname=llvm17
 version=17.0.6
-revision=2
+revision=3
 build_wrksrc=llvm
 build_style=cmake
 _ext_suffix=".cpython-${py3_ver/./}-linux-${XBPS_TARGET_LIBC/glibc/gnu}.so"
@@ -9,6 +9,7 @@ pycompile_dirs="usr/share/scan-view"
 configure_args="
  -DCMAKE_BUILD_TYPE=Release -Wno-dev
  -DENABLE_LINKER_BUILD_ID=YES
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
  -DLLDB_USE_SYSTEM_SIX=YES
  -DLIBCXX_CXX_ABI=libcxxabi
  -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=YES
@@ -45,11 +46,11 @@ checksum=58a8818c60e6627064f312dbf46c02d9949956558340938b71cf731ad8bc0813
 lib32disabled=yes
 python_version=3
 
-build_options="clang clang_tools_extra lld mlir libclc polly lldb flang bolt"
-build_options_default="clang clang_tools_extra lld mlir libclc polly lldb"
+build_options="clang clang_tools_extra lld mlir libclc polly lldb flang bolt openmp"
+build_options_default="clang clang_tools_extra lld mlir libclc polly lldb openmp"
 
 case "$XBPS_TARGET_MACHINE" in
-	x86_64*|aarch64*) build_options_default+=" flang bolt ";;
+	x86_64*|aarch64*) build_options_default+=" flang bolt openmp";;
 esac
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
@@ -58,8 +59,9 @@ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 fi
 
 subpackages="libllvm17 llvm17-doc llvm17-devel"
-_enabled_projects=
-_enabled_runtimes=
+
+# use $(:) to silence xlint
+_enabled_projects=$(:)
 
 if [ "$build_option_clang" ]; then
 	_enabled_projects+="clang;"
@@ -78,7 +80,7 @@ if [ "$build_option_polly" ]; then
 fi
 if [ "$build_option_lldb" ]; then
 	_enabled_projects+="lldb;"
-	subpackages+=" lldb17 lldb17-devel "
+	subpackages+=" lldb17 lldb17-devel liblldb17 "
 fi
 if [ "$build_option_lld" ]; then
 	_enabled_projects+="lld;"
@@ -96,32 +98,31 @@ if [ "$build_option_flang" ]; then
 	subpackages+=" flang17 flang17-devel "
 fi
 
+subpackages+=" compiler-rt17 "
+_enabled_runtimes="compiler-rt"
+
 # enable if runtime subpackages link to this version of llvm
 if true; then
 	subpackages+=" llvm-libunwind llvm-libunwind-devel "
-	_enabled_runtimes+="${_enabled_runtimes:+;}libunwind"
+	_enabled_runtimes+=";libunwind"
 
 	subpackages+=" libcxx libcxx-devel libcxxabi libcxxabi-devel "
-	_enabled_runtimes+="${_enabled_runtimes:+;}libcxxabi;libcxx"
+	_enabled_runtimes+=";libcxxabi;libcxx"
 
-	subpackages+=" compiler-rt "
-	_enabled_runtimes+="${_enabled_runtimes:+;}compiler-rt"
 
-	case "$XBPS_TARGET_MACHINE" in
-		x86_64*|aarch64*)
-			# openmp fails when built as runtime if cross-compiled
-			if [ "$CROSS_BUILD" ]; then
-				_enabled_projects+="openmp;"
-			else
-				_enabled_runtimes+="${_enabled_runtimes:+;}openmp"
-			fi
-			subpackages+=" libomp libomp-devel "
-			;;
-	esac
+	if [ "$build_option_openmp" ]; then
+		# openmp fails when built as runtime if cross-compiled
+		if [ "$CROSS_BUILD" ]; then
+			_enabled_projects+="openmp;"
+		else
+			_enabled_runtimes+=";openmp"
+		fi
+		subpackages+=" libomp libomp-devel "
+	fi
 
-	configure_args+=" -DLLVM_ENABLE_RUNTIMES=${_enabled_runtimes}"
 fi
 
+configure_args+=" -DLLVM_ENABLE_RUNTIMES=${_enabled_runtimes}"
 configure_args+=" -DLLVM_ENABLE_PROJECTS=${_enabled_projects}"
 
 if [ "$CROSS_BUILD" ]; then
@@ -456,7 +457,6 @@ lldb17_package() {
 		vmove usr/bin/lldb-instr
 		vmove usr/bin/lldb-server
 		vmove usr/bin/lldb-vscode
-		vmove "usr/lib/liblldb*.so.*"
 		vmove "usr/lib/python${py3_ver}/site-packages/lldb"
 		if [ -z "$CROSS_BUILD" ]; then
 			vmove /usr/lib/lua/5.3/lldb.so
@@ -474,6 +474,14 @@ lldb17-devel_package() {
 	}
 }
 
+liblldb17_package() {
+	lib32disabled=yes
+	short_desc+=" - LLDB debugger - runtime library"
+	pkg_install() {
+		vmove "usr/lib/liblldb*.so.*"
+	}
+}
+
 lld17_package() {
 	lib32disabled=yes
 	short_desc+=" - linker"
@@ -654,7 +662,7 @@ libcxx-devel_package() {
 	}
 }
 
-compiler-rt_package() {
+compiler-rt17_package() {
 	short_desc+=" - runtime libraries"
 	homepage="https://compiler-rt.llvm.org/"
 	pkg_install() {
diff --git a/srcpkgs/llvm17/update b/srcpkgs/llvm17/update
index e95cf26b3586b7..cc8edb6c005acb 100644
--- a/srcpkgs/llvm17/update
+++ b/srcpkgs/llvm17/update
@@ -1,3 +1,3 @@
 site="https://github.com/llvm/llvm-project/releases"
-pattern="llvmorg-\K(\d+.){2}\d+(-rc\d+)?"
+pattern="llvmorg-\K(17)\.(\d+)\.+\d+(-rc\d+)?"
 ignore="*-rc*"

From 16bc5c366ebd0bbb3300108803266fb3e2031ee6 Mon Sep 17 00:00:00 2001
From: Daniel Martinez <danielmartinez@cock.li>
Date: Mon, 12 Feb 2024 16:47:51 -0500
Subject: [PATCH 2/3] llvm: add compiler-rt meta-package

---
 srcpkgs/compiler-rt   | 2 +-
 srcpkgs/llvm/template | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/compiler-rt b/srcpkgs/compiler-rt
index 96970d5c02c13a..0d68131b9b3088 120000
--- a/srcpkgs/compiler-rt
+++ b/srcpkgs/compiler-rt
@@ -1 +1 @@
-llvm17
\ No newline at end of file
+llvm
\ No newline at end of file
diff --git a/srcpkgs/llvm/template b/srcpkgs/llvm/template
index b27a80da2fee1e..bfa7da4ab48684 100644
--- a/srcpkgs/llvm/template
+++ b/srcpkgs/llvm/template
@@ -1,7 +1,7 @@
 # Template file for 'llvm'
 pkgname=llvm
 version=17
-revision=2
+revision=3
 build_style=meta
 depends="llvm${version}"
 short_desc="LLVM meta package"
@@ -57,3 +57,9 @@ libllvm_package() {
 	depends="libllvm${version}>=0"
 	short_desc+=" - transitional meta package"
 }
+
+compiler-rt_package() {
+	build_style=meta
+	depends="compiler-rt${version}>=0"
+	short_desc+=" - transitional meta package"
+}

From 6d54cdce6bb5fed2fecf58bc0f2e40aa9fc97dcb Mon Sep 17 00:00:00 2001
From: Daniel Martinez <danielmartinez@cock.li>
Date: Wed, 14 Feb 2024 11:41:33 -0500
Subject: [PATCH 3/3] llvm15: fix update file

---
 srcpkgs/llvm15/update | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/llvm15/update b/srcpkgs/llvm15/update
index e95cf26b3586b7..baa6a6b6acf9a7 100644
--- a/srcpkgs/llvm15/update
+++ b/srcpkgs/llvm15/update
@@ -1,3 +1,3 @@
 site="https://github.com/llvm/llvm-project/releases"
-pattern="llvmorg-\K(\d+.){2}\d+(-rc\d+)?"
+pattern="llvmorg-\K(15)\.(\d+)\.+\d+(-rc\d+)?"
 ignore="*-rc*"

  parent reply	other threads:[~2024-02-26 16:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-12 21:51 [PR PATCH] Llvm17 fix compiler cross Calandracas606
2024-02-12 21:59 ` [PR PATCH] [Updated] Llvm17 fix compiler-rt, add liblldb17 Calandracas606
2024-02-12 22:47 ` [PR REVIEW] " classabbyamp
2024-02-13  3:05 ` [PR PATCH] [Updated] " Calandracas606
2024-02-13 11:26 ` [PR REVIEW] " leahneukirchen
2024-02-14 16:44 ` [PR PATCH] [Updated] " Calandracas606
2024-02-26 16:57 ` Calandracas606 [this message]
2024-02-26 17:07 ` Calandracas606
2024-02-26 19:33 ` Calandracas606
2024-02-26 21:14 ` [PR PATCH] [Updated] " Calandracas606
2024-02-26 21:57 ` [PR REVIEW] " Johnnynator
2024-02-26 23:47 ` Calandracas606
2024-02-27 20:25 ` Johnnynator

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=20240226165750.357C9232D5@inbox.vuxu.org \
    --to=calandracas606@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).