[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for 7.2] Fix broken configure with -Wunused-parameter

From: Paolo Bonzini
Subject: Re: [PATCH for 7.2] Fix broken configure with -Wunused-parameter
Date: Thu, 3 Nov 2022 18:16:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0

On 11/3/22 09:58, Daniel P. Berrangé wrote:
On Wed, Nov 02, 2022 at 09:22:58PM +0100, Stefan Weil via wrote:
The configure script fails because it tries to compile small C programs
with a main function which is declared with arguments argc and argv
although those arguments are unused.

Running `configure -extra-cflags=-Wunused-parameter` triggers the problem.
configure for a native build does abort but shows the error in config.log.
A cross build configure for Windows with Debian stable aborts with an

Avoiding unused arguments fixes this.
I'm not convinced that we should allow -extra-cflags to influence
the configure compile checks at all, as there are likely more cases
where arbitrary -W$warn flag will impact the checks, potentially
causing configure to silently take the wrong action.

Meson cc.compiles/cc.links tests never use -Werror to avoid this (which has a different set of issues, but if you want you can add the argument manually and 0.64 will also add a "werror: true|false" argument). Since the last configure tests will go away in 8.0, I'm fine with just applying this patch in the meanwhile.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]