Please add initial platform support for sparc64
I have successfully bootstrapped ghc for sparc64 on Debian unstable by cross-compiling it on amd64, then installing it manually into a build root and rebuild the Debian package.
Unfortunately, the buildds can currently neither compile ghc itself nor any Haskell packages as gcc always passes "-relax" to the GNU linker which will fail as ghc passes "-Wl,-r" (1):
"/usr/bin/ghc" -hisuf hi -osuf o -hcsuf hc -static -H32m -O -lffi -optl-pthread -package-db libraries/bootstrapping.conf -this-package-key termi_6iVf4EBnOgfIaaOCLRs8jl -hide-all-packages -i -ilibraries/terminfo/. -ilibraries/terminfo/dist-boot/build -ilibraries/terminfo/dist-boot/build/autogen -Ilibraries/terminfo/dist-boot/build -Ilibraries/terminfo/dist-boot/build/autogen -Ilibraries/terminfo/. -optP-include -optPlibraries/terminfo/dist-boot/build/autogen/cabal_macros.h -package-key base_HQfYBxpPvuw8OunzQu6JGM -Wall -XHaskell2010 -no-user-package-db -rtsopts -odir libraries/terminfo/dist-boot/build -hidir libraries/terminfo/dist-boot/build -stubdir libraries/terminfo/dist-boot/build -c libraries/terminfo/./System/Console/Terminfo/Base.hs -o libraries/terminfo/dist-boot/build/System/Console/Terminfo/Base.o /usr/bin/ld: --relax and -r may not be used together collect2: error: ld returned 1 exit status make: *** [libraries/terminfo/dist-boot/build/System/Console/Terminfo/Base.o] Error 1 libraries/terminfo/ghc.mk:3: recipe for target 'libraries/terminfo/dist-boot/build/System/Console/Terminfo/Base.o' failed
This issue has already been fixed in ghc but that was for sparc only and not sparc64 (2).
Thus, in order to be able to apply the same fix from (2), ghc needs to add sparc64 to its list of known architectures (currently "sparc64" matches to "ArchUnknown" in aclocal.m4") and then extend the fix from (2) to match *both* sparc *and* sparc64 (please don't drop sparc here).
In particular, I suggest adding sparc64 in the same way that Alpha, Mipseb and Mipsel were added (3), thus matching "sparc64" to "ArchSPARC64", then extending the if-clause from (4) to set "-Wl,-no-relax" for *both* ArchSPARC *and* ArchSPARC64.