From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86F63C433ED for ; Thu, 15 Apr 2021 09:51:07 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 445A26101B for ; Thu, 15 Apr 2021 09:51:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 445A26101B Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.110983.212095 (Exim 4.92) (envelope-from ) id 1lWyeH-0002d3-3W; Thu, 15 Apr 2021 09:50:57 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 110983.212095; Thu, 15 Apr 2021 09:50:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lWyeH-0002cw-0R; Thu, 15 Apr 2021 09:50:57 +0000 Received: by outflank-mailman (input) for mailman id 110983; Thu, 15 Apr 2021 09:50:55 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lWyeF-0002cq-FU for xen-devel@lists.xenproject.org; Thu, 15 Apr 2021 09:50:55 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id a2122c7f-4665-4a1f-bf16-856dc446566b; Thu, 15 Apr 2021 09:50:52 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 14B89AC6E; Thu, 15 Apr 2021 09:50:52 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a2122c7f-4665-4a1f-bf16-856dc446566b X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1618480252; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PEu2ec80qPjQcDNvmutq0WG4ppPMpFxo48oriouP9So=; b=ri2JEnXxsk0RllbvAn30RsBE9iytwduQz/Ih86j7XOjS7uno3kEZT+5G4LV3mShrO+DwkU iLY8cAkjpMUnutTHDnl9Bu7ZEqFNjSzoU3w1fCyvMOALc64Hhl7nk2eQfGHlAUmUxyV6vZ oVMvWZQOdrjIxZvq3ijR2ZSPM8G25/M= Subject: Ping: [PATCH] build: centralize / unify asm-offsets generation From: Jan Beulich To: Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Cc: "xen-devel@lists.xenproject.org" References: Message-ID: <6ce134f1-1bca-ad5f-400f-f4213ea03865@suse.com> Date: Thu, 15 Apr 2021 11:50:51 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 01.04.2021 10:33, Jan Beulich wrote: > Except for an additional prereq Arm and x86 have the same needs here, > and Arm can also benefit from the recent x86 side improvement. Recurse > into arch/*/ only for a phony include target (doing nothing on Arm), > and handle asm-offsets itself entirely locally to xen/Makefile. > > Signed-off-by: Jan Beulich Comments / acks, anyone? Thanks, Jan > --- a/.gitignore > +++ b/.gitignore > @@ -318,7 +318,6 @@ > xen/arch/x86/efi/check.efi > xen/arch/x86/efi/mkreloc > xen/arch/*/xen.lds > -xen/arch/*/asm-offsets.s > xen/arch/*/efi/boot.c > xen/arch/*/efi/compat.c > xen/arch/*/efi/ebmalloc.c > @@ -325,6 +324,7 @@ > xen/arch/*/efi/efi.h > xen/arch/*/efi/pe.c > xen/arch/*/efi/runtime.c > +xen/asm-offsets.s > xen/common/config_data.S > xen/common/config.gz > xen/include/headers*.chk > --- a/xen/Makefile > +++ b/xen/Makefile > @@ -341,7 +341,7 @@ _clean: delete-unfresh-files > find . \( -name "*.o" -o -name ".*.d" -o -name ".*.d2" \ > -o -name "*.gcno" -o -name ".*.cmd" \) -exec rm -f {} \; > rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET).efi.map $(TARGET)-syms $(TARGET)-syms.map *~ core > - rm -f include/asm-*/asm-offsets.h > + rm -f asm-offsets.s include/asm-*/asm-offsets.h > rm -f .banner > > .PHONY: _distclean > @@ -362,7 +362,7 @@ $(TARGET): delete-unfresh-files > done; \ > true > $(MAKE) -f $(BASEDIR)/Rules.mk -C include > - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) asm-offsets.s > + $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) include > $(MAKE) -f $(BASEDIR)/Rules.mk include/asm-$(TARGET_ARCH)/asm-offsets.h > $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@ > > @@ -399,7 +399,11 @@ include/xen/compile.h: include/xen/compi > @sed -rf tools/process-banner.sed < .banner >> $@.new > @mv -f $@.new $@ > > -include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s > +asm-offsets.s: arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.c > + $(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -g0 -o $@.new -MQ $@ $< > + $(call move-if-changed,$@.new,$@) > + > +include/asm-$(TARGET_ARCH)/asm-offsets.h: asm-offsets.s > @(set -e; \ > echo "/*"; \ > echo " * DO NOT MODIFY."; \ > --- a/xen/arch/arm/Makefile > +++ b/xen/arch/arm/Makefile > @@ -131,8 +131,8 @@ $(TARGET)-syms: prelink.o xen.lds > >$(@D)/$(@F).map > rm -f $(@D)/.$(@F).[0-9]* > > -asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c > - $(CC) $(filter-out -flto,$(c_flags)) -S -o $@ $< > +.PHONY: include > +include: > > xen.lds: xen.lds.S > $(CPP) -P $(a_flags) -MQ $@ -o $@ $< > @@ -141,6 +141,6 @@ dtb.o: $(CONFIG_DTB_FILE) > > .PHONY: clean > clean:: > - rm -f asm-offsets.s xen.lds > + rm -f xen.lds > rm -f $(BASEDIR)/.xen-syms.[0-9]* > rm -f $(TARGET).efi > --- a/xen/arch/x86/Makefile > +++ b/xen/arch/x86/Makefile > @@ -244,9 +244,8 @@ endif > efi/buildid.o efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/built_in.o > efi/buildid.o efi/relocs-dummy.o: ; > > -asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(BASEDIR)/include/asm-x86/asm-macros.h > - $(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -g0 -o $@.new -MQ $@ $< > - $(call move-if-changed,$@.new,$@) > +.PHONY: include > +include: $(BASEDIR)/include/asm-x86/asm-macros.h > > asm-macros.i: CFLAGS-y += -D__ASSEMBLY__ -P > > @@ -276,7 +275,7 @@ hweight.o: CFLAGS-y += $(foreach reg,cx > > .PHONY: clean > clean:: > - rm -f asm-offsets.s *.lds *.new boot/*.o boot/*~ boot/core boot/mkelf32 > + rm -f *.lds *.new boot/*.o boot/*~ boot/core boot/mkelf32 > rm -f asm-macros.i $(BASEDIR)/include/asm-x86/asm-macros.* > rm -f $(BASEDIR)/.xen-syms.[0-9]* boot/.*.d $(BASEDIR)/.xen.elf32 > rm -f $(BASEDIR)/.xen.efi.[0-9]* efi/*.efi efi/mkreloc >