#5407: ghc-7.2.1 build failed on sparc solaris with non-GNU linker
------------------------+---------------------------------------------------
    Reporter:  maeder   |       Owner:                     
        Type:  bug      |      Status:  new                
    Priority:  normal   |   Component:  Compiler           
     Version:  7.0.4    |    Keywords:                     
    Testcase:           |   Blockedby:                     
          Os:  Solaris  |    Blocking:                     
Architecture:  sparc    |     Failure:  Building GHC failed
------------------------+---------------------------------------------------

Comment(by maeder):

 This failure (also present in ghc-7.2.1.20111103) is caused by the `-no-
 relax` flag set in `compiler/main/DriverPipeline.hs` (line 2000)

 {{{
                             -- gcc on sparc sets -Wl,--relax implicitly,
 but
                             -- -r and --relax are incompatible for ld, so
                             -- disable --relax explicitly.
                          ++ (if platformArch (targetPlatform dflags) ==
 ArchSPARC
                                 then [SysTools.Option "-Wl,-no-relax"]
                                 else [])
 }}}

 I don't know if it would work if gcc used a gnu-linker. Currently I'm
 trying without this flag and get:

 {{{
 "inplace/bin/ghc-stage1"   -H32m -O    -package-name base-4.4.1.0 -hide-
 all-packages -i -ilibraries/base/. -ilibraries/base/dist-install/build
 -ilibraries/base/dist-install/build/autogen -Ilibraries/base/dist-
 install/build -Ilibraries/base/dist-install/build/autogen
 -Ilibraries/base/include   -optP-DOPTIMISE_INTEGER_GCD_LCM -optP-include
 -optPlibraries/base/dist-install/build/autogen/cabal_macros.h -package
 ghc-prim-0.2.0.0 -package integer-gmp-0.3.0.0 -package rts-1.0 -split-objs
 -package-name base -XHaskell98 -XCPP -O2 -no-user-package-conf -rtsopts
 -odir libraries/base/dist-install/build -hidir libraries/base/dist-
 install/build -stubdir libraries/base/dist-install/build -hisuf hi -osuf
 o -hcsuf hc -c libraries/base/./GHC/Exception.lhs -o libraries/base/dist-
 install/build/GHC/Exception.o
 ghc-stage1: panic! (the 'impossible' happened)
   (GHC version 7.2.1.20111103 for sparc-sun-solaris2):
         iselExpr64(sparc) 13419740508176834782 :: W64

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

 gmake[1]: *** [libraries/base/dist-install/build/GHC/Exception.o] Fehler 1
 gmake: *** [all] Fehler 2
 }}}

 which looks like a 32 vs. 64 bit mismatch wrt GMP.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5407#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to