[GHC] #10383: AArch64: get GHC Calling convention working
GHC
ghc-devs at haskell.org
Thu Oct 8 03:43:46 UTC 2015
#10383: AArch64: get GHC Calling convention working
----------------------------------------+-------------------------------
Reporter: erikd | Owner: erikd
Type: feature request | Status: new
Priority: normal | Milestone: 8.0.1
Component: Compiler | Version: 7.11
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: aarch64
Type of failure: Building GHC failed | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
----------------------------------------+-------------------------------
Comment (by erikd):
Oh wow, that is embarrassing!
Rechecked the `mk/build.mk` file and found that `BuildFlavour` was not
set. Not sure what the hell it was building.
Anyway, setting `BuildFlavour=quick-llvm` I then get:
{{{
"inplace/bin/ghc-stage1" -static -O0 -H64m -fllvm -Iincludes
-Iincludes/dist
-Iincludes/dist-derivedconstants/header -Iincludes/dist-
ghcconstants/header
-Irts -Irts/dist/build -DCOMPILING_RTS -this-package-key rts -dcmm-lint
-i
-irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build
-Irts/dist/build/autogen -O2 -c rts/PrimOps.cmm -o
rts/dist/build/PrimOps.o
0 libLLVM-3.6.so.1 0x0000007f787be130
llvm::sys::PrintStackTrace(_IO_FILE*)
+ 48 Stack dump:
0. Program arguments: /usr/bin/llc-3.6 -O3 -relocation-model=static
/tmp/ghc17942_0/ghc_5.bc -o /tmp/ghc17942_0/ghc_6.lm_s --enable-
tbaa=true
1. Running pass 'Function Pass Manager' on module
'/tmp/ghc17942_0/ghc_5.bc'.
2. Running pass 'Greedy Register Allocator' on function
'@"stg_atomically_frame_info$def"'
`llc-3' failed in phase `LLVM Compiler'. (Exit code: -11)
rts/ghc.mk:246: recipe for target 'rts/dist/build/PrimOps.o' failed
}}}
Seeing LLVM 3.6 break like this, I hacked `configure.ac` to accept
`llvm-3.7` and then got:
{{{
You are using a new version of LLVM that hasn't been tested yet!
We will try though...
/usr/bin/opt-3.7: /tmp/ghc24454_0/ghc_3.ll:22:21: error: expected comma
after
load's type
%lnI = load i64** %Sp_Var
^
`opt-3' failed in phase `LLVM Optimiser'. (Exit code: 1)
}}}
It seems the LLVM IR has changed between llvm-3.6 and llvm-3.7 (again).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10383#comment:24>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list