Skip to content
  • Sergei Trofimovich's avatar
    rts/Compact.cmm: fix UNREG build failure · c4808602
    Sergei Trofimovich authored
    
    
    The change does the following:
    - Add explicit declaration of exception closures
      from base. C backend needs those symbols to be
      visible.
    - Reorder cmm functions in use order. Again C
      backend needs symbol declaration/definition
      before use. even for module-local cmm functions.
    
    Fixes the following build failure:
    
      rts_dist_HC rts/dist/build/Compact.o
        In file included from /tmp/ghc3348_0/ghc_4.hc:3:0: error:
        /tmp/ghc3348_0/ghc_4.hc: In function 'stg_compactAddWithSharingzh':
    
        /tmp/ghc3348_0/ghc_4.hc:27:11: error:
         error: 'stg_compactAddWorkerzh' undeclared (first use in this function)
         JMP_((W_)&stg_compactAddWorkerzh);
                   ^
        ...
        /tmp/ghc3348_0/ghc_4.hc:230:13: error:
         error: 'base_GHCziIOziException_cannotCompactMutable_closure'
         undeclared (first use in this function)
         R1.w = (W_)&base_GHCziIOziException_cannotCompactMutable_closure;
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
    c4808602