If you have osx arm64 and gcc (not clang) installed...
Derek Fawcus
dfawcus+dlang at employees.org
Wed Apr 8 17:23:44 UTC 2026
On Tuesday, 7 April 2026 at 22:56:37 UTC, Walter Bright wrote:
> Can you please compile this program:
> ```C
> #include <stdio.h>
>
> extern int foo(int *pi);
>
> int main() { int i = 7; return foo(&i); }
> ```
> with:
>
> gcc -c -femit-dwarf-unwind=always test.c
>
>
> and pls send me the resulting .o file. The reason I ask is
> because it turns out that gcc on the Mac is actually clang, and
> clang won't emit the dwarf eh_frame stuff. I need an example to
> make sure I'm doing it right.
Do you specifically want what gcc on osx on ARM64 would produce,
or gcc on ARM64?
I have an ARM mac to hand, and have an ARM64 Linux VM within it,
containing gcc. So I could compile under the latter. You could
also, just install UTM and then an ARM64 debian VM within it.
Alternately, there is a guide for compiling gcc 13 from scratch
for ARM online, intended specifically for the osx scenario. You
could follow that. I did for a non ARM device simply as I wanted
a copy of gcc-13 which wasn't packaged for my Linux system.
More information about the Digitalmars-d
mailing list