Opened 9 years ago

Closed 7 years ago

#856 closed bug (fixed)

Build system issues on ia64

Reported by: red5_2@… Owned by: igloo
Priority: normal Milestone: 6.8 branch
Component: Build System Version: 6.4.2
Keywords: Cc:
Operating System: Linux Architecture: ia64
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

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
  1. 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)).
  1. 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.

Change History (3)

comment:1 Changed 9 years ago by simonpj

  • Owner set to igloo

comment:2 Changed 8 years ago by igloo

  • Milestone set to 6.8

comment:3 Changed 7 years ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in HEAD and 6.8 branch.

Note: See TracTickets for help on using tickets.