Re:Apple's M4 Max chip is the fastest single-core performer ...
by robotresearcher on Saturday November 02, 2024 @09:15PM
(#42030500)
How about Xcode's LLVM on an Intel Mac building for ARM iOS?
Re:Apple's M4 Max chip is the fastest single-core performer ...
by 0x457 on Sunday November 03, 2024 @01:46PM
(#42035151)
Two things here:
- clang and LLVM don't have that GCC quirk (LLVM support less platforms, so give gcc some credit)
- it was in apple's financial interest make sure their things are easy to cross-compile.
- linker job is extremely straighforward in case of iOS
- everything is provided by either apple or application developer
Then there are some gcc quirks:
- for gcc compilation target is defined when gcc is compiled, so only way to cross-compile with gcc that I know of is emulation of target arch and runing gcc for target arch
However, we're talking about docker containers here, emulation would be the default way and path of least resistance.
Again, I will reiterate: every cross-compilation strategy falls into one of these two buckets. In some cases what I've describe in #1 is possible (WASM, java bytecode or really (almost) anything that targets a VM), in some cases it isn't and then you gotta go with #2 (docker, gcc)