Closed andriytk closed 3 years ago
I merged this, thank you
I should have asked though: have you tested this on other arch's?
No, but when I tried to compile the same hs code on x86_64 which was failing to compile on arm64 into C-code (I was curious how it works there without the patch) - it gave me:
ghc: the option -C is only available with an unregisterised GHC
Apparently, ghc-8.0.2 is registerised on x86_64, which means it does not compile the Haskell code into transient C-code to make the object file from it with C-compiler, like it does on arm64 (and where it was failing for me because of the missing macros). So I don't think the patch will affect anything on x86_64.
Unfortunately, I don't have opportunity to check it on the other platforms where GHC is unregisterised (like s390x mentioned in the issue), but I suppose the patch would help there also.
Here are the built rpms - https://github.com/andriytk/ghc/releases/tag/ghc84cs7arm64
The issue similar to https://gitlab.haskell.org/ghc/ghc/-/issues/15201 is fixed by adding the old EI and II macros to includes/Stg.h from ghc-8.0/8.2.
Tested on CentOS-7.9 aarch64 with ghc-8.0.2.