#2951: Add support for amd64-solaris2 platform
--------------------------------+-------------------------------------------
    Reporter:  kgardas          |        Owner:  simonmar   
        Type:  feature request  |       Status:  new        
    Priority:  normal           |    Milestone:  6.12 branch
   Component:  Compiler         |      Version:  6.10.1     
    Severity:  normal           |   Resolution:             
    Keywords:                   |   Difficulty:  Unknown    
    Testcase:                   |           Os:  Solaris    
Architecture:  x86_64 (amd64)   |  
--------------------------------+-------------------------------------------
Comment (by kgardas):

 It seems that config.guess always is using `cc' compiler (as it is
 installed) otherwise it would use gcc. i.e. cc is on the first try. The
 issue is that current config.guess is buggy while invoked from bash. i.e.
 code like:

 {{{
 if echo '\n#ifdef __amd64\nIS_64BIT_ARCH\n#endif' | \
                (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
                grep IS_64BIT_ARCH >/dev/null
 }}}

 should generate following C code:
 {{{

 #ifdef __amd64
 IS_64BIT_ARCH
 #endif
 }}}

 but if invoked in bash, then it generates this code:
 {{{
 \n#ifdef __amd64\nIS_64BIT_ARCH\n#endif
 }}}

 which C preprocessor leaves as it is and following grep finds IS_64BIT and
 config.guess things it's detecting AMD64 platform correctly.

 So yes, if I invoke config.guess from the command line, it's run by
 /bin/sh and it generates correct C code and reports i386-pc-solaris2
 platform. The problem is that configure seems to always run config.guess
 by bash and so config.guess generates bad C code and reports x86_64
 platform.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2951#comment:11>
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