diff options
Diffstat (limited to 'rts/OldARMAtomic.c')
-rw-r--r-- | rts/OldARMAtomic.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/rts/OldARMAtomic.c b/rts/OldARMAtomic.c index a28d2bc00e..3c60e6d669 100644 --- a/rts/OldARMAtomic.c +++ b/rts/OldARMAtomic.c @@ -5,6 +5,12 @@ * Inefficient but necessary atomic locks used for implementing atomic * operations on ARM architectures pre-ARMv6. * + * These operations are not only referenced in the threaded RTS, but also in + * ghc (the library), via the operations in compiler/cbits/genSym.c. + * They are not actually called in a non-threaded environment, but we still + * need them in every RTS to make the linker happy, hence no + * #if defined(THREADED_RTS) here. See #8951. + * * -------------------------------------------------------------------------- */ #include "PosixSource.h" @@ -14,8 +20,6 @@ #include <sched.h> #endif -#if defined(THREADED_RTS) - #if arm_HOST_ARCH && defined(arm_HOST_ARCH_PRE_ARMv6) static volatile int atomic_spin = 0; @@ -51,5 +55,3 @@ void arm_atomic_spin_unlock() } #endif /* arm_HOST_ARCH && defined(arm_HOST_ARCH_PRE_ARMv6) */ - -#endif /* defined(THREADED_RTS) */ |