Skip to content

Undefined symbols for architecture arm64: "_host_hooks" – Apple Silicon #127

@aislynn-ortega

Description

@aislynn-ortega

I'm trying to build the toolchain on a Macbook M3 Pro and I'm getting this error.

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

It's related to this and the workaround is mentioned here

What I did was to, basically, comment these lines on `build/gcc-7.2.0/gcc/config.host

case ${host} in
  *-darwin*)
    # Generic darwin host support.
    #out_host_hook_obj=host-darwin.o
    #host_xmake_file="${host_xmake_file} x-darwin"
    ;;  
esac

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions