Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

M1 Mac support #330

Open
xhw1 opened this issue Jan 18, 2021 · 1 comment
Open

M1 Mac support #330

xhw1 opened this issue Jan 18, 2021 · 1 comment

Comments

@xhw1
Copy link

xhw1 commented Jan 18, 2021

Hi,

Is there a way to install riscv-tools on m1 Macs?
when I run brew install riscv-tools I got error:

==> Installing riscv/riscv/riscv-tools dependency: riscv-gnu-toolchain
		==> ./configure --prefix=/opt/homebrew/Cellar/riscv-gnu-toolchain/master
==> make
Last 15 lines from /Users/xiaohan/Library/Logs/Homebrew/riscv-gnu-toolchain/02.make:
      toplev::main(int, char**) in libbackend.a(toplev.o)
      gt_pch_save(__sFILE*) in libbackend.a(ggc-common.o)
      gt_pch_save(__sFILE*) in libbackend.a(ggc-common.o)
      gt_pch_restore(__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
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [cc1] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [cc1plus] Error 1
rm gcov.pod fsf-funding.pod lto-dump.pod gpl.pod cpp.pod gfdl.pod gcc.pod gcov-dump.pod gcov-tool.pod
make[1]: *** [all-gcc] Error 2
make: *** [stamps/build-gcc-newlib-stage1] Error 2
@jim-wilson
Copy link
Collaborator

No. riscv-tools needs a gcc cross compiler, and a cross compiler still needs info about the build system (i.e. the M1 Mac) so it can figure out how to translate stuff from the build system to the target system. FSF GCC currently has no build system support for M1 Macs. This needs to be added upstream, and then pulled down into riscv-gnu-toolchain. That could be a while. See for instance riscv-collab/riscv-gnu-toolchain#800

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants