From 9353565e84a0e65c2246e2c5790e9a9b14c63000 Mon Sep 17 00:00:00 2001 From: Aloz1 Date: Tue, 21 Dec 2021 01:28:34 +1100 Subject: [PATCH] ghdl: add libbacktrace for llvm backend --- srcpkgs/gcc/template | 10 +++++++++- srcpkgs/ghdl/template | 12 +++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/srcpkgs/gcc/template b/srcpkgs/gcc/template index 09727ef34fb2..15b920c76af2 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,14 @@ 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} + vinstall libbacktrace/backtrace-support.h \ + 644 usr/lib/gcc/${_triplet}/${_minorver} + vinstall ../libbacktrace/backtrace.h \ + 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..ef8864ee6708 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. + local gcc_ver="$(${XBPS_CROSS_TRIPLET}-gcc -dumpversion)" + 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/gcc/${XBPS_CROSS_TRIPLET}/${gcc_ver}/libbacktrace.a" \ ${configure_args} cd .. fi