riscv-software-src / homebrew-riscv

homebrew (macOS) packages for RISC-V toolchain
https://riscv.org
314 stars 49 forks source link

enable llvm when gcc is linked to clang #105

Closed howjmay closed 10 months ago

howjmay commented 1 year ago

For unknown reason, gdb can't be compiled, since libgmp linking error. This bypass gdb compilation as a workaround.

This solved the issue presented in #102

closes #104

sbeamer commented 1 year ago

Are you sure about the meaning of this flag? Looking at the source, it seems to turn on building llvm, and is independent of the compiler used (https://github.com/riscv-collab/riscv-gnu-toolchain/blob/6e7190e8c95e09d541e69f6f6e39163f808570d5/configure#L1342).

Macs for quite a few years have had gcc linked to clang, and making gcc be actually gcc takes deliberate effort. Most users of this repo (including myself who builds the bottles), uses the default Apple compiler which is clang linked as gcc.

howjmay commented 1 year ago

I am using Mac M1 Version 13.2.1. On my machine gcc is linked to clang. And I met a errors I reported. I solved the errors by using gcc instead of clang. To be honest, I don't know the exact reason that why other people can use the original formula to install.

didikamalova commented 1 year ago

I'm hitting the same issue in #102. Running on a macOS M1 14.0.

howjmay commented 1 year ago

I'm hitting the same issue in #102. Running on a macOS M1 14.0.

Hey @didikamalova. Did you solve it by my branch?

didikamalova commented 1 year ago

I'm hitting the same issue in #102. Running on a macOS M1 14.0.

Hey @didikamalova. Did you solve it by my branch?

No, it didn't work for me

howjmay commented 1 year ago

I'm hitting the same issue in #102. Running on a macOS M1 14.0.

Hey @didikamalova. Did you solve it by my branch?

No, it didn't work for me

@didikamalova I retried again, now I can't build it too😭

howjmay commented 1 year ago

@didikamalova I think now it works