digitalmars.D - If you have osx arm64 and gcc (not clang) installed...
- Walter Bright (11/11) Apr 07 Can you please compile this program:
- Derek Fawcus (10/22) Apr 08 Do you specifically want what gcc on osx on ARM64 would produce,
- Walter Bright (4/14) Apr 08 Thank you for the information! I managed to pry the gcc ARM64 prolog byt...
- Brian Callahan (8/20) Apr 08 GCC 15.2.0 of macOS/aarch64 doesn't have that flag:
- jfourkiotis (2/14) Apr 13 Do you still need it ?
- Walter Bright (2/3) Apr 16 Thanks everyone for the help! I have it implemented and working now.
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.
Apr 07
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.
Apr 08
On 4/8/2026 10:23 AM, Derek Fawcus wrote:Do you specifically want what gcc on osx on ARM64 would produce, or gcc on ARM64?OSX does things differently. It has to be an osx specific compiler.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.Thank you for the information! I managed to pry the gcc ARM64 prolog bytes out of chatgpt.
Apr 08
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.GCC 15.2.0 of macOS/aarch64 doesn't have that flag: gcc: error: unrecognized command-line option ‘-femit-dwarf-unwind=always’ I'll have my MacBook Neo on me this weekend, and I'll bring a USB key with a full binary package of GCC 15.2.0 (gcc, g++, gdc, whatever other frontends you want) for macOS/aarch64 for you. ~Brian
Apr 08
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 still need it ?
Apr 13
On 4/13/2026 10:02 AM, jfourkiotis wrote:Do you still need it ?Thanks everyone for the help! I have it implemented and working now.
Apr 16









Walter Bright <newshound2 digitalmars.com> 