1*2224c93eSguanjinquan# 编译前请先设置参数 2*2224c93eSguanjinquansys_root=$DRAGONOS_SYSROOT 3*2224c93eSguanjinquangmp_path=请填写gmp的路径 4*2224c93eSguanjinquan 5*2224c93eSguanjinquan# 要安装到的目录 6*2224c93eSguanjinquanPREFIX=/usr 7*2224c93eSguanjinquan 8*2224c93eSguanjinquan 9*2224c93eSguanjinquanif [ ! -d ${gmp_path} ]; then 10*2224c93eSguanjinquan echo "Error: ${gmp_path} not found" 11*2224c93eSguanjinquan exit 1 12*2224c93eSguanjinquanfi 13*2224c93eSguanjinquan 14*2224c93eSguanjinquanif [ ! -d ${sysroot} ]; then 15*2224c93eSguanjinquan echo "Error: ${sysroot} not found" 16*2224c93eSguanjinquan exit 1 17*2224c93eSguanjinquanfi 18*2224c93eSguanjinquan 19*2224c93eSguanjinquanmkdir -p build-gmp || exit 1 20*2224c93eSguanjinquanmkdir -p ${PREFIX} || exit 1 21*2224c93eSguanjinquan 22*2224c93eSguanjinquancd build-gmp 23*2224c93eSguanjinquan${gmp_path}/configure --prefix=${PREFIX} --host=x86_64-dragonos || exit 1 24*2224c93eSguanjinquanmake -j $(nproc) || exit 1 25*2224c93eSguanjinquanmake DESTDIR=${sys_root} install|| exit 1 26*2224c93eSguanjinquanmake clean 27*2224c93eSguanjinquancd .. 28*2224c93eSguanjinquanrm -rf build-gmp