GMP bug (?) - unable to build for ARM64 with assembly enabled
Andreas Buff
ab at pep.security
Wed Oct 14 10:59:24 UTC 2020
Hi,
We are cross building GMP for use on ARM64 iOS devices using this command:
```
export CFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH}
-miphoneos-version-min=${MIN_IOS_VERSION} -std=c99"
export LDFLAGS="-arch ${ARCH}"
export CC="$(whereis gcc) -arch ${ARCH} -isysroot ${SDK_PATH}"
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
./configure --host=${HOST} --prefix=$PREFIX
make -j4
make install
```
Where:
${ARCH}="arm64"
${SDK_PATH}=path to iOS14 SDK (failed also wirth previous SDK versions
MIN_IOS_VERSION="11.0"
${HOST}="arm-apple-darwin"
Error:
configure: error: Oops, mp_limb_t is 64 bits, but the assembler code
in this configuration expects 32 bits.
You appear to have set $CFLAGS, perhaps you also need to tell GMP the
intended ABI, see "ABI and ISA" in the manual.
Adding --disable-assembly to configure works.
I have tried several things from the manual with no success like setting
ABI=64 (-> "configure: error: ABI=64 is not among the following valid
choices: 32".
Can you please assist?
Best,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pEpkey.asc
Type: application/pgp-keys
Size: 6884 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20201014/515dbee7/attachment.bin>
More information about the gmp-bugs
mailing list