pkgname=gcc version=16.1.0 upstream="${MIRROR_GNU_FTP}/${pkgname}/${pkgname}-${version}/${pkgname}-${version}.tar.gz" function do_configure { ./contrib/download_prerequisites mkdir -p build/ cd build/ conf_flags=( --prefix=/usr --host=${DISTRO_TC} --target=${DISTRO_TC} --enable-shared --enable-threads=posix --enable-languages=c,c++ --disable-multilib --disable-nls --disable-werror --with-build-sysroot=${CROSS_ENV_ROOT} --enable-stack-protector=strong ) ../configure "${conf_flags[@]}" cd .. mkdir -p buildlib/ cd buildlib libconf_flags=( --prefix=/usr --host=${DISTRO_TC} --disable-multilib --disable-nls --disable-libstdcxx-pch ) } function do_build { cd build/ make -j$(nproc) cd .. cd buildlib/ make -j$(nproc) } function do_install { cd build/ make DESTDIR="${MASTERDIR}" install cd .. cd buildlib/ make DESTDIR="${MASTERDIR}" install }