Opened 3 years ago

Closed 3 years ago

#17191 closed bug (fixed)

Fix GCC cross-compiler building on Apple Silicon

Reported by: przemub Owned by: nobody
Priority: normal Milestone: R1/beta4
Component: Build System Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

This patch, adapted from here, fixes the error below occurring when trying to build an ARM cross-compiler on macOS with M1 CPU.

Undefined symbols for architecture arm64:
  "_host_hooks", referenced from:
      c_common_no_more_pch() in c-pch.o
      toplev::main(int, char**) in libbackend.a(toplev.o)
      gt_pch_save(__sFILE*) in libbackend.a(ggc-common.o)
      gt_pch_restore(__sFILE*) in libbackend.a(ggc-common.o)
ld: symbol(s) not found for architecture arm64

Maybe the recent introduction of ARM into mainstream desktop computing by Apple will get someone interested in pushing forward our ARM port :)

Attachments (1)

apple_silicon.patch (1.2 KB ) - added by przemub 3 years ago.
Patch

Download all attachments as: .zip

Change History (5)

by przemub, 3 years ago

Attachment: apple_silicon.patch added

Patch

comment:1 by korli, 3 years ago

Any chance you submit that patch at the buildtools repository, see https://www.haiku-os.org/guides/building/get-source-git/

comment:2 by korli, 3 years ago

Owner: changed from bonefish to nobody
Status: newassigned

comment:3 by przemub, 3 years ago

@korli

Here it is: https://review.haiku-os.org/c/buildtools/+/4329 Thanks for letting me know.

comment:4 by korli, 3 years ago

Milestone: UnscheduledR1/beta4
Resolution: fixed
Status: assignedclosed

Patch was applied in btrev43167 and amended in btrev43192

Note: See TracTickets for help on using tickets.