summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2015-12-04 22:07:13 +0000
committerSergei Trofimovich <siarheit@google.com>2015-12-04 22:07:13 +0000
commite2c518e6a751b7a16c704198a14dcc688b020038 (patch)
tree40608eb35b10b3da1da88ac2bf6055d6abf9aaa4 /mk
parentc865c425a37b0bc52f4dead9d70eb0ee2bc287d6 (diff)
downloadhaskell-e2c518e6a751b7a16c704198a14dcc688b020038.tar.gz
libdw: enable support only on i386 and amd64
Summary: Currently libdw requires per-arch implementation of set_initial_registers() function. Otherwise build fails with linkage error (seen on sparc): rts/dist/build/libHSrts_thr-ghc7.11.20151129.so: undefined reference to `set_initial_registers' collect2: error: ld returned 1 exit status `gcc' failed in phase `Linker'. (Exit code: 1) make[1]: *** [ghc/stage2/build/tmp/ghc-stage2] Error 1 Converted link-time error to compile-time error, added arch whitelist. Signed-off-by: Sergei Trofimovich <siarheit@google.com> Reviewers: austin, thomie, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1567
Diffstat (limited to 'mk')
-rw-r--r--mk/config.mk.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 967c7510a1..d7cd05b6a6 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -371,9 +371,9 @@ UseSystemLibFFI=@UseSystemLibFFI@
FFILibDir=@FFILibDir@
FFIIncludeDir=@FFIIncludeDir@
-
-# Include support for DWARF unwinding
-GhcRtsWithLibdw = @HaveLibdw@
+# GHC needs arch-specific tweak at least in
+# rts/Libdw.c:set_initial_registers()
+GhcRtsWithLibdw=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64),@HaveLibdw@,NO))
################################################################################
#