[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] build: centralize / unify asm-offsets generation
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Tue, 20 Apr 2021 17:29:34 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=7Oh6Ejuuy9Q003wull3FxYG4VCyEXr4pKVXqlTHZim8=; b=YQSX4/gHESIxpBxw2oxFs1MFWU9qNGfUQfKDkqBjbUNdJjOnSET8uSlwbqvK7yGs02cN9dnApwDEy8OQPKGCSM4cAK7azdt+y3SsSF+pmM0qjtTujy2Vr51SqGyhZAWV1sQmm70dTg8OudtQGbq8vc/dkysUpnWUfyLg1NvCviLYD0HKssuZPUnLlye68yvR8R4GlaYWVGdXIHucoKz7BeiNIFbK89vVPhAjVSKOab8pOWUp0IlVsp0J8+KU5t4JFZa9FrEq/Psx9q8xjy6bw68FaCXnlKCRZ3HX76sGOMh5BO7ZtUjDcJFBeBmVabInRKmAUVovgj6R2adjPKnuCg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=leVSzdzKg+/k1TfUcchRyq6I8D1GBtTb45XFuPenLEl0ImF0iiT7uhDR1gskvAh2AC1fG3UIfwzJ5+w/vsmnoOkjZnFIFKSWQsA533hLHfTCpXssiUrly1UUfJzhue0MIk6oOYTSnooGi8dyS1yOMMbFRWqhE34iiJgF0fhN2B/9i004ICauI4iYqQ/OHbup7FpXQHukSDgkYe9ZbxS5z4q2Q6sIDbov5QrZu7BroNAz0v5lZCTxvCkP/bCsycvlpLKMhyQfTNeQe8fzeSMCmUMi9Vv87n8MQ0PPXcFDLeq0sA80AZD8V6s9ZyV6Xu9Bc2cuTrA+0oGAdJZ5kQ0CHw==
- Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Tue, 20 Apr 2021 15:29:48 +0000
- Ironport-hdrordr: A9a23:to1RQaxzHcAT1X2DQmtVKrPxve4kLtp033Aq2lEZdDV8Sebdv9 yynfgdyB//gCsQXnZlotybJKycWxrnmqJdybI6eZOvRhPvtmftFoFt6oP+3ybtcheTysd07o 0lSaR3DbTLYGRSpdrm4QW+DtYryMSG9qftvuvF03JxV2hRCp1IxS0RMHf9LmRdQg5aCZ0lUL ed/NNAvTq8eXIRB/7LfEUtde7FutHNidbacQcLbiRXkzWmoBGJzPrBExae1goDSD8n+9kf2E XMjgCR3NTAj9iV0RnZvlWjiqh+uNyk8ddbAdzJt859EESQti+NRKBMH4KPpyo0pubH0idarP Dprw07N8p+r1P9F1vF2CfF4AXr3DYw53KK8zbx6hGC0K+JNw4SMMZPiZlUdRHU8SMbzalB+Z lGwn6DsN5vBQ7A9R6NmeTgbQ1glUa/vBMZ4IgupkFYOLFuDIN5nMg0+UNYF4o4ByTq6IwrO/ kGNrCi2N9mNXyddHzXpW9p3ZiFWWkyBA6PRgw4ttWSyCU+pgE182IogOgk2lsQ/pM0TJdJo8 zCL6RTjblLCusbd7h0CustSda+Y1a9DS7kASa3GxDKBasHM3XCp9rc+7Mu/tynf5QO0d8bhI nBeEkwjx9yR2veTem1mLFb+BHER2uwGR73zNtF2pR/srrgAJL2L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L b3cOlNM1kCBddEjEOT5YFElQsOr+SNlWRtjy94hPMvknBEY3VOA68Xaof0tw4rToxUwRwNqnE+ kgWXaoYTdyZjuA6JswVdkzPA2YFlzQJNiVB1oOaV+vURxGdwdVsy0/HttHoqXvDlYOmbhIPJ6b /bXV4ZN31Q35KGs9RLHx2JSmieYKHLhslDwtrIjrpYOiRfvQwAzicZusMXtbKwzf+RAFdHpedw 7E4=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, Apr 01, 2021 at 10:33:47AM +0200, 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 <jbeulich@xxxxxxxx>
>
> --- 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,$@)
Won't it be more natural to keep the .s file in arch/$(TARGET_ARCH)?
Thanks, Roger.
|