[GHC] #7620: Via-C unregistered QNX ARM build fails

GHC cvs-ghc at haskell.org
Sat Jan 26 19:55:12 CET 2013


#7620: Via-C unregistered QNX ARM build fails
------------------------------------------------------+---------------------
    Reporter:  singpolyma                             |       Owner:                     
        Type:  bug                                    |      Status:  new                
    Priority:  normal                                 |   Milestone:                     
   Component:  Compiler                               |     Version:  7.7                
    Keywords:  qnx unregistered via-c integer-simple  |          Os:  QNX                
Architecture:  arm                                    |     Failure:  Building GHC failed
  Difficulty:  Unknown                                |    Testcase:                     
   Blockedby:                                         |    Blocking:  7623               
     Related:                                         |  
------------------------------------------------------+---------------------

Comment(by psycotica0):

 Running
 {{{
 "inplace/bin/ghc-stage1" -static  -H64m -O0 -fasm    -package-name
 integer-simple-0.1.1.0 \
 -hide-all-packages -i -ilibraries/integer-simple/. -ilibraries/integer-
 simple/dist-install/build \
 -ilibraries/integer-simple/dist-install/build/autogen -Ilibraries/integer-
 simple/dist-install/build \
 -Ilibraries/integer-simple/dist-install/build/autogen -Ilibraries/integer-
 simple/.    -optP-include \
 -optPlibraries/integer-simple/dist-install/build/autogen/cabal_macros.h
 -package ghc-prim-0.3.1.0  \
 -package-name integer-simple -Wall -XHaskell98 -XCPP -XMagicHash
 -XBangPatterns -XUnboxedTuples \
 -XForeignFunctionInterface -XUnliftedFFITypes -XNoImplicitPrelude -O -fasm
 -no-user-package-db \
 -rtsopts      -odir libraries/integer-simple/dist-install/build -hidir
 libraries/integer-simple/dist-install/build \
 -stubdir libraries/integer-simple/dist-install/build -hisuf hi -osuf  o
 -hcsuf hc \
 -c libraries/integer-simple/./GHC/Integer/Type.hs \
 -o libraries/integer-simple/dist-install/build/GHC/Integer/Type.o
 }}}

 Which is what make runs, gives me the same error.
 Adding -keep-hc-file allows one to inspect the generated C-Code.

 The problem line looks like:
 {{{
 _s1ny = (_s1nj--2147483648) + (_s1nk + _s1ns);
 }}}

 Which is not valid.

 A few of the lines around use 0x80000000U, which happens to be the same
 binary value on 32-bit systems.
 It also corresponds to "half_bound_up" in the Type.hs that generated this
 bad C.

 So, I don't know if this issue is that the code generator should spit out
 (_s1nj-0x80000000U) like it does in other places, or if the issue is that
 it should spit out (_s1nj-(-2147483648)), but I don't know enough about
 the Code Generator to find it myself right now.

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



More information about the ghc-tickets mailing list