Closed vitock closed 2 years ago
Sure we support cross-compilation.
This description is very vague and generalized as I never used a iThing and I don't plan to.
You need your cross toolchain installed and then you have multiple ways:
Either by using the traditional makefiles with GNU make (gmake
) ... you also need to find out your toolchain triplet, I'll call it arm64-apple-m1-
which is certainly wrong ...
...
cd libtommath
export CROSS_COMPILE=arm64-apple-m1-
# for a static library
gmake
# for a shared library
gmake -f makefile.shared
or via CMake and an appropriate toolchain file ... should be something like
...
cd libtommath/build
cmake --toolchain=/path/to/YourToolchainConfig.cmake ..
make
I will also add this to the documentation.
In case you have issues with cross-compiling the library, please ask in a forum that deals with this kind of issues. This is no problem of libtommath.
In case you have issues with the library please feel free to open another issue.
how to build for arm64 (M1 mac or iPhone ) on my mac?