diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2018-10-06 19:45:18 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2018-10-06 19:46:02 +0100 |
commit | 4e3562c041695198519a075340ceaf40ceec402a (patch) | |
tree | ccac35d75475ef2efeac89af81384a49c15baf8b /compiler | |
parent | 8be27c0371d53e051d59ba20dd65103bbb8d32d3 (diff) | |
download | haskell-4e3562c041695198519a075340ceaf40ceec402a.tar.gz |
UNREG: don't prefix asm prefixes in via-C mode
commit 64c54fff2d6534e1229359a8d357ec1dc6c21b73
("Mark system and internal symbols as private symbols in asm")
Added `internalNamePrefix` helper. Unfortunately it
generates invalid label in unregisterised mode:
```
$ ./configure --enable-unregisterised
/tmp/ghc19372_0/ghc_4.hc:2831:22: error:
error: expected identifier or '(' before '.' token
static const StgWord .Lcl3_info[]__attribute__((aligned(8)))= {
^
```
Here asm-style prefix is applied to C symbol.
The fix is simple: apply asm-style labels only to assembly code.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Reviewers: simonmar, last_g, bgamari
Reviewed By: simonmar
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5207
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/cmm/CLabel.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs index 12c3357e47..f07abebf50 100644 --- a/compiler/cmm/CLabel.hs +++ b/compiler/cmm/CLabel.hs @@ -1339,7 +1339,7 @@ instance Outputable ForeignLabelSource where internalNamePrefix :: Name -> SDoc internalNamePrefix name = getPprStyle $ \ sty -> - if codeStyle sty && isRandomGenerated then + if asmStyle sty && isRandomGenerated then sdocWithPlatform $ \platform -> ptext (asmTempLabelPrefix platform) else |