Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [WIP]ghdl: add libbacktrace for llvm backend
@ 2021-12-20 14:34 Aloz1
  2021-12-20 14:45 ` Aloz1
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: Aloz1 @ 2021-12-20 14:34 UTC (permalink / raw)
  To: ml

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

There is a new pull request by Aloz1 against master on the void-packages repository

https://github.com/Aloz1/void-packages ghdl-enable-backtrace
https://github.com/void-linux/void-packages/pull/34626

[WIP]ghdl: add libbacktrace for llvm backend
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ghdl-enable-backtrace-34626.patch --]
[-- Type: text/x-diff, Size: 2319 bytes --]

From e3c7e63801b0281ea91f7a7683d38d6716d69a5f Mon Sep 17 00:00:00 2001
From: Aloz1 <kno0001@gmail.com>
Date: Tue, 21 Dec 2021 01:28:34 +1100
Subject: [PATCH] ghdl: add libbacktrace for llvm backend

---
 srcpkgs/gcc/template  |  6 +++++-
 srcpkgs/ghdl/template | 12 +++++++++---
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/gcc/template b/srcpkgs/gcc/template
index 09727ef34fb2..10f7a9d96ca5 100644
--- a/srcpkgs/gcc/template
+++ b/srcpkgs/gcc/template
@@ -7,7 +7,7 @@ pkgname=gcc
 # to get regression fixes not yet incorporate into a stable release
 # it should be possible to switch back to stable with 10.3 or 11
 version=10.2.1pre1
-revision=3
+revision=4
 _patchver="${version%pre*}"
 _minorver="${_patchver%.*}"
 _majorver="${_minorver%.*}"
@@ -353,6 +353,10 @@ do_install() {
 	ln -sfr ${DESTDIR}/usr/include/c++/${_minorver} \
 		${DESTDIR}/usr/include/c++/${_patchver}
 
+	# Install libbacktrace. (it's not installed by makefiles)
+	vinstall libbacktrace/.libs/libbacktrace.a \
+		644 usr/lib/gcc/${_triplet}/${_minorver}
+
 	# cc symlink
 	ln -sfr ${DESTDIR}/usr/bin/gcc ${DESTDIR}/usr/bin/cc
 	# rpcgen wants /lib/cpp, make a symlink
diff --git a/srcpkgs/ghdl/template b/srcpkgs/ghdl/template
index e756d8c3cd87..bb3d77a1a1fc 100644
--- a/srcpkgs/ghdl/template
+++ b/srcpkgs/ghdl/template
@@ -7,7 +7,7 @@
 pkgname=ghdl
 reverts="20181129_1"
 version=1.0.0
-revision=1
+revision=2
 build_style=configure
 configure_args="--prefix=/usr --srcdir=.. --incdir=lib/ghdl/include"
 makedepends="zlib-devel"
@@ -51,7 +51,7 @@ fi
 
 if [ "$build_option_llvm" ]; then
 	subpackages+=" ghdl-llvm"
-	makedepends+=" llvm12"
+	makedepends+=" llvm12 libgcc-devel"
 fi
 
 do_configure() {
@@ -63,9 +63,15 @@ do_configure() {
 		cd ..
 	fi
 	if [ "$build_option_llvm" ]; then
+		# FIXME: This is a bit hacky. This should be replaced by the path within the gcc
+		# source tree for libbacktrace when building the gcc backend has been added.
+		gcc_dir=$(gcc --print-search-dirs | awk '{ if ($1 == "install:") print $2 }')
+
 		mkdir -p build_llvm
 		cd build_llvm
-		../configure --libdir=lib/ghdl/llvm --with-llvm-config \
+		../configure --libdir=lib/ghdl/llvm \
+			--with-llvm-config \
+			--with-backtrace-lib="${XBPS_MASTERDIR}${gcc_dir}/libbacktrace.a" \
 			${configure_args}
 		cd ..
 	fi

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

end of thread, other threads:[~2022-07-04  2:15 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-20 14:34 [PR PATCH] [WIP]ghdl: add libbacktrace for llvm backend Aloz1
2021-12-20 14:45 ` Aloz1
2021-12-20 15:05 ` [PR REVIEW] " ericonr
2021-12-20 15:05 ` ericonr
2021-12-20 15:05 ` ericonr
2021-12-20 15:32 ` Aloz1
2021-12-20 15:33 ` Aloz1
2021-12-20 15:44 ` [PR PATCH] [Updated] " Aloz1
2021-12-20 15:44 ` [PR REVIEW] " Aloz1
2021-12-21  3:37 ` ericonr
2021-12-21  6:16 ` Aloz1
2021-12-21 19:04 ` ericonr
2021-12-22  0:26 ` Aloz1
2021-12-23  4:45 ` ericonr
2021-12-23 12:47 ` [PR PATCH] [Updated] " Aloz1
2021-12-23 12:52 ` Aloz1
2021-12-23 12:57 ` Aloz1
2021-12-23 13:03 ` Aloz1
2021-12-23 14:07 ` ericonr
2021-12-23 21:07 ` Aloz1
2021-12-23 21:07 ` Aloz1
2021-12-23 21:16 ` Aloz1
2021-12-23 22:33 ` Aloz1
2021-12-23 22:58 ` [PR PATCH] [Updated] " Aloz1
2022-01-18 11:45 ` ghdl: " Aloz1
2022-06-19  2:16 ` github-actions
2022-07-04  2:15 ` [PR PATCH] [Closed]: " github-actions

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