rts/PrimOps.cmm: add declaration for heapOverflow closure
authorSergei Trofimovich <slyfox@gentoo.org>
Thu, 2 Nov 2017 23:07:57 +0000 (23:07 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Thu, 2 Nov 2017 23:12:58 +0000 (23:12 +0000)
Before the change UNREG ghc build failed as:
```
  rts_dist_HC rts/dist/build/PrimOps.o
/tmp/ghc2370_0/ghc_4.hc: In function 'stg_newByteArrayzh':

/tmp/ghc2370_0/ghc_4.hc:26:13: error:
     error: 'base_GHCziIOziException_heapOverflow_closure'
         undeclared (first use in this function)
     R1.w = (W_)&base_GHCziIOziException_heapOverflow_closure;
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   |
26 | R1.w = (W_)&base_GHCziIOziException_heapOverflow_closure;
   |             ^
```

It's an UNREG-specific failure because C backend always requires
declarations to be known.

Added missing declaration.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
rts/PrimOps.cmm

index ca519b6..467353a 100644 (file)
@@ -30,6 +30,7 @@ import pthread_mutex_lock;
 import pthread_mutex_unlock;
 #endif
 import CLOSURE base_ControlziExceptionziBase_nestedAtomically_closure;
+import CLOSURE base_GHCziIOziException_heapOverflow_closure;
 import EnterCriticalSection;
 import LeaveCriticalSection;
 import CLOSURE ghczmprim_GHCziTypes_False_closure;