[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: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 24 May 2023 10:01:03 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=un/dK/U6I31Il4k/zp4fEZ6bx9r0hWlIAKWoVSrhzUA=; b=FMsPVca0VZ23OREM/xygVd/bMr75xBxjGUtBS4wVK0WtCtyvM+/29aNfoou45u1Az2zZFup7EGDmhosNAoRVsIDE25XthOWrwxPtuAmLlNl9uMDowHQq2VGLudFTe1xFNINglTrMUaORhMpfUl6R74gTJWB3tEJpA4AmpLM3fwfdVWUhK49WrhoyBkopVcR9VqFujoUMaTcnjG7SkUh4m68xdcq+7pn4K3Xug7hitNQCUy65oRSHu8ViyLl3dVQJ7PosXIVa62AWDsFxgcXpdQaDowhNkOlLjcuFkde4S3uvYtjS92VNoPfgrJy/za/k5o3urbvXJEwBw31IdSs33Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gcbtwhMT0ggJSURqDoBAJFQ68LXXKNiXR8NSVdUDMciO9bxayjbHOjlEeqUH43LPDMqmL1iomdZM6+bvMOpwT0RmNH9SoErX6vlo7bjqp+7n8tSh/BQ03Zlz1zBvzQ36aPIm0aKTgXndTiYD87f5PCfl/NWHhaJcCWzb4AHac7aeB2cuFDCpHr9sSCccBuDGBgquAwpmiBT78wUnQbmJRTda4EsObjp0yjI3K1wbFOV5Ia5J5FhQ6NTiqTzt2AcPCj5Sr5/vV7OR3PwqLwVe5BArPoW9+mSFZWHU8WW1tPlGilkE1DdHjg/1ALh4zfqFTu5+B2Kc0UQArgl0DRQeHw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.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:01:29 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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.)
Jan
|