Cross compile GMP for Apple Silicon

Marc Glisse marc.glisse at
Wed Nov 18 23:15:31 UTC 2020

On Wed, 18 Nov 2020, Pierre Chatelier wrote:

> I tried to compile GMP on a x86_64 buidl machien to target apple silicon systems:
> ./configure --enable-fat --build=x86_64-apple-darwin13.0.0 --host=arm64-apple-darwin
> But this resulst in assembler code not being recognized :
> tmp-add_n.s:71:10: error: unknown token in expression
> cmp x4, #1
> I assume that GMP is not yet ready for the aamd64 architecture (or whatever its name)
> Are there plans for that ? (I could not find that information while browsing <>)

You don't mention what version of GMP you tried. There have been 
discussions related to arm64-apple-darwin in the past few months, check 
this list or gmp-bugs, and people did succeed with snapshots from master 
at the time.

> Secondary question : will the configure script support Universal binaries natively, or will it end to the developer's responsability to merge x_86_64 and aamd64 builds ? (lipo -create ...)

Most likely the packager's responsibility, doing it directly would 
complicate things a lot for no gain.

Marc Glisse

More information about the gmp-discuss mailing list