Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,865
    • Issues 4,865
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 455
    • Merge requests 455
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #856
Closed
Open
Created Aug 09, 2006 by red5_2@hotmail.com@trac-red5_2

Build system issues on x86-64

I recently did a bootstrap of GHC 6.4.2 on x86-64 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 (closed)
  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.

Trac metadata
Trac field Value
Version 6.4.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Build System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Edited Mar 27, 2021 by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking