[GHC] #11211: Please add initial platform support for sparc64
GHC
ghc-devs at haskell.org
Sun Dec 13 12:38:12 UTC 2015
#11211: Please add initial platform support for sparc64
--------------------------------+----------------------------------------
Reporter: glaubitz | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2
Keywords: | Operating System: Linux
Architecture: Other | Type of failure: Building GHC failed
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
--------------------------------+----------------------------------------
Hello!
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[3]: *** [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.
Thanks,
Adrian
> [1]
https://buildd.debian.org/status/fetch.php?pkg=ghc&arch=sparc64&ver=7.10.3-3&stamp=1449983921
> [2] https://ghc.haskell.org/trac/ghc/ticket/3791
> [3]
https://git.haskell.org/ghc.git/commitdiff/9756690fe7aa26aee6955d0b720377d53170c542
> [4]
https://git.haskell.org/ghc.git/commitdiff/3b322660f82d0c7c4f7d02523367ebd0e34c5287
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11211>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list