forked from aleaxit/gmpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert part of aleaxit#341 related to arm64 builds (now a separate jo…
…b again)
- Loading branch information
1 parent
3301888
commit 8649f9e
Showing
2 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
GMP_VERSION=6.2.1 | ||
MPFR_VERSION=4.1.1 | ||
MPC_VERSION=1.2.1 | ||
export CPPFLAGS=" --target=arm64-apple-macos11" | ||
export LDFLAGS=" -arch arm64" | ||
EXTRA="--build=x86_64-apple-darwin --host=aarch64-apple-darwin --target=aarch64-apple-darwin" | ||
if [ ! -f finish_before_ci_build ]; then | ||
if [[ "$OSTYPE" == "linux-gnu" || "$OSTYPE" == "linux-musl" || "$OSTYPE" == "darwin"* ]]; then | ||
echo $PWD | ||
curl -O https://ftp.gnu.org/gnu/gmp/gmp-${GMP_VERSION}.tar.xz | ||
tar -xf gmp-${GMP_VERSION}.tar.xz | ||
cd gmp-${GMP_VERSION} | ||
patch -N -Z -p0 < ../scripts/patch-arm64.diff | ||
cd .. | ||
# need to set host to the oldest triple to avoid building binaries | ||
# that use build machine micro-architecure. configfsf.guess is the one that | ||
# comes with autotools which is micro-architecture agnostic. | ||
# config.guess is a custom gmp script which knows about micro-architectures. | ||
cd gmp-${GMP_VERSION} && ./configure $EXTRA --enable-fat && make -j4 && make install && cd ../ | ||
curl -O -k https://ftp.gnu.org/gnu/mpfr/mpfr-${MPFR_VERSION}.tar.gz | ||
tar -xf mpfr-${MPFR_VERSION}.tar.gz | ||
cd mpfr-${MPFR_VERSION} && ./configure $EXTRA && make -j4 && make install && cd ../ | ||
curl -O https://ftp.gnu.org/gnu/mpc/mpc-${MPC_VERSION}.tar.gz | ||
tar -xf mpc-${MPC_VERSION}.tar.gz | ||
cd mpc-${MPC_VERSION} && ./configure $EXTRA && make -j4 && make install && cd ../ | ||
pip install Cython | ||
fi | ||
touch finish_before_ci_build | ||
else | ||
echo "has finished before ci build" | ||
fi |