Ticket #856 (closed bug: fixed)

Opened 7 years ago

Last modified 5 years ago

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: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

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

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.

Change History

Changed 7 years ago by simonpj

  • owner set to igloo

Changed 6 years ago by igloo

  • milestone set to 6.8

Changed 5 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

Fixed in HEAD and 6.8 branch.

Note: See TracTickets for help on using tickets.