Package: ghdl
Followup-For: Bug #1016411
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch
Control: tags -1 patch

Dear Maintainer,

In Ubuntu, this patch was applied to fix the build with LLVM 14.0.
Additionally, we opted to skip the build tests on armhf until upstream
provides a solution[1].

  * debian/patches/llvm14.0.patch: Allow building with LLVM 14.0
    (LP: #1983908).
  * debian/rules: Skip testsuite on armhf (LP: #1984138).

Thanks,
Nick

[1] https://github.com/ghdl/ghdl/issues/2170
diff -Nru ghdl-1.0.0+dfsg/debian/patches/llvm14.0.patch 
ghdl-1.0.0+dfsg/debian/patches/llvm14.0.patch
--- ghdl-1.0.0+dfsg/debian/patches/llvm14.0.patch       1969-12-31 
19:00:00.000000000 -0500
+++ ghdl-1.0.0+dfsg/debian/patches/llvm14.0.patch       2022-08-09 
11:40:42.000000000 -0400
@@ -0,0 +1,33 @@
+Description: Enable building with LLVM 14.0
+ Allow the configure script to handle LLVM 14.0, and use DWARFv4 format to 
remain
+ compatible with dwz.
+Author: Nick Rosbrook <nick.rosbr...@canonical.com>
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ghdl/+bug/1983908
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1016411
+Forwarded: no, the DWARFv4 piece is packaging specific due to dh_dwz
+Last-Update: 2022-08-08
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/configure
++++ b/configure
+@@ -283,6 +283,7 @@
+        check_version 11.1.0 $llvm_version ||
+        check_version 12.0 $llvm_version ||
+        check_version 13.0 $llvm_version ||
++       check_version 14.0 $llvm_version ||
+        false; then
+     echo "Debugging is enabled with llvm $llvm_version"
+   else
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -59,6 +59,10 @@
+ 
+ VHDL_LIB_DIR=$(prefix)/$(libdirsuffix)/vhdl
+ 
++ifeq "$(backend)" "llvm"
++ OPT_FLAGS+=-gdwarf-4
++endif
++
+ ifeq "$(enable_checks)" "true"
+  # Debug + checks
+  OPT_FLAGS+=-g
diff -Nru ghdl-1.0.0+dfsg/debian/patches/series 
ghdl-1.0.0+dfsg/debian/patches/series
--- ghdl-1.0.0+dfsg/debian/patches/series       2022-02-14 17:10:35.000000000 
-0500
+++ ghdl-1.0.0+dfsg/debian/patches/series       2022-08-09 11:40:42.000000000 
-0400
@@ -7,3 +7,4 @@
 llvm12.0.patch
 llvm11.1.0.patch
 llvm13.0.patch
+llvm14.0.patch
diff -Nru ghdl-1.0.0+dfsg/debian/rules ghdl-1.0.0+dfsg/debian/rules
--- ghdl-1.0.0+dfsg/debian/rules        2022-02-14 17:10:35.000000000 -0500
+++ ghdl-1.0.0+dfsg/debian/rules        2022-08-09 11:40:42.000000000 -0400
@@ -197,6 +197,9 @@
        @echo ------------------------------------------------------------
        @echo Run testsuite
        @echo ------------------------------------------------------------
+ifeq ($(DEB_HOST_ARCH),armhf)
+       @echo Skipping testsuite on armhf
+else
        # With some paths patched for the Debian packaging, the tests will not
        # work right when run from the build directory. To keep it simple
        # simply install into a temporary location and tell the testsuite to
@@ -219,6 +222,7 @@
                ln -sf lib/ghdl/gcc/libexec $(TESTRUNDIR)/gcc/usr/libexec; \
                debian/tests/ghdl-tests buildtest gcc; \
        fi
+endif
 
 override_dh_gencontrol:
        if [ -n "$(WITH_GCC)" ]; then \

Reply via email to