opkg-build calls 'xz' which is single-threaded. By passing --threads=0 it will use N threads where N is the number of cores. This changes qemu:do_package_ipk from 270s to 30s on my build machine. I have this patch that I'm submitting to oe-core but I admit that it's ugly and shouldn't be upstreamed: +++ b/opkg-build @@ -230,6 +230,8 @@ if gzip --help 2>&1 | grep -- "-T" > /dev/null; then fi if [ $compressor = "gzip" ] ; then compressorargs=$zipargs +elif [ $compressor = "xz" ] ; then + compressorargs="--threads 0" fi
from e-mail thread: what about a generic --compressor-args option? opkg-build could have some sane defaults that always apply (like it does now), then if --compressor-args is set, it would override those. For xz, it would look like this: opkg-build -Z xz --compressor-args -T0" (we could assume that --compressor-args has to be the last parameter, or use ; as the delimiter)
fixed on 49d32419abec4142995f3ed6f840137c8a72f3b3