ARMmbed / homebrew-formulae

homebrew ("the missing package manager for OS X") formulae from the mbed team.
Apache License 2.0
126 stars 39 forks source link

arm-none-eabi-gcc-10.3.1: error: arm64 #32

Open jeanguerin opened 2 years ago

jeanguerin commented 2 years ago

Hello

Using you "brew install arm-none-eabi-gcc" command I just installed your toolchain. I am running a MacOS Monterey; with Apple M1 chip. Running cmake command I have this error :

Run Build Command(s):/usr/bin/make -f Makefile cmTC_972b1/fast && /Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/cmTC_972b1.dir/build.make CMakeFiles/cmTC_972b1.dir/build
    Building C object CMakeFiles/cmTC_972b1.dir/testCCompiler.c.o
    /opt/homebrew/bin/arm-none-eabi-gcc-10.3.1   -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk -o CMakeFiles/cmTC_972b1.dir/testCCompiler.c.o -c /Users/XXX/XXX/XXX/XXX/build/CMakeFiles/CMakeTmp/testCCompiler.c
    arm-none-eabi-gcc-10.3.1: error: **arm64: No such file or directory**
    arm-none-eabi-gcc-10.3.1: error: **unrecognized command-line option '-arch'; did you mean '-march='?**
    make[1]: *** [CMakeFiles/cmTC_972b1.dir/testCCompiler.c.o] Error 1
    make: *** [cmTC_972b1/fast] Error 2

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)

Is there a specific issue with Apple M1 Chip?

Sincerely yours,

Jean

jeanguerin commented 2 years ago

Hello,

Still not able to make it works. It seems that there is a workaround (here), but I don't really get it.

Any support?

Sincerely yours,

Jean

hmoazed commented 2 years ago

Seems it is still not working

ald2004 commented 1 year ago

stil now working.

p-riebs commented 1 year ago

This issue is not from this package. The make properties need to be set properly. For example, CMakeLists.txt needs to have the following lines before the project() line:

# Override the default system to cross-compile for ARM processors
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR ARM)

MacOS is automatically setting --arch as an argument without these properties.

namxam commented 1 year ago

I am running into the same issue. Any updates on it? Overriding those make properties does not seem to work for me.