ITADN

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

#127Openaislynn-ortega 创建于 2024-12-28
A
aislynn-ortegacommented
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](https://github.com/riscv-software-src/homebrew-riscv/issues/47) and the workaround is mentioned [here](https://github.com/riscv-software-src/homebrew-riscv/issues/47#issuecomment-772306695) 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 ```
0 条评论