Opened 4 years ago

Closed 4 years ago

#9935 closed bug (fixed)

Can't compile rts/StgCRun.c for aarch64-linux

Reported by: erikd Owned by: erikd
Priority: normal Milestone: 7.10.1
Component: Compiler Version: 7.11
Keywords: Cc:
Operating System: Linux Architecture: aarch64
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): D599
Wiki Page:

Description (last modified by erikd)

When building an x86_64-linux to aarch64-linux cross-compiling I get:

rts/StgCRun.c: In function ‘StgRun’:

rts/StgCRun.c:756:5:
     error: unknown register name ‘%lr’ in ‘asm’
         __asm__ volatile (

It seems the asm code here is for iOS and does not work for Linux. Have a patch in progress.

Change History (6)

comment:1 Changed 4 years ago by erikd

Architecture: Otheraarch64

comment:2 Changed 4 years ago by erikd

Differential Rev(s): D599

comment:3 Changed 4 years ago by erikd

Description: modified (diff)

comment:4 Changed 4 years ago by Erik de Castro Lopo <erikd@…>

In b9063703301f0d902b4bb2eb28ac27e9bc050ea0/ghc:

RTS : Fix StgRun for aarch64-linux (#9935).

Summary:
The GCC assembler doesn't seem to recognise the 'fp' and 'lr' register
names which are aliases for 'x29' and 'x30' respectively.

Depends on D598.

Test Plan: validate

Reviewers: lukexi, bgamari, austin

Reviewed By: austin

Subscribers: carter, thomie

Differential Revision: https://phabricator.haskell.org/D599

GHC Trac Issues: #9935

comment:5 Changed 4 years ago by erikd

Status: newmerge

comment:6 Changed 4 years ago by thoughtpolice

Milestone: 7.10.1
Resolution: fixed
Status: mergeclosed

Merged to ghc-7.10 (via 5f2af6646067a6a66afa450c42482b5723172593).

Note: See TracTickets for help on using tickets.