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
The change uses 'LP64' as a proxy for ELFCLASS64.
Signed-off-by: Sergei Trofimovich <email@example.com>
Reviewers: angerman, simonmar, austin, bgamari, erikd
Reviewed By: angerman, bgamari, erikd
Subscribers: rwbarton, thomie
GHC Trac Issues: Trac #13696
Differential Revision: https://phabricator.haskell.org/D3583