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

Re: [XEN PATCH 02/15] build: rework asm-offsets.* build step to use kbuild


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Wed, 24 May 2023 08:17:53 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5/xsYqdaGGe0ZwXsZb3e+Z0gZ7qyQu6w8n7yJgQBAFw=; b=YeWUDbmTWYUfCGMZutuYu85fm0c3/fNhLJCTPRn5EAz1aISd7gGotV46w2zSohdSXpZ++iSWv4/zVzSyWY0+CdkCodkE/5Pa2RiVfXigglBfhazlNq4UkccL9npPMIWq/8SC3AeQ1dSemJUmR5b03l9zC1nzm2rJYWh8pbJDIUT/qqzWszLLtLFc88pC8hGi+VizUbWl0HLQb2JojMbUG2xsVECOWqyaABGKOg1AlcDpPVclKoiLN96RroMwW1HgvNS78SDENEhm7KxrJP1/2Bs9/ze3bH4fzchWYHOw6sTsiGtBZYVsquDrldnpGjdr2YG+pojuI6MgK3BaVRvHEg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IzVRCVJA8+BbQ/EZwLl9l6lcqts61gxQGagyDvDjLO6g0CYABKbnbdBYeWXJBADKZ5qfSFse8q1ASsElI/2r7J/JV6/NcnfnYDWgujXy/BfybHPZRZ7jFfY11VdNGp3YSvUeNAhkvkqbYzD+kVMfCR2bOH0jvWfdStc3e6yAqr4a9lfckCMUlrQSEYOQCS0O0nM8HYCBcrg601ka5dNBqg6J9omDH+UUSQ4BjyYHxg3XJyoj3X636WOf3RDoLbkDIMLNSa17VTdc+xAgMMDXc5iOp+5zvTVU+qc44twDHJGoWMrN+0nauI4a7yh7bRmlwmppyN/RKl04UjL17bjMTA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Wed, 24 May 2023 08:18:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZjZUYHIYuuKOi9UK9bl3DPb8C/K9pCpGAgAAGCYCAAASnAA==
  • Thread-topic: [XEN PATCH 02/15] build: rework asm-offsets.* build step to use kbuild


> On 24 May 2023, at 09:01, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 24.05.2023 09:39, Luca Fancellu wrote:
>>> On 23 May 2023, at 17:37, Anthony PERARD <anthony.perard@xxxxxxxxxx> wrote:
>>> Instead of having a special $(cmd_asm-offsets.s) command, we could
>>> probably reuse $(cmd_cc_s_c) from Rules.mk, but that would mean that
>>> an hypothetical additional flags "-flto" in CFLAGS would not be
>>> removed anymore, not sure if that matter here.
>>> 
>>> But then we could write this:
>>> 
>>> targets += arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.s
>>> arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.s: CFLAGS-y += -g0
>>> arch/$(TARGET_ARCH)/include/asm/asm-offsets.h: 
>>> arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.s FORCE
>>> 
>>> instead of having to write a rule for asm-offsets.s
>> 
>> The solution above seems clean, maybe I am wrong but -flto should not matter 
>> here as we are
>> not building objects to include in the final build, isn’t it? And gcc 
>> documentation states just:
>> 
>> “It is recommended that you compile all the files participating in the same 
>> link with the same
>> options and also specify those options at link time."
>> 
>> I’ve also tested this patch and it works fine, I have to say however that I 
>> preferred
>> a more verbose output, so that people can check how we are invoking the 
>> compiler,
>> but I guess now it’s more consistent with the other invocations that doesn’t 
>> print
>> the compiler invocation.
> 
> If you want it more verbose, you can pass V=1 on the make command line.
> (Of course that'll affect all commands' output.)

Yes I have to say that after sending the mail, I’ve checked the Makefile and 
I’ve found the comment

# To put more focus on warnings, be less verbose as default
# Use 'make V=1' to see the full commands

Thank you for pointing that out


> 
> Jan


 


Rackspace

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