[commit: ghc] master: UNREG: mark SRT as writable in generated C code (9fd4ed9)

git at git.haskell.org git at git.haskell.org
Fri Jun 1 16:21:59 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/9fd4ed90bcdb22fc0d71051644084b75a3e8a376/ghc

>---------------------------------------------------------------

commit 9fd4ed90bcdb22fc0d71051644084b75a3e8a376
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date:   Fri Jun 1 08:35:23 2018 +0000

    UNREG: mark SRT as writable in generated C code
    
    Noticed section mismatch on UNREG build failure:
    
    ```
      HC [stage 1] libraries/integer-gmp/dist-install/build/GHC/Integer/Type.o
    
         error: conflicting types for 'ufu0_srt'
         static StgWord ufu0_srt[]__attribute__((aligned(8)))= {
                        ^~~~~~~~
    
         note: previous declaration of 'ufu0_srt' was here
         IRO_(ufu0_srt);
              ^~~~~~~~
    ```
    
    `IRO_` is a 'const' qualifier.
    
    The error is a leftover from commit 838b69032566ce6ab3918d70e8d5e098d0bcee02
    "Merge FUN_STATIC closure with its SRT" where part of SRT was moved
    into closure itself and made SRTs writable.
    
    This change puts all SRTs into writable section.
    
    Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
    
    Reviewers: simonmar, bgamari
    
    Subscribers: rwbarton, thomie, carter
    
    Differential Revision: https://phabricator.haskell.org/D4731


>---------------------------------------------------------------

9fd4ed90bcdb22fc0d71051644084b75a3e8a376
 compiler/cmm/CLabel.hs | 2 --
 1 file changed, 2 deletions(-)

diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
index 8f614ab..3553283 100644
--- a/compiler/cmm/CLabel.hs
+++ b/compiler/cmm/CLabel.hs
@@ -616,8 +616,6 @@ isSomeRODataLabel (IdLabel _ _ ConInfoTable) = True
 isSomeRODataLabel (IdLabel _ _ InfoTable) = True
 isSomeRODataLabel (IdLabel _ _ LocalInfoTable) = True
 isSomeRODataLabel (IdLabel _ _ BlockInfoTable) = True
--- static reference tables defined in haskell (.hs)
-isSomeRODataLabel (SRTLabel _) = True
 -- info table defined in cmm (.cmm)
 isSomeRODataLabel (CmmLabel _ _ CmmInfo) = True
 isSomeRODataLabel _lbl = False



More information about the ghc-commits mailing list