build.sh 544 B

12345678910111213141516171819202122232425262728
  1. # 编译前请先设置参数
  2. sys_root=$DRAGONOS_SYSROOT
  3. gmp_path=请填写gmp的路径
  4. # 要安装到的目录
  5. PREFIX=/usr
  6. if [ ! -d ${gmp_path} ]; then
  7. echo "Error: ${gmp_path} not found"
  8. exit 1
  9. fi
  10. if [ ! -d ${sysroot} ]; then
  11. echo "Error: ${sysroot} not found"
  12. exit 1
  13. fi
  14. mkdir -p build-gmp || exit 1
  15. mkdir -p ${PREFIX} || exit 1
  16. cd build-gmp
  17. ${gmp_path}/configure --prefix=${PREFIX} --host=x86_64-dragonos || exit 1
  18. make -j $(nproc) || exit 1
  19. make DESTDIR=${sys_root} install|| exit 1
  20. make clean
  21. cd ..
  22. rm -rf build-gmp