From: Aloz1 <Aloz1@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP]ghdl: add libbacktrace for llvm backend
Date: Thu, 23 Dec 2021 23:58:37 +0100 [thread overview]
Message-ID: <20211223225837.eLlF09FcdrY4RYSB7YfZNneRzpz-j7oATAGbCLbKbOI@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-34626@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 597 bytes --]
There is an updated 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: 4674 bytes --]
From eabbccaa8ddb647e2a732d0733828bb81952b9f3 Mon Sep 17 00:00:00 2001
From: Aloz1 <kno0001@gmail.com>
Date: Thu, 23 Dec 2021 22:59:22 +1100
Subject: [PATCH 1/2] gcc: add libbacktrace subpackage
---
srcpkgs/gcc/template | 22 ++++++++++++++++++++--
srcpkgs/libbacktrace-devel | 1 +
2 files changed, 21 insertions(+), 2 deletions(-)
create mode 120000 srcpkgs/libbacktrace-devel
diff --git a/srcpkgs/gcc/template b/srcpkgs/gcc/template
index 09727ef34fb2..3bbb86d9bd1d 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%.*}"
@@ -58,7 +58,7 @@ depends="binutils libgcc-devel-${version}_${revision}
libstdc++-devel-${version}_${revision} libssp-devel-${version}_${revision}"
checkdepends="dejagnu"
-subpackages="libgcc libgomp libgomp-devel libatomic libatomic-devel"
+subpackages="libgcc libgomp libgomp-devel libatomic libatomic-devel libbacktrace-devel"
subpackages+=" libssp libssp-devel"
build_options="ada gnatboot"
@@ -353,6 +353,16 @@ do_install() {
ln -sfr ${DESTDIR}/usr/include/c++/${_minorver} \
${DESTDIR}/usr/include/c++/${_patchver}
+ # Install libbacktrace libraries (gcc source makefile doesn't do
+ # this for us)
+ vmkdir usr/include/backtrace
+ vinstall libbacktrace/.libs/libbacktrace.a \
+ 644 usr/lib
+ vinstall libbacktrace/backtrace-supported.h \
+ 644 usr/include/backtrace
+ vinstall ../libbacktrace/backtrace.h \
+ 644 usr/include/backtrace
+
# cc symlink
ln -sfr ${DESTDIR}/usr/bin/gcc ${DESTDIR}/usr/bin/cc
# rpcgen wants /lib/cpp, make a symlink
@@ -721,3 +731,11 @@ libstdc++_package() {
vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
}
}
+
+libbacktrace-devel_package() {
+ short_desc+=" - Backtrace generation library - development files"
+ pkg_install() {
+ vmove "usr/lib/libbacktrace.a"
+ vmove usr/include/backtrace
+ }
+}
diff --git a/srcpkgs/libbacktrace-devel b/srcpkgs/libbacktrace-devel
new file mode 120000
index 000000000000..b08d5af5795c
--- /dev/null
+++ b/srcpkgs/libbacktrace-devel
@@ -0,0 +1 @@
+gcc
\ No newline at end of file
From 7dd3052fafce142b6093d6a24d0a49121886ba62 Mon Sep 17 00:00:00 2001
From: Aloz1 <kno0001@gmail.com>
Date: Thu, 23 Dec 2021 23:42:28 +1100
Subject: [PATCH 2/2] ghdl: use libbacktrace in llvm backend
---
srcpkgs/ghdl/patches/ln-libbacktrace.patch | 13 +++++++++++++
srcpkgs/ghdl/template | 9 ++++++---
2 files changed, 19 insertions(+), 3 deletions(-)
create mode 100644 srcpkgs/ghdl/patches/ln-libbacktrace.patch
diff --git a/srcpkgs/ghdl/patches/ln-libbacktrace.patch b/srcpkgs/ghdl/patches/ln-libbacktrace.patch
new file mode 100644
index 000000000000..fcc8a876f273
--- /dev/null
+++ b/srcpkgs/ghdl/patches/ln-libbacktrace.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.in b/Makefile.in
+index d8015791..3722901d 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -497,7 +497,7 @@ install.grt: \
+ $(INSTALL_DATA) $(libdirsuffix)/grt-shared.lst $(DESTDIR)$(VHDL_LIB_DIR)/grt-shared.lst
+ $(INSTALL_DATA) $(GRTSRCDIR)/grt.ver $(DESTDIR)$(VHDL_LIB_DIR)/grt.ver
+ test "x$(LIBBACKTRACE)" = x || test "x$(backend)" = xgcc || \
+- $(INSTALL_DATA) $(LIBBACKTRACE) $(DESTDIR)$(VHDL_LIB_DIR)/libbacktrace.a
++ $(LN) $(LIBBACKTRACE) $(DESTDIR)$(VHDL_LIB_DIR)/libbacktrace.a
+
+ uninstall.grt:
+ $(RM) $(DESTDIR)$(VHDL_LIB_DIR)/libgrt.a
diff --git a/srcpkgs/ghdl/template b/srcpkgs/ghdl/template
index e756d8c3cd87..fb70573e4726 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 libbacktrace-devel"
fi
do_configure() {
@@ -65,7 +65,9 @@ do_configure() {
if [ "$build_option_llvm" ]; then
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="/usr/lib/libbacktrace.a" \
${configure_args}
cd ..
fi
@@ -130,6 +132,7 @@ ghdl-mcode_package() {
ghdl-llvm_package() {
short_desc+=" - LLVM backend"
+ depends+=" libbacktrace-devel"
pkg_install() {
vmove usr/bin/ghdl-llvm
vmove usr/lib/ghdl/llvm
next prev parent reply other threads:[~2021-12-23 22:58 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-20 14:34 [PR PATCH] " 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 ` Aloz1 [this message]
2022-01-18 11:45 ` ghdl: " Aloz1
2022-06-19 2:16 ` github-actions
2022-07-04 2:15 ` [PR PATCH] [Closed]: " github-actions
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=20211223225837.eLlF09FcdrY4RYSB7YfZNneRzpz-j7oATAGbCLbKbOI@z \
--to=aloz1@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).