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

Re: [PATCH] xen/Makefile: drop -Werror


  • To: Fabrice Fontaine <fontaine.fabrice@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 5 Jul 2021 10:16:31 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c9CNVMBAy2PKdkWdmPmAm2tOflzPZitdmZ52sv7Jn/M=; b=jy4Aw4JyCOzNuTFx4U0n8MYDpGG6gN8ujwa2x1vkHHqAqw+8L6Hh9GaH0fhqNLUar0KhzIVe7JN393iyGQURuNeOWPH53MHeN0d14tiPLAuYz0PotF/tO3yRSuWEgE6cPh5c9s2hHDkGe+5A3IGDq4HFm1oFYtkTp8ZQt21sviqxakOiyvgqN+Dd24Tm3+MXHkPmXGkTC+6JnfiDh72i2rvJOKuiQ2xJp6Pk8CSW3J/oCVfznv/u6j1v2LnEQvjQygH99FJqewCqZ+wjBvzHjJy+P675HHkp6h2U88INVkJlekTSDD+Lb2mtofF+mCjv5A1/urRAzExNq666ylwMTg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b8OuvjGo2WBn4reXFgbCk9ESC1683XMZTjE0OYuPvlvEh/xhsjdhKixQR0IG4lP7REOPb0ZVRa3KRqmqMhts88JyvPG81bactes/x6oaXwtVr1DgNTlV0fbHFbE4eJCay+Wd3YyKRuaTGtMJuAjfhuzCqJ8yzJokPh7ui/xOt9D+cHNmj+nh7C9EoSnuT1kvoysxqO1gYNaLzxel5AqOciBEn1AWWVFvn+HNnNycwvMxIYzryvt4GXevuyqUF+yPfePYRxRsDpaAM2BsjbI2uwB+GDpahiNsdmvICwtLXNAA5nzlnRS+lv7PXR4IhkLxzxHAGk6OUSQqiACUkOHU8Q==
  • Authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Mon, 05 Jul 2021 08:16:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 02.07.2021 19:51, Fabrice Fontaine wrote:
> Le ven. 2 juil. 2021 à 19:34, Andrew Cooper
> <andrew.cooper3@xxxxxxxxxx> a écrit :
>>
>> On 02/07/2021 18:06, Fabrice Fontaine wrote:
>>> Drop -Werror to avoid the following build failure with -DNDEBUG:
>>>
>>> In file included from <command-line>:0:0:
>>> /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/build/xen-4.14.2/xen/include/xen/config.h:94:0:
>>>  error: "NDEBUG" redefined [-Werror]
>>>  #define NDEBUG
>>>
>>> <command-line>:0:0: note: this is the location of the previous definition
>>>
>>> Fixes:
>>>  - 
>>> http://autobuild.buildroot.org/results/66573ad0abc4244c0dfeac8b684a7bfcc31c0d4d
>>>
>>> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@xxxxxxxxx>
>>
>> For better or worse, It is Xen's policy that -Werror will remain.  95%
>> of the time, it is the right thing.  We will however build failures
>> whenever they crop up.
>>
>> This one is weird though.  How is NDEBUG getting in twice?  What does
>> the rest of this build environment look like?
> NDEBUG is added by buildroot in the command line if the user sets
> BR2_ENABLE_RUNTIME_DEBUG to false since
> https://git.buildroot.net/buildroot/commit/?id=5a8c50fe05afacc3cbe8e7347e238da9f242fab0

I suppose the build environment setting is really intended for user mode
code. I question its applicability to the building of kernels or
hypervisors, but I can see that opinions may vary here. If we wanted to
honor a pre-existing NDEBUG, how about simply making xen/config.h have

#if !defined(CONFIG_DEBUG) && !defined(NDEBUG)
#define NDEBUG
#endif

? This then raises the question though how an external environment could
achieve the opposite effect of suppressing NDEBUG's definition despite
CONFIG_DEBUG being set. (The main point - hence my view expressed above -
is that we switched to Kconfig to centralize where settings get
established, moving away from taking ones from environment or make
command line.)

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.