Skip to content

Commit

Permalink
Restore patch for mp_bitcnt_t on M$ Windows
Browse files Browse the repository at this point in the history
Also enable --with-pic for all platforms
  • Loading branch information
skirpichev committed Mar 24, 2024
1 parent 159f575 commit 9bcf39e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/cibw_before_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ rm config.guess && mv configfsf.guess config.guess && chmod +x config.guess
./configure --enable-fat \
--enable-shared \
--disable-static \
--with-pic \
--prefix=$PREFIX
# Uncomment the following lines to change the mp_bitcnt_t type to "unsigned long long int"
if [ "$OSTYPE" = "msys" ]
then
sed -i 's/typedef\s*unsigned\s*long\s*int\s*mp_bitcnt_t/typedef unsigned long long int mp_bitcnt_t\n/g' gmp.h
sed -i 's/mpz_srcptr,\s*unsigned\s*long\s*int/mpz_srcptr, mp_bitcnt_t/g' mpz/millerrabin.c
fi
make -j6
make install
cd ../
Expand All @@ -30,6 +37,7 @@ tar -xf mpfr-${MPFR_VERSION}.tar.gz
cd mpfr-${MPFR_VERSION}
./configure --enable-shared \
--disable-static \
--with-pic \
--with-gmp=$PREFIX \
--prefix=$PREFIX
make -j6
Expand All @@ -41,6 +49,7 @@ tar -xf mpc-${MPC_VERSION}.tar.gz
cd mpc-${MPC_VERSION}
./configure --enable-shared \
--disable-static \
--with-pic \
--with-gmp=$PREFIX \
--with-mpfr=$PREFIX \
--prefix=$PREFIX
Expand Down

0 comments on commit 9bcf39e

Please sign in to comment.