[GHC] #13696: rts/linker/ElfTypes.h does not compile on most of UNREG arches (and some registerised arches)
GHC
ghc-devs at haskell.org
Sun May 14 19:34:37 UTC 2017
#13696: rts/linker/ElfTypes.h does not compile on most of UNREG arches (and some
registerised arches)
-------------------------------------+-------------------------------------
Reporter: slyfox | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3583
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Sergei Trofimovich <slyfox@…>):
In [changeset:"d5414dd61b540be3b3945c321065a1c70c7962ac/ghc" d5414dd/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="d5414dd61b540be3b3945c321065a1c70c7962ac"
rts/linker/ElfTypes.h: restore powerps (and others) support
GHC build fails for powerpc-unknown-linux-gnu
and hppa-unknown-linux-gnu targets as:
rts_dist_HC rts/dist/build/RtsStartup.o
rts/linker/ElfTypes.h:23:4: error:
error: #error "Unsupported arch!"
Before the change code tried to whitelist architectures
and classify them into ELF32/ELF64. It does not work
for UNREG arches like 'hppa', 'sparc64', 'm68k', 'mips'.
It is nuanced for things like mips64 and x86_64:
'mips64-unknown-linux-gnu-gcc -mabi=64' is ELFCLASS64
'mips64-unknown-linux-gnu-gcc' is ELFCLASS32
'x86_64-pc-linux-gnu-gcc' is ELFCLASS64
'x86_64-pc-linux-gnu-gcc -mx32' is ELFCLASS32
Here it's not enough to know HOST_ARCH. We really need to
know ABI.
The change uses '__LP64__' as a proxy for ELFCLASS64.
Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
Reviewers: angerman, simonmar, austin, bgamari, erikd
Reviewed By: angerman, bgamari, erikd
Subscribers: rwbarton, thomie
GHC Trac Issues: #13696
Differential Revision: https://phabricator.haskell.org/D3583
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13696#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list