2026-07-21 07:55 UTC
Replies (6)
-
@brouhaha@mastodon.social 2026-07-21 23:32
@revk@toot.me.uk I knew GCC had the nested functions extension, and I've sometimes been tempted to use it, but I've resisted in the interest of portability. I used nested functions a fairly bit in Pascal and Ada. I am slightly curious as to whether the GCC implementation uses a display vector, or a static link in the stack frame. But not curious enough to actually try it myself. Good luck with your GCC on Mac issues. Sorry I don't have any advice on that.
-
@revk@toot.me.uk 2026-07-21 11:09
OK, I think I am stuck. Looks like issue with gcc may be Apple not doing intel / rosetta stone or some such, so need arm gcc. But looks like glibc in brew is not arm, so build from source, OK But that needs linux-headers But that says it needs Linux Arrrrg!
-
@revk@toot.me.uk 2026-07-23 14:39
Looks like gcc-16 works, if not for PATH set by ESP IDF for as that is cross compiler, FFS.
-
@kris@todon.eu 2026-07-21 08:03
@revk@toot.me.uk Maybe too much novelty budget for you, but i would strongly recommend looking at the zig build system. It is very good at multi-platform stuff, and even effortless cross-compiling. Check out this organization if you want examples on how it's done https://github.com/allyourcodebase
-
@madkiwi@mastodon.world 2026-07-21 09:17
@revk@toot.me.uk I believe that the Apple gcc doesn't supported nested functions. The brew installed gcc-16 does support nested functions. I presume you just ran, 'brew install gcc' ? Can you confirm that its been installed correctly, gcc-16 -v
-
@trode@hachyderm.io 2026-07-23 14:21
@revk@toot.me.uk Macports is going to have better support for compilers and related tool than homebrew. You might consider that