#5914 closed bug (fixed)
armhf build fails in Ubuntu (7.4.1)
| Reported by: | Owned by: | simonmar | |
|---|---|---|---|
| Priority: | high | Milestone: | 7.6.1 |
| Component: | Compiler (LLVM) | Version: | 7.4.1 |
| Keywords: | Cc: | dterei, juhp@… | |
| Operating System: | Linux | Architecture: | arm |
| Type of failure: | Building GHC failed | Test Case: | |
| Blocked By: | Blocking: | ||
| Related Tickets: | Differential Rev(s): | ||
| Wiki Page: |
Description
The ARM code generator calls llc in the same way regardless of the ABI being used. When the hardfloat EABI variant is in use - armhf in Debian/Ubuntu, llc needs to be passed -float-abi=hard. This may mean the build scripts need to detect armel vs armhf and have a config option snippet in compiler/main/DriverPipeline.hs I made a successful build on armhf by just piggybacking it to check it works.
else if (elem VFPv3D16 ext)
- then -mattr=+v7,+vfp3?
+ then ["-mattr=+v7,+vfp3, "-float-abi=hard"]
BTW for Debian/Ubuntu we will need +d16 passed there, but it is not strictly related to the build failure on armhf.
Attachments (1)
Change History (13)
comment:1 Changed 6 years ago by
| Architecture: | Unknown/Multiple → arm |
|---|---|
| Component: | Compiler → Compiler (LLVM) |
| Operating System: | Unknown/Multiple → Linux |
| Owner: | set to dterei |
| Type of failure: | None/Unknown → Building GHC failed |
comment:2 Changed 6 years ago by
| Owner: | changed from dterei to kgardas |
|---|
comment:3 Changed 6 years ago by
| Cc: | dterei added |
|---|
comment:4 Changed 6 years ago by
Hello, I'll attempt to install hard-float ARM OS over the weekend and will give it a try.
comment:5 Changed 6 years ago by
Latest ghc packages in Debian sid and Ubuntu precise have the workaround (passing -float-abi=hard to llc on armhf)
comment:6 Changed 6 years ago by
Thanks, indeed, this is needed info, but I'll first attempt to fix that on GHC HEAD.
comment:7 Changed 6 years ago by
| Cc: | juhp@… added |
|---|
Changed 6 years ago by
| Attachment: | 0001-add-support-for-ARM-hard-float-ABI-fixes-5914.patch added |
|---|
Patch adding ARM hard-float ABI support
comment:8 Changed 6 years ago by
comment:9 Changed 6 years ago by
| difficulty: | → Unknown |
|---|---|
| Milestone: | → 7.6.1 |
| Owner: | changed from kgardas to simonmar |
| Priority: | normal → high |
I'll test and apply, thanks.
comment:10 Changed 6 years ago by
commit 3144f85661da176e3d80f28d652b42245becde09
Author: Karel Gardas <karel.gardas@centrum.cz>
Date: Wed Apr 25 09:04:50 2012 +0200
add support for ARM hard-float ABI (fixes #5914)
This patch enhances Platform's ArchARM to include ARM ABI value. It also
tweaks configure machinery to detect hard-float ABI and to set it wherever
needed. Finally when hard-float ABI is in use, pass appropriate compiler
option to the LLVM's llc. Fixes #5914.
aclocal.m4 | 2 +-
compiler/main/DriverPipeline.hs | 16 +-
compiler/nativeGen/AsmCodeGen.lhs | 2 +-
compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs | 56 ++--
compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs | 14 +-
compiler/nativeGen/RegAlloc/Linear/Main.hs | 14 +-
compiler/nativeGen/TargetReg.hs | 70 ++--
compiler/utils/Platform.hs | 12 +-
config.guess | 482 ++++++++++----------
configure.ac | 14 +
10 files changed, 345 insertions(+), 337 deletions(-)
comment:11 Changed 6 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Optimistically closing the ticket, please re-open if there's still a problem.
comment:12 Changed 6 years ago by
Thanks, I tested the patch on ghc-7.4.2 RC2 on Fedora:
http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=839158 (test build)
and it built successfully. So probably will move to this patch for Fedora's ghc-7.4.2.

Re-assigning as ARM stuff isn't handled by me.