[GHC] #856: Build system issues on ia64

GHC trac at galois.com
Wed Aug 9 11:24:22 EDT 2006


#856: Build system issues on ia64
-----------------------------------+----------------------------------------
    Reporter:  red5_2 at hotmail.com  |        Owner:         
        Type:  bug                 |       Status:  new    
    Priority:  normal              |    Milestone:         
   Component:  Build System        |      Version:  6.4.2  
    Severity:  normal              |     Keywords:         
          Os:  Linux               |   Difficulty:  Unknown
Architecture:  ia64                |  
-----------------------------------+----------------------------------------
I recently did a bootstrap of GHC 6.4.2 on ia64 linux, with glibc 2.2, gcc
 3.2, using a 64-bit x86 system as the host for building the HC files.  I
 had to work out three problems to get the build to work:

 1. Ticket #841

 2. In ghc/rts/Makefile, there is the line `WAYS=$(GhcLibWays)
 $(GhcRTSWays)`.  Later, WAYS is tested against the empty string.  This
 test does not succeed because WAYS gets the value " "; then, in code
 guarded by this test, syntax errors occur because WAYS is expected to
 contain more than whitespace.  The solution was to change the line to
 `WAYS=$(strip $(GhcLibWays) $(GhcRTSWays))`.

 3. The linker on ia64 will fail with "relocation truncated to fit"
 messages if the offset of a relative address instruction's immediate
 operand is too big.  This happens when linking the compiler.  If given the
 '--relax' flag, the linker will fix things up. (I'm not quite sure how it
 works.)  I added the following to the "C compiler" section of
 mk/config.mk.in:

 {{{
 ifeq "$(HOSTPLATFORM)" "ia64-unknown-linux"
 # needed for generating proper relocation in large binaries
 SRC_CC_OPTS += -Wl,--relax
 SRC_HC_OPTS += -optl-Wl,--relax
 endif
 }}}

 This works, but it also produces annoying warnings that the flag is
 ignored when compiling .c or .hc files to .o files.  Also, it should
 probably be a test of the architecture, not the platform.

-- 
Ticket URL: <http://cvs.haskell.org/trac/ghc/ticket/856>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list