-
Notifications
You must be signed in to change notification settings - Fork 447
Build failure OS X: illegal options for BSD ar #353
Comments
Update: mixing toolchains (i.e. using the GNU
Some light googling supports that the 'building for macOS-x86_64 but linking for macOS-x86_64' is indeed a symptom of trying to mix toolchains. |
The GNU toolchain has a lot of assumptions that it will be used with gnu tools, and riscv-gnu-toolchain can't fix this. So yes, you need to use gnu tools as much as possible when building it. Using homebrew is recommended. I don't have access to a Mac, so I've never tested builds on Mac OS X. You might try asking someplace like the FSF GCC gcc-help mailing list. The SiFive freedom-tools github repo has support for building on Mac OS X. But it only supports building a cross compiler for embedded elf so I don't know if that is helpful or not. |
Trying to build on OS X fails around
make: *** [libfesvr.a] Error 1
. Digging into this a bit, it is because the build relies on GNU-onlyar
options:Where
/usr/bin/ar
, the defaultar
is the version installed natively on Mac, while:is the GNU version installed via
brew install binutils
.The text was updated successfully, but these errors were encountered: