[Buildroot] [PATCH 2/2] package/qemu: filter out long make options

Alexey Neyman stilor at att.net
Wed Jul 21 22:18:36 UTC 2021


Hi,

On 7/21/21 1:15 PM, Thomas Petazzoni wrote:
> Hello,
>
> On Wed, 21 Jul 2021 12:46:05 -0700
> Alexey Neyman <stilor at att.net> wrote:
>
>> 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
> I'm not sure to grasp all the implications of this, but isn't this a
> bug in Qemu's build machinery, that should be fixed in Qemu's Makefile
> instead ?

I was on the fence about it myself. Okay, I'll try to send a fix for 
qemu/Makefile to Qemu developers and see if they agree to pick it up; 
they could argue they don't support being invoked with --no-print-directory.

Regards,
Alexey.



More information about the buildroot mailing list