You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
847 B

  1. GMP_VERSION=$(sh "${SCRIPT_DIR}"/get-pEp-version.sh "GMP_VERSION")
  2. GMP_NAME="gmp-${GMP_VERSION}"
  3. OUTPUT_DIR=${SCRIPT_DIR}/build
  4. # Exit on errors
  5. set -e
  6. if [ -f "${LIB_DIR}/libgmp.a" ]; then
  7. echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
  8. exit 0
  9. fi
  10. GMP_DIR="${TMP_DIR}/${GMP_NAME}"
  11. if [ ! -d "${GMP_DIR}" ]; then
  12. # GMP snapshot must be used until released
  13. wget -nc https://gmplib.org/download/gmp/$GMP_NAME.tar.bz2
  14. tar xvf ${GMP_NAME}.tar.bz2
  15. fi
  16. export LDFLAGS="-arch ${ARCH}"
  17. export CC="$(xcrun --sdk ${SDK} -f clang) -arch ${ARCH} -isysroot ${SDK_PATH}"
  18. pushd gmp-$GMP_VERSION
  19. PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=${CURRENT_LIB_DIR}/lib/pkgconfig ./configure --host=${HOST} --prefix=${CURRENT_LIB_DIR} --disable-assembly
  20. make clean
  21. make -j4
  22. make install
  23. popd
  24. rm -rf *.bz2