From a82189be912f32ed0c5cef3c46a21a3f8c7dd62e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mar 10 2020 12:07:34 +0000 Subject: add bcond for dwarf-unwind debuginfo --- diff --git a/ghc.spec b/ghc.spec index dd93d7d..15de414 100644 --- a/ghc.spec +++ b/ghc.spec @@ -23,6 +23,11 @@ %bcond_without perf_build %endif +# to enable dwarf-unwind debug (only on intel archs) +%ifarch x86_64 i686 +%bcond_with dwarf_unwind +%endif + # locked together since disabling haddock causes no manuals built # and disabling haddock still created index.html # https://ghc.haskell.org/trac/ghc/ticket/15190 @@ -141,6 +146,9 @@ BuildRequires: llvm%{llvm_major} BuildRequires: llvm >= %{llvm_major} %endif %endif +%if %{with dwarf_unwind} +BuildRequires: elfutils-devel +%endif %ifarch armv7hl # patch12 BuildRequires: autoconf, automake @@ -371,6 +379,10 @@ BuildFlavour = quick %endif %endif GhcLibWays = v dyn %{?with_ghc_prof:p} +%if %{with dwarf_unwind} +GhcLibHcOpts += -g3 +GhcRtsHcOpts += -g3 +%endif %if %{with haddock} HADDOCK_DOCS = YES EXTRA_HADDOCK_OPTS += --hyperlinked-source --hoogle --quickjump @@ -418,6 +430,7 @@ export CC=%{_bindir}/gcc %ifarch %{ghc_unregisterized_arches} --enable-unregisterised \ %endif + %{?with_dwarf_unwind:--enable-dwarf-unwind} \ %{nil} # avoid "ghc: hGetContents: invalid argument (invalid byte sequence)" @@ -672,6 +685,9 @@ make test %changelog +* Tue Mar 10 2020 Jens Petersen +- add bcond for dwarf-unwind debuginfo + * Mon Feb 10 2020 Jens Petersen - 8.6.5-102 - rebuild against ghc-rpm-macros fixed for subpackage prof deps