package/qemu: filter out long make options
Since qemu started using ninja, they have the following fragment in the
Makefile:
MAKE.n = $(findstring n,$(firstword $(MAKEFLAGS)))
NINJAFLAGS = ... $(if $(MAKE.n), -n) ...
Buildroot's generated makefile in the O= directory invokes make in the
base buildroot with --no-print-directory. However, make's placement of
the --no-print-directory in MAKEFLAGS varies between the versions of
the host make; make 4.3 places that at the end while make 3.82 places
it at the beginning. As a result, if building on a system with an older
host make, qemu's makefile invokes `ninja -n` which does not generate
any outputs.
To reproduce, on a CentOS 7 machine or docker image:
mkdir /tmp/br-build && cd /tmp/br-build
make -C ~/buildroot pc_x86_64_bios_defconfig O=`pwd`
make menuconfig # Switch to glibc, enable "QEMU" and "QEMU tools"
make all # Build succeeds
find target -name qemu-img # No binary has been built
Pick up the fix commited in Qemu upstream.
Signed-off-by: Alexey Neyman <stilor@att.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>