diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2014-12-09 18:18:11 -0600 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-12-09 19:59:27 -0600 |
commit | df1307f079ae69dcd735e0973de987b141d509da (patch) | |
tree | b8335df94c75e12078ebfc7b05f1eff897a84854 /includes/stg | |
parent | 8b480d3192e6eff6183934d7bbcc2054611c3651 (diff) | |
download | haskell-df1307f079ae69dcd735e0973de987b141d509da.tar.gz |
Link pre-ARMv6 spinlocks into all RTS variants
Summary:
For compatibility with ARM machines from pre v6, the RTS provides
implementations of certain atomic operations. Previously, these
were only included in the threaded RTS.
But ghc (the library) contains the code in compiler/cbits/genSym.c, which
uses these operations if there is more than one capability. But there is only
one libHSghc, so the linker wants to resolve these symbols in every case.
By providing these operations in all RTSs, the linker is happy. The only
downside is a small amount of dead code in the non-threaded RTS on old ARM
machines.
Test Plan: It helped here.
Reviewers: bgamari, austin
Reviewed By: bgamari, austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D564
GHC Trac Issues: #8951
Diffstat (limited to 'includes/stg')
-rw-r--r-- | includes/stg/SMP.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/stg/SMP.h b/includes/stg/SMP.h index 732ac5364b..f6fd394087 100644 --- a/includes/stg/SMP.h +++ b/includes/stg/SMP.h @@ -14,13 +14,13 @@ #ifndef SMP_H #define SMP_H -#if defined(THREADED_RTS) - #if arm_HOST_ARCH && defined(arm_HOST_ARCH_PRE_ARMv6) void arm_atomic_spin_lock(void); void arm_atomic_spin_unlock(void); #endif +#if defined(THREADED_RTS) + /* ---------------------------------------------------------------------------- Atomic operations ------------------------------------------------------------------------- */ |