Hi Romain, > On 2 Nov 2021, at 20:12, Romain Goyet <romain.go...@numworks.com> wrote: >
> Thanks for your reply! However, what I'm referring to is a lot more simple > than that: I just want to build bare-metal binaries for Cortex-M devices from > a Darwin/arm64 host. Not to produce Mach-O binaries that can run on > Darwin/arm64. > Essentially, I just made the toolchain at > https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm > run on macOS/arm64. It still only produces Cortex-M ELF binaries. Right, the host-side support is a small set of patches from the larger project to make ‘native' aarch64 support. by host-side I just mean enough to be able to build a cross-compiler (e.g. using clang) that runs on aarch64-darwin and produces output for some other target - I believe that is your intent as you describe here. > I'm looking for the right person at Arm to help them ship a pre-built arm64 > image on the page above. I'm really trying to solve a very practical problem. > My patches are super simple: > - Fix their build-prerequisite.sh and build-toolchain.sh scripts > - Fix GMP so it uses the proper macOS syntax on Arm > - Fix libelf so it picks up stdlib.h ^^^ these are patches that would need to be sent to the appropriate “upstream” for the project in question - we don’t keep local patches to GMP or libelf in the GCC tree. > - Fix a gcc-hook OK, then please post that patch here, and we’ll take a look. FWIW, I would expect for a general solution you’d need to deal (somehow) with the PCH issue ( I guess for embedded you might not care about Ada ;) ) Iain