pkgname=binutils version=2.46.0 upstream="${MIRROR_GNU_FTP}/${pkgname}/${pkgname}-${version}.tar.gz" function do_configure { mkdir -p ../${pkgname} cd ../${pkgname} conf_flags=( --prefix=/usr --host=${DISTRO_TC} --enable-shared --disable-multilib --disable-nls --disable-werror --with-build-sysroot=${CROSS_ENV_ROOT} ) ../${pkgname}-${version}/configure "${conf_flags[@]}" } function do_build { cd .. cd ${pkgname}/ make -j$(nproc) } function do_install { cd .. cd ${pkgname}/ make DESTDIR="${MASTERDIR}" install }