From e9ab6d5939014e11b4f9368984f991de4d4cf041 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <siarheit@google.com>
Date: Wed, 30 Dec 2015 12:35:53 +0000
Subject: [PATCH] rts/PrimOps.cmm: fix UNREG profiled build

Brought 'CCS_MAIN' into scope, otherwise UNREG
prof build is unhappy:

    rts_dist_HC rts/dist/build/PrimOps.p_o
  /tmp/ghc25593_0/ghc_3.hc: In function 'clB_entry':

  /tmp/ghc25593_0/ghc_3.hc:2983:24: error:
     error: 'CCS_MAIN' undeclared (first use in this function)
     *((P_)(_cly+8)) = (W_)&CCS_MAIN;
                            ^

Signed-off-by: Sergei Trofimovich <siarheit@google.com>
---
 rts/PrimOps.cmm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
index 2989f29462ab..7add8357ca9e 100644
--- a/rts/PrimOps.cmm
+++ b/rts/PrimOps.cmm
@@ -35,6 +35,9 @@ import CLOSURE ghczmprim_GHCziTypes_False_closure;
 #if defined(USE_MINIINTERPRETER) || !defined(mingw32_HOST_OS)
 import CLOSURE sm_mutex;
 #endif
+#ifdef PROFILING
+import CLOSURE CCS_MAIN;
+#endif
 
 /*-----------------------------------------------------------------------------
   Array Primitives
-- 
GitLab