From nobody Wed Nov 27 23:47:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1684859939; cv=none; d=zohomail.com; s=zohoarc; b=VfV5+DUXDCpyhgA5/nLY40knV1foU0W3xzt5zZYuGZoDYwO78qiSgY1duZVEV2Uzu+UGANEGq4TTHV5tZ5AIMjfQkk6AVX39mWqYjjtVDqx6ebfjBXq8VjFMnaMGvFRQUoAzEJ7baOrol1mEMseK8+MkkTu5ML/CjJhBDNyCbqo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684859939; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=K+SU/vs9l6PG4Nm7TDn89YfKgqH2cr/dC1PjSkESICM=; b=gceolzU/AJwlF1nn/6tsdVl2wJZ6IX6rH+SW4WmRrjs7FcVyl0MbeVNrJGdKfJpKjfEP8xUIphQihWDujFQGet0La4qZGRDHLEnuMXHOkpSMThZB3YxoUEaLeqzKQaCvGtwHcUQUuOUH5FzoFfVHjtRAK0lt0ewLxDuks6klw3Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1684859939933295.2018323926752; Tue, 23 May 2023 09:38:59 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.538551.838565 (Exim 4.92) (envelope-from ) id 1q1V1p-0006EE-W5; Tue, 23 May 2023 16:38:29 +0000 Received: by outflank-mailman (output) from mailman id 538551.838565; Tue, 23 May 2023 16:38:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V1p-0006E7-T9; Tue, 23 May 2023 16:38:29 +0000 Received: by outflank-mailman (input) for mailman id 538551; Tue, 23 May 2023 16:38:27 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V1n-0006Dq-JL for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:38:27 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 3c3778e6-f988-11ed-b22d-6b7b168915f2; Tue, 23 May 2023 18:38:25 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 3c3778e6-f988-11ed-b22d-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859905; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tpIIJAj41XN+i19+pdP8PgfnfYVAitDX3tJqFhm43yI=; b=J3c7VbvFVLD8QueeVmWJrbdMUpyIsKE38q/D9XeajBLb7HF+0D1Du+zr PanUGZtkWJc4cz0qOAtRDuhytpOz3xHhkNvsOOrjQQlyaDRlZjJwmZ/p7 CE8Jw1OuSFdiipZqZnxrTmCU+Lv5/17Zk3CjPffOoOH+hysDLO3wYqhwp g=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 109422917 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:8Aj1jq771o4ONcVCDwaPwAxRtAvHchMFZxGqfqrLsTDasY5as4F+v mYcD26AOvqPZTehfYwiPYnn9xhV6p/Uy4dlSwBupC83Hi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraCYnsrLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9lU35JwehBtC5gZlPa0R5weE/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5m0 /k+FjJSSjG/rfuT5pm5bc88huV6BZy+VG8fkikIITDxCP8nRdbIQrnQ5M8e1zA17ixMNa+AP YxDM2MpNUmeJUQVYT/7C7pn9AusrnD5bz1frkPTvact6nLf5AdwzKLsIJzefdniqcB9xx7J+ jicrj2mav0cHP3Axze61k2Pvezoow/GaqUNJp2W98c/1TV/wURMUUZLBDNXu8KRmkO4Ht5SN UEQ0i4vtrQpslymSMHnWB+1q2LCuQQTM/JSGeAn7ACGyoLP/h2UQGMDS1ZpasEitcIwbSwn0 BmOhdyBLSd0rLSfRHaZ97GVhTC/Iy4YKSkFfyBsZRQBy8nupsc0lB2nczp4OPfr1JuvQ2i2m m3U6nFk3N3/kPLnyY2d+Hb5gW2Ih6TjVysTzQfweDKlz1pQMdvNi5OT1XDX6vNJLYC8R1aHv WQZl8X20N3iHa1hhwTWHrxTQejBC+KtdWSF3AUxR8VJGyGFoSbLQGxG3N1pyK6F2O4gcCShX kLcsBg5CHR7bCrzNv8fj25c5q0XIUnc+TbNDKi8gjlmOMIZmOq7EMZGOyatM5jFyhRErE3GE c7znTyQJXgbE7976zG9Wv0Q17QmrghnmzOPGsCjk0/2iOLCDJJwdVviGALUBt3VEYve+FmFm zqhH5DiJ+pjvB3WPXCMrN97waEiJnknH5Hmw/Fqmhq4ClM+QgkJUqaBqY7NjqQ5x8y5YM+Up CDiMqKZoXKj7UD6xfKiMSg5OeywBcYu8RrW/0UEZD6V5pTqWq73hI93Snf9VeBPGDBLpRKsc 8Q4Rg== IronPort-HdrOrdr: A9a23:bPY3nalEYt96bfxg83iSVyEmnKrpDfLo3DAbv31ZSRFFG/Fw9/ rCoB17726QtN91YhsdcL+7V5VoLUmzyXcX2/hyAV7BZmnbUQKTRekP0WKL+Vbd8kbFh41gPM lbEpSXCLfLfCJHZcSR2njELz73quP3jJxBho3lvghQpRkBUdAF0+/gYDzranGfQmN9dP0EPa vZ3OVrjRy6d08aa8yqb0N1JNQq97Xw5fTbiQdtPW9f1DWz X-Talos-CUID: 9a23:6bZIKGMnnAj7Eu5DfixBykxLPuEZWGT46lzSBGnoCUcwYejA X-Talos-MUID: 9a23:CF0FpwQ0F0JnVbKFRXTN2z9vC+NXwJ+tL34hrKchpPukGy1JbmI= X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="109422917" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH 01/15] build: hide that we are updating xen/lib/x86 Date: Tue, 23 May 2023 17:37:57 +0100 Message-ID: <20230523163811.30792-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com> References: <20230523163811.30792-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1684859940285100002 Content-Type: text/plain; charset="utf-8" Change of directory to xen/lib/x86 isn't needed to be shown. If something gets updated, make will print the command line. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich Reviewed-by: Luca Fancellu --- xen/include/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/Makefile b/xen/include/Makefile index edd5322e88..96d5f6f3c8 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -229,7 +229,7 @@ ifeq ($(XEN_TARGET_ARCH),x86_64) .PHONY: lib-x86-all lib-x86-all: @mkdir -p $(obj)/xen/lib/x86 - $(MAKE) -C $(obj)/xen/lib/x86 -f $(abs_srctree)/$(src)/xen/lib/x86/Makefi= le all + $(Q)$(MAKE) -C $(obj)/xen/lib/x86 -f $(abs_srctree)/$(src)/xen/lib/x86/Ma= kefile all =20 all: lib-x86-all endif --=20 Anthony PERARD From nobody Wed Nov 27 23:47:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1684859936; cv=none; d=zohomail.com; s=zohoarc; b=FATIMLlI8FPDRdQmf4+KF5yvbYoMorf1DbGviqY8tGZw26IOduIqw8+6DTf+f3W9qXxsYCoETf3lxbBLYKjbbE0M5NrASifkM9Nk/rPMGniL7u3UrXMPOczW1BHe6y7epIKh7wPHUDgyjqB2o76pJOz0saYXBqegPJ66WGpnKcE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684859936; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DgZv+iS2+DQQQIXW0oaiGu+Ar178fgsMKDfe9JN0k98=; b=Ch7Ot5qEsDckZzqJSu1UiGHWXL6t9JgfFIfHlDMnSuxZ9GJCoKJp+uasJXIwiztoUaxzTa2ovezal7mmbfmho8qU0T+H1IMV5Htyc1VR2m4vq5s9+ocnuSoAEtiKR7CQSbobyzEXTNsA5aBbpRQeqhob/kD+zwxxnviCQuxTDFg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1684859936194126.96234657429886; Tue, 23 May 2023 09:38:56 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.538552.838570 (Exim 4.92) (envelope-from ) id 1q1V1q-0006Gb-9d; Tue, 23 May 2023 16:38:30 +0000 Received: by outflank-mailman (output) from mailman id 538552.838570; Tue, 23 May 2023 16:38:30 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V1q-0006Fz-4e; Tue, 23 May 2023 16:38:30 +0000 Received: by outflank-mailman (input) for mailman id 538552; Tue, 23 May 2023 16:38:28 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V1o-0006Dr-2J for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:38:28 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 3c14679e-f988-11ed-8611-37d641c3527e; Tue, 23 May 2023 18:38:25 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 3c14679e-f988-11ed-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859905; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ufpNHiN8OYSwXkEse8X/FKw/mqXv9HClfgFsxNyVIRY=; b=equVlQO6SOBlBialkLEL+65Z23Fhq6nlIMoGvfhVkOCK5kQBu4j1iAF/ NPUi12Ath/hbK/1vZMUhz5x47SthJavkLBoq771rzwZFD7t1r9LBTBEaZ mhy67+j2H+4oBwGQznj20EsTaMedoEfEt9ikNVuPZ2sKnxHMXPwsgLvWg c=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 110501175 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:tcMeqanrWvY+NtgZ0nDXRGTo5gy7JkRdPkR7XQ2eYbSJt1+Wr1Gzt xIYCGjXMv2MZTHxLdtwOYu//UNSuMSHz9QyTwNr+y4wQiMWpZLJC+rCIxarNUt+DCFhoGFPt JxCN4aafKjYaleG+39B55C49SEUOZmgH+a6U6icfHgqH2eIcQ954Tp7gek1n4V0ttawBgKJq LvartbWfVSowFaYCEpNg064gE0p5KyaVA8w5ARkPqgW5gSGzRH5MbpETU2PByqgKmVrNrbSq 9brlNmR4m7f9hExPdKp+p6TnpoiG+O60aCm0xK6aoD66vRwjnVaPpUTbZLwXXx/mTSR9+2d/ f0W3XCG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yx X-Talos-MUID: =?us-ascii?q?9a23=3A2WhmcQ/33Dqs4r4wFMr/YOeQf+Fn5KaUVG0gqIs?= =?us-ascii?q?bufioKi17ZTTeiSviFw=3D=3D?= X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="110501175" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH 02/15] build: rework asm-offsets.* build step to use kbuild Date: Tue, 23 May 2023 17:37:58 +0100 Message-ID: <20230523163811.30792-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com> References: <20230523163811.30792-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1684859938141100003 Content-Type: text/plain; charset="utf-8" Use $(if_changed_dep, ) macro to generate "asm-offsets.s" and remove the use of $(move-if-changes,). That mean that "asm-offset.s" will be changed even when the output doesn't change. But "asm-offsets.s" is only used to generated "asm-offsets.h". So instead of regenerating "asm-offsets.h" every time "asm-offsets.s" change, we will use "$(filechk, )" to only update the ".h" when the output change. Also, with "$(filechk, )", the file does get regenerated when the rule change in the makefile. This changes also result in a cleaner build log. Signed-off-by: Anthony PERARD Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu --- 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 +=3D arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.s arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.s: CFLAGS-y +=3D -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 --- xen/build.mk | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/xen/build.mk b/xen/build.mk index 758590c68e..e2a78aa806 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -40,13 +40,15 @@ include/xen/compile.h: include/xen/compile.h.in .banner= FORCE =20 targets +=3D include/xen/compile.h =20 --include $(wildcard .asm-offsets.s.d) -asm-offsets.s: arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.c - $(CC) $(call cpp_flags,$(c_flags)) -S -g0 -o $@.new -MQ $@ $< - $(call move-if-changed,$@.new,$@) +quiet_cmd_asm-offsets.s =3D CC $@ +cmd_asm-offsets.s =3D $(CC) $(call cpp_flags,$(c_flags)) -S -g0 $< -o $@ =20 -arch/$(TARGET_ARCH)/include/asm/asm-offsets.h: asm-offsets.s - @(set -e; \ +asm-offsets.s: arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.c FORCE + $(call if_changed_dep,asm-offsets.s) + +targets +=3D asm-offsets.s + +define filechk_asm-offsets.h echo "/*"; \ echo " * DO NOT MODIFY."; \ echo " *"; \ @@ -57,9 +59,13 @@ arch/$(TARGET_ARCH)/include/asm/asm-offsets.h: asm-offse= ts.s echo "#ifndef __ASM_OFFSETS_H__"; \ echo "#define __ASM_OFFSETS_H__"; \ echo ""; \ - sed -rne "/^[^#].*=3D=3D>/{s:.*=3D=3D>(.*)<=3D=3D.*:\1:; s: [\$$#]: :; = p;}"; \ + sed -rne "/^[^#].*=3D=3D>/{s:.*=3D=3D>(.*)<=3D=3D.*:\1:; s: [\$$#]: :; = p;}" $<; \ echo ""; \ - echo "#endif") <$< >$@ + echo "#endif" +endef + +arch/$(TARGET_ARCH)/include/asm/asm-offsets.h: asm-offsets.s FORCE + $(call filechk,asm-offsets.h) =20 build-dirs :=3D $(patsubst %/built_in.o,%,$(filter %/built_in.o,$(ALL_OBJS= ) $(ALL_LIBS))) =20 --=20 Anthony PERARD From nobody Wed Nov 27 23:47:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1684859935; cv=none; d=zohomail.com; s=zohoarc; b=Xl+keAj9anJwc5YthLEZ3w4mHeXwmedIJNySE0hWJ9R/0QbGM9C4cJxvHP1lWHMcGbcs6+ERKobUc5C40IkdMwqEXE1dXdrvHbPvbg3xwRVvp/5ckiFLc20K+yxtO0pNboYpnhLdHsOf4fQIjwU47K3OhGp56csDHP6RRel2wE4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684859935; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=A4zg9VwEtfwLnQc1uN9N2M0GHhVP+t8Koi39pYYsITs=; b=guBPvP2rfXVzkQjfvukfvGBw3802O+9BtF9D7zBh7W+2f8h1gbfJh354wvD9GsvC76u4C7AUuJnA33CcL7GhF4MkPOOQogMcm7VumVNtHgbQBtyy6mTG1JB/wtUSq3Ul0I5JnLsoqj8u/m7AT6VMRieva3UQxWeeH8bD970kM5M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1684859935670118.15609003797192; Tue, 23 May 2023 09:38:55 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.538554.838595 (Exim 4.92) (envelope-from ) id 1q1V1r-0006xK-P4; Tue, 23 May 2023 16:38:31 +0000 Received: by outflank-mailman (output) from mailman id 538554.838595; Tue, 23 May 2023 16:38:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V1r-0006x1-MG; Tue, 23 May 2023 16:38:31 +0000 Received: by outflank-mailman (input) for mailman id 538554; Tue, 23 May 2023 16:38:30 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V1q-0006Dr-EW for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:38:30 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 3d9ef1d2-f988-11ed-8611-37d641c3527e; Tue, 23 May 2023 18:38:27 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 3d9ef1d2-f988-11ed-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859908; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gHSnwWQZeNLJTGRbdWUmwUXIbgpyRr1aGRD7CkY8Nag=; b=OQ9nSR56CJY6dCqTZ5z6nG8sF/XtQaMkoABf+s1nP8+/6zPXi1ICl3Y2 Im8BPiG1ZwFTBscauCjoPTIJFIgVPjxbTuP0GUTIyWyw9a02bzhIaEskt VTTJJjs18DxMe1TAXL7gt7mmZNZNrNzuzSe6DKkpmjvh/P4RtunucR4vv 4=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 110112539 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:lCo++6LMFJBJQso/FE+R2pUlxSXFcZb7ZxGr2PjKsXjdYENShDNWn DcaW2qPOKmJMGGgLtx2bty18EsB7JTTyIRrTFFlqX01Q3x08seUXt7xwmUcnc+xBpaaEB84t ZV2hv3odp1coqr0/0/1WlTZhSAgk/rOHvykU7Ss1hlZHWdMUD0mhQ9oh9k3i4tphcnRKw6Ws Jb5rta31GWNglaYCUpKrfrbwP9TlK6q4mhA4wZlPaojUGL2zBH5MrpOfcldEFOgKmVkNrbSb /rOyri/4lTY838FYj9yuu+mGqGiaue60Tmm0hK6aYD76vRxjnVaPpIAHOgdcS9qZwChxLid/ jnvWauYEm/FNoWU8AgUvoIx/ytWZcWq85efSZSzXFD6I+QrvBIAzt03ZHzaM7H09c5JWV1Xs tYnJApdLRCOm6Wmwq2xZLhF05FLwMnDZOvzu1llxDDdS/0nXYrCU+PB4towMDUY354UW6yEP oxANGQpNU6bC/FMEg5/5JYWleG0hn75YntApUicv6Yf6GnP1g1hlrPqNbI5f/TTHJ0MxxzF/ TOuE2LRWztECPeTyRS+83+Mhff0wC3VYpggC+jtnhJtqALKnTFCYPEMbnOrrP/8hkOgVtZ3L 00P5jFovaU07FasTNT2Q1u/unHslhwWVsdUEuY6wBqQ0aeS6AGcbkAbShZRZdpgs9U5LQHGz XfQwYmvX2Y29uTIFzTErOz8QS6O1TY9Ezc+fGgucgc/s5rjrZ10nhDQRPgyOfvg5jHqIg3Yz zePpSk4orwci88Xyqm2lWz6byKQSovhFVBsuFiONo6xxkYgPdP+OdT0gbTOxawYRLt1WGVtq 5TtdyK2yOkVRa+AmyWWKAnmNOH4vq3VWNEwbLMGInXAy9hP0yT7FWyzyGskTKuMDirjUWGBX aMrkVkNjKK/xVPzBUONX6q/Ct4x0Y/rHsn/W/bfY7JmO8YhKFDXpH01NBfIgwgBdXTAdolmY /+mnTuEVy5GWcyLMhLtLwvi7VPb7n9nnj6CLXwK5x+mzaCfdBaodFvxC3PXNrpRxPrd8G3oH yN3a5PiJ+N3DLevPUE6MOc7cTg3EJTMLcuu8Z0IKbbTc1YO9aNII6a5/I7NsrdNx8x9/tokN FnnMqOE4DITXUH6FDg= IronPort-HdrOrdr: A9a23:4KA0+qG7d0GSW/a9pLqEGMeALOsnbusQ8zAXPiBKJCC9E/bo8/ xG+c5w6faaslkssR0b9+xoW5PwJE80l6QFgrX5VI3KNGXbUQ2TTb2KhbGI/9SKIVydygcy78 ddmtNFebrN5VgRt7eH3OG7eexQv+VuJsqT9JnjJ3QGd3AaV0l5hT0JbDpyiidNNXN77ZxSLu vk2uN34wCOVF4wdcqBCnwMT4H41qD2fMKPW29/O/Y/gjP+9g+V1A== X-Talos-CUID: 9a23:ohZfuGF0dMTMVjdhqmJZrHINXeoafkeNj3fdPwioC3ljZuy8HAo= X-Talos-MUID: 9a23:GBp5vwXBqT4llInq/GbG2g1JOMdG2KWjKEMVqsgIlfOeBzMlbg== X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="110112539" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH 03/15] build, x86: clean build log for boot/ targets Date: Tue, 23 May 2023 17:37:59 +0100 Message-ID: <20230523163811.30792-4-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com> References: <20230523163811.30792-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1684859937533100001 Content-Type: text/plain; charset="utf-8" We are adding %.lnk to .PRECIOUS or make treat them as intermediate targets and remove them. Signed-off-by: Anthony PERARD Reviewed-by: Andrew Cooper Tested-by: Andrew Cooper --- xen/arch/x86/boot/Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index 03d8ce3a9e..2693b938bd 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -5,6 +5,8 @@ head-bin-objs :=3D cmdline.o reloc.o nocov-y +=3D $(head-bin-objs) noubsan-y +=3D $(head-bin-objs) targets +=3D $(head-bin-objs) +targets +=3D $(head-bin-objs:.o=3D.bin) +targets +=3D $(head-bin-objs:.o=3D.lnk) =20 head-bin-objs :=3D $(addprefix $(obj)/,$(head-bin-objs)) =20 @@ -26,10 +28,16 @@ $(head-bin-objs): XEN_CFLAGS :=3D $(CFLAGS_x86_32) -fpic LDFLAGS_DIRECT-$(call ld-option,--warn-rwx-segments) :=3D --no-warn-rwx-se= gments LDFLAGS_DIRECT +=3D $(LDFLAGS_DIRECT-y) =20 -%.bin: %.lnk - $(OBJCOPY) -j .text -O binary $< $@ +%.bin: OBJCOPYFLAGS :=3D -j .text -O binary +%.bin: %.lnk FORCE + $(call if_changed,objcopy) =20 -%.lnk: %.o $(src)/build32.lds - $(LD) $(subst x86_64,i386,$(LDFLAGS_DIRECT)) -N -T $(filter %.lds,$^) -o = $@ $< +quiet_cmd_ld_lnk_o =3D LD $@ +cmd_ld_lnk_o =3D $(LD) $(subst x86_64,i386,$(LDFLAGS_DIRECT)) -N -T $(filt= er %.lds,$^) -o $@ $< + +%.lnk: %.o $(src)/build32.lds FORCE + $(call if_changed,ld_lnk_o) =20 clean-files :=3D *.lnk *.bin + +.PRECIOUS: %.lnk --=20 Anthony PERARD From nobody Wed Nov 27 23:47:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1684859942; cv=none; d=zohomail.com; s=zohoarc; b=XEh1KE6FRrNECkXjcO6BU3GSRyIAELEzQL/N3yxokxJ0E0N2lBjUO04/F70nMdTLUvb8ViYyROk0QZiBHn3XK0pfeEfnIoFysLFe2ULrvLMri84XGPKohLDj1vGNzp2ti1u3LqQd7UIUUCSEwd72ujNxZgh+mmK9QETxMhs03ug= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684859942; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GtnAyYm7Vs9a3zwPcUAxvtnbKBoEa1oBfD/S6oKEV4Y=; b=dDeiELj3xwRJOrc/JXr6dLjWlBaX7UePvXZpx8KlMiS6Z6Mlv8c8b3MGegePAE7vyWWbY8dG96wshHYYsVC5OwrYnxahn2suUN1OTGn6XYBhJbD/nm7uVA1j9gPiNg/KTQJr8hw+W90puGee5UCU5UpkWNHttYIGzsQes1sOmao= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1684859942471259.73606566328624; Tue, 23 May 2023 09:39:02 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.538555.838604 (Exim 4.92) (envelope-from ) id 1q1V1y-0007Jz-2A; Tue, 23 May 2023 16:38:38 +0000 Received: by outflank-mailman (output) from mailman id 538555.838604; Tue, 23 May 2023 16:38:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V1x-0007Jo-Vj; Tue, 23 May 2023 16:38:37 +0000 Received: by outflank-mailman (input) for mailman id 538555; Tue, 23 May 2023 16:38:36 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V1w-0006Dr-3m for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:38:36 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 415f2f5f-f988-11ed-8611-37d641c3527e; Tue, 23 May 2023 18:38:34 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 415f2f5f-f988-11ed-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859914; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IEGR3JC5y7uEKhXS+Y9a7VtCNob5XWmUbPOoOUvPi10=; b=cDkzbdqIILspKHeRoP+W1aLY9tz8Pt3L99A2u5Lx2rOsepGySQEUneJk G1c9gnb+mIYXGzxpg0lGW3M5ACERAWmYWBIktrhCmyKI9fEv95a3viToL CfOVdgsTtVX/QSi5BLtBTadJDwfsaMtkGR4m7TdQKh7UQFWQLwjwcqLbj I=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 112568309 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:GKpitKNvQsKLJbnvrR2tl8FynXyQoLVcMsEvi/4bfWQNrUomhDZTy jYXXGyAPfqNZjH3L953bd/j8RhS6pfcy9c1TQto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQAOKnUoYoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGjxSs/rrRC9H5qyo42tF5AdmP5ingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0uBQGlgV6 N4REhZTcTuGi/Ky8buJYPY506zPLOGzVG8eknRpzDWfBvc6W5HTBa7N4Le03h9p2JoIR6yHI ZNEN3w2Nk+ojx5nYz/7DLo3mvuogX/uNSVVsluPqYI84nTJzRw327/oWDbQUoXTH5gLzh3A9 woq+UynEwgTN9ux4gG5rHaGp8KMkyShdYQdQejQGvlC3wTImz175ActfUu2p7y1h1CzX/pbK lcI4Ww+oK4q7kupQ9LhGRqirxassgYHXttME8Uz8AyX1rfP+AGdG3QFSThaLtchsacLqScCj wHT2YmzXHo27ePTECjGnluJkd+sES4yNlZZeA0Ndy1b/PLmrJE3vxv9ZMk2RcZZkebJMT33x jmLqg03iLMSkdMH2s2HwLzXv96/jsOXF1Bov207Skrgt1okP9D9O+RE/HCBtZ59wJClok5tV ZTus+yX96gwAJ6Ej0Rhq81dTejyt55p3NAx6GOD/qXNFRz3oxZPnqgKulmSwXuF1e5aEQIFm GeJ5WtsCGZ7ZRNGl5NfbYOrENgNxqP9D9njXf28RoMQMsQuJFfbp3A3PRL4M4XRfK8EyPtXB HtmWZz0USZy5VpPl1JauNvxIZd0n3tjlAs/tLjwzgi90Kr2WUN5vYwtaQPUBshgtfPsnekg2 4oHXyd840kFAbKWj+i+2dJ7EG3m2lBgXcqn9JMPJr/fSuekcUl4Y8LsLXoaU9QNt8xoei3gp RlRhmcwJILDuED6 IronPort-HdrOrdr: A9a23:ZH80mahGIJG3ZyMc8MxBHr1FMnBQXrkji2hC6mlwRA09TyX4ra CTdZEgviMc5wx9ZJhNo7q90cq7IE80i6Qb3WB5B97LYOCMggeVxe9Zg7ff/w== X-Talos-CUID: 9a23:BCGbFG/R8fdHfma3dIaVv0gzAfl+b1/U9lGOPGS9BXZtebSnY0DFrQ== X-Talos-MUID: 9a23:U3QjYwnkB/TNRTWZubgZdno8Jd5h4KOAI3sxz5EsmuTHOysqFjGS2WE= X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="112568309" From: Anthony PERARD To: CC: Anthony PERARD , "Daniel P. Smith" Subject: [XEN PATCH 04/15] build: hide policy.bin commands Date: Tue, 23 May 2023 17:38:00 +0100 Message-ID: <20230523163811.30792-5-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com> References: <20230523163811.30792-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1684859944188100009 Content-Type: text/plain; charset="utf-8" Instead, show only when "policy.bin" is been updated. We still have the full command from the flask/policy Makefile, but we can't change that Makefile. Signed-off-by: Anthony PERARD Acked-by: Daniel P. Smith --- xen/xsm/flask/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 3fdcf7727e..fc44ad684f 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -48,10 +48,15 @@ targets +=3D flask-policy.S FLASK_BUILD_DIR :=3D $(abs_objtree)/$(obj) POLICY_SRC :=3D $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION) =20 +policy_chk =3D \ + $(Q)if ! cmp -s $(POLICY_SRC) $@; then \ + $(kecho) ' UPD $@'; \ + cp $(POLICY_SRC) $@; \ + fi $(obj)/policy.bin: FORCE - $(MAKE) -f $(XEN_ROOT)/tools/flask/policy/Makefile.common \ + $(Q)$(MAKE) -f $(XEN_ROOT)/tools/flask/policy/Makefile.common \ -C $(XEN_ROOT)/tools/flask/policy \ FLASK_BUILD_DIR=3D$(FLASK_BUILD_DIR) POLICY_FILENAME=3D$(POLICY_S= RC) - cmp -s $(POLICY_SRC) $@ || cp $(POLICY_SRC) $@ + $(call policy_chk) =20 clean-files :=3D policy.* $(POLICY_SRC) --=20 Anthony PERARD From nobody Wed Nov 27 23:47:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1684859959; cv=none; d=zohomail.com; s=zohoarc; b=JOw9oOHwRMINTbvkxJFtHiqVkXZ+Ei3xkRVJ2zbHpXtGgBD/kV5OxLUL54K/vm9+FVK3ilA4OyMvSHa+cV1YNlXtsDtJ14nEasdKZU1VZagjs0rM7TE5v7YtfvkLtCuuhO43mWJIFw/3MeHEi9bMFsrf5Oge580YU2w9SrrPiHw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684859959; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dBwMpF3F8q17UvCIGgZ/U8VXhmVNKrz50SOmZAmLB+M=; b=KuIkrfbIdnlBNAaYXx+Ac3HmPsdCS4ubA2rWDFKHyRB1nZMtuHzrL6fh/DKk6Q6xtic954c0kXANPEqVubFsqMKYQf0fVchDBmZ3/KKi+EybKweFUGbkw3cSyuJVbgwvqmloTj9xqb2pmYF7Izmr98VKswUD/E+wFJD2Vc5yzQk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1684859959915976.086173180275; Tue, 23 May 2023 09:39:19 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.538567.838665 (Exim 4.92) (envelope-from ) id 1q1V2J-0001y2-EL; Tue, 23 May 2023 16:38:59 +0000 Received: by outflank-mailman (output) from mailman id 538567.838665; Tue, 23 May 2023 16:38:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V2J-0001x6-AR; Tue, 23 May 2023 16:38:59 +0000 Received: by outflank-mailman (input) for mailman id 538567; Tue, 23 May 2023 16:38:57 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V2H-0006Dq-Ij for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:38:57 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 4e613f36-f988-11ed-b22d-6b7b168915f2; Tue, 23 May 2023 18:38:56 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 4e613f36-f988-11ed-b22d-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859936; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1S/PIs/4N3VAkKwJ+CBkSKlCj5ulIeeoVMLk5Q/XC08=; b=ReGjuiPeDNGs5/wWMLup3ywIS2NAdQ8aqbibv7LZRQ2OZr2HV2MwNDrF T7Xn86TkJ8VO3jIu3ONEOC6u8iQEECaz5PhjkE4W8PLFtL+ZD+PhCCzed r7K7+pVWaEFz21b2BkFTVXMG/x8/cjcOUM/h6PK/e0HDGjfkqNA+kb3/K Q=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 109985443 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:n7tHLaiFli/lPQhkHvJ7ujoCX161UhAKZh0ujC45NGQN5FlHY01je htvWmGFOv2LZmD8fYp+OYy18BhS6MPdnIRlGQJo/ClnRi4b9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrWCYmYpHlUMpB4J0XpLg/Q+jpNjne+3CgaMv cKai8DEMRqu1iUc3lg8sspvkzsx+qyq0N8klgZmP6sT4QWFzyN94K83fsldEVOpGuG4IcbiL wrz5OnR1n/U+R4rFuSknt7TGqHdauePVeQmoiM+t5mK2nCulARrukoIHKN0hXNsoyeIh7hMJ OBl7vRcf+uL0prkw4zxWzEAe8130DYvFLXveRBTu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RAEYTAHA== X-Talos-MUID: 9a23:1zO0yQaC0Av2oOBT7i/dji1hLf1U5JuzN0I2m4Ud5veGKnkl X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="109985443" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH 05/15] build: introduce a generic command for gzip Date: Tue, 23 May 2023 17:38:01 +0100 Message-ID: <20230523163811.30792-6-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com> References: <20230523163811.30792-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1684859961341100001 Content-Type: text/plain; charset="utf-8" Make the gzip command generic and use -9 which wasn't use for config.gz. (xen.gz does use -9) Signed-off-by: Anthony PERARD --- xen/Rules.mk | 5 +++++ xen/common/Makefile | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 59072ae8df..68b10ca5ef 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -63,6 +63,11 @@ cmd_objcopy =3D $(OBJCOPY) $(OBJCOPYFLAGS) $< $@ quiet_cmd_binfile =3D BINFILE $@ cmd_binfile =3D $(SHELL) $(srctree)/tools/binfile $(BINFILE_FLAGS) $@ $(2) =20 +# gzip +quiet_cmd_gzip =3D GZIP $@ +cmd_gzip =3D \ + cat $(real-prereqs) | gzip -n -f -9 > $@ + # Figure out what we need to build from the various variables # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D =20 diff --git a/xen/common/Makefile b/xen/common/Makefile index 46049eac35..f45f19c391 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -78,13 +78,13 @@ obj-$(CONFIG_NEEDS_LIBELF) +=3D libelf/ obj-$(CONFIG_HAS_DEVICE_TREE) +=3D libfdt/ =20 CONF_FILE :=3D $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(objtree)/)$(KCONFI= G_CONFIG) -$(obj)/config.gz: $(CONF_FILE) - gzip -n -c $< >$@ +$(obj)/config.gz: $(CONF_FILE) FORCE + $(call if_changed,gzip) + +targets +=3D config.gz =20 $(obj)/config_data.o: $(obj)/config.gz =20 $(obj)/config_data.S: $(srctree)/tools/binfile FORCE $(call if_changed,binfile,$(obj)/config.gz xen_config_data) targets +=3D config_data.S - -clean-files :=3D config.gz --=20 Anthony PERARD From nobody Wed Nov 27 23:47:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1684859939; cv=none; d=zohomail.com; s=zohoarc; b=Kl08KEr8mKWZxtquwk26YzSGObh6QVE+gkHMHPd7bSUJbjrZWTS/QgL+1pksj5k72EIVgpTfM67Gq7DssxX5CCZ8j4v0Xj4aU+Ofly8/yoqLEUN6e5Lv1LLgC6FYCprX+kipImmhEzhdXttDpXOnxiJp9od4ioiyJqWf5EAcJXg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684859939; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BQ/3kO+NBYlaCcQDzHC+ipucuetYWUWIQuN5RXKgVUg=; b=npE/M+XTTj2uXQu4biWbR3L9cXulJFWH+D2XPgCGeeULXXtgrbDWDF6dTIWE9rT38/YNsVD37Tfjrvb0SauUcgQ6fc8JEEeOwYtLZswkwg2928rEAuwaGXp1LuJk/ARHFMjJGulk5kO4odGcztDq6Pjmub0fGoTg1LBWPa2oXVk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1684859939452452.7803352344341; Tue, 23 May 2023 09:38:59 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.538556.838610 (Exim 4.92) (envelope-from ) id 1q1V1y-0007RW-Iu; Tue, 23 May 2023 16:38:38 +0000 Received: by outflank-mailman (output) from mailman id 538556.838610; Tue, 23 May 2023 16:38:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V1y-0007PQ-E5; Tue, 23 May 2023 16:38:38 +0000 Received: by outflank-mailman (input) for mailman id 538556; Tue, 23 May 2023 16:38:37 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V1x-0006Dq-Jl for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:38:37 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 42cb2ca4-f988-11ed-b22d-6b7b168915f2; Tue, 23 May 2023 18:38:36 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 42cb2ca4-f988-11ed-b22d-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859916; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oXOI7IkQMJP7o4IIkYu8XpZs5Gw1LndgpIXVIuwSGWc=; b=dcSCdl1DFMRYwiNWU9AoKyUN1Zz1KocQVbmVceRRGVDsRwEyOzuz7K24 vrdrLUMAEiz6DgXMQJykwgMlskB3fte9isnp8k816utr3mLy8JcKLDQUZ fF3PlXwGbn5dxcJJatsMUfwhAaxBiU27oXiOzbEoIZ0dkKtxqa9Y1jI42 0=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 108859051 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:MSn1xa06NhDT0h62v/bD5eBxkn2cJEfYwER7XKvMYLTBsI5bpzYOz DQdDTjVOP+Pa2qnL4t0b9+z8UlT6J+BmIVhTgRopC1hF35El5HIVI+TRqvS04F+DeWYFR46s J9OAjXkBJppJpMJjk71atANlVEliefTAOK6ULWeUsxIbVcMYD87jh5+kPIOjIdtgNyoayuAo tq3qMDEULOf82cc3lk8teTb8HuDgNyo4GlD5gFkPqgR1LPjvyJ94Kw3dPnZw0TQGuG4LsbiL 87fwbew+H/u/htFIrtJRZ6iLyXm6paLVeS/oiI+t5qK23CulQRrukoPD9IOaF8/ttm8t4sZJ OOhF3CH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ba a01458iBeLX28YVci/DmltZZm/mzWa/KiWGSLvHnQcmXKzsQ8= X-Talos-CUID: =?us-ascii?q?9a23=3AZ/4+8mqaoIlVBmf42RefWZ7mUZ4aIyKHyyrWH1O?= =?us-ascii?q?pDExDarGcVHKcw4oxxg=3D=3D?= X-Talos-MUID: 9a23:XrUydwUSV5H+wBDq/C7UvANJasY32YHwGlpTq8oUvvehGCMlbg== X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="108859051" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH 06/15] build: quiet for .allconfig.tmp target Date: Tue, 23 May 2023 17:38:02 +0100 Message-ID: <20230523163811.30792-7-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com> References: <20230523163811.30792-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1684859940273100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anthony PERARD --- xen/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/Makefile b/xen/Makefile index e89fc461fc..27f70d2200 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -339,7 +339,7 @@ filechk_kconfig_allconfig =3D \ : =20 .allconfig.tmp: FORCE - set -e; { $(call filechk_kconfig_allconfig); } > $@ + $(Q)set -e; { $(call filechk_kconfig_allconfig); } > $@ =20 config: tools_fixdep outputmakefile FORCE $(Q)$(MAKE) $(build)=3Dtools/kconfig $@ --=20 Anthony PERARD From nobody Wed Nov 27 23:47:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1684859943; cv=none; d=zohomail.com; s=zohoarc; b=O67MwLERYlJQCAquTEu2Ebq/l0K7X0F0EeGYUFuJwHFUZ8vgpCdVdAgfWQfDHJc+07iwhMtDP4xCKshS65RqyLgYEpMy0f+t7ieUO5tgDtthatj3WcUJ0mNkjVHYw8iNwQN/FnLYqdhiioqaICbj32JGlF4PMampZ0frBSwKxFM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684859943; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2+WnXZbKHwSOzYhlqH1jg3mZw1oJng2gTfCgv56SEO8=; b=kAqF1tEqUCHa7CtZf+RCyb8ob7DQUWyJ2sBjizMU85EDnyIQe+IUfWAX52damtbkJt9tEy9C1pYNj2K5150dPFRFqtFhI692huuFg+uwG50kqoD8mla+jmijlzskzFQKhoNsvT100RvDre5dUrzcBdojx1MCW9nUMN2Zfu86JbM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1684859943014359.7595864287332; Tue, 23 May 2023 09:39:03 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.538557.838625 (Exim 4.92) (envelope-from ) id 1q1V20-0007tq-SG; Tue, 23 May 2023 16:38:40 +0000 Received: by outflank-mailman (output) from mailman id 538557.838625; Tue, 23 May 2023 16:38:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V20-0007td-O9; Tue, 23 May 2023 16:38:40 +0000 Received: by outflank-mailman (input) for mailman id 538557; Tue, 23 May 2023 16:38:39 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V1z-0006Dq-EZ for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:38:39 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 4409e439-f988-11ed-b22d-6b7b168915f2; Tue, 23 May 2023 18:38:38 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 4409e439-f988-11ed-b22d-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859918; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PR1Nr1IkdQd7XuTeHUYIINkb87rvsAFhUL6D4IH39fU=; b=WJ655CNxJCkwLw/sitlRzO+VagKoN294YMpWqp81TYVbGh/mLcMpPLh3 iFEcDf/UD1c0s+SgCXB48gn8ZTfJkTzmEq6W1yFKJ9IeoT0Xt6a7JydZP lP4PyQjTmSJ/Tdg0v7AU01PZaxZAkX0AJ3lrRqZTEbRtd0Fu/rXTbe5CJ c=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 110112559 X-Ironport-Server: esa3.hc3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qzTwxOi2LuYQXeaT7YZLVeDBtwEALO4TBb9q IgGaZbTo/lLeKinO3SMr9ZPRbwfBSJjba0avfC7YQJqzuBOPGg6Q8Hczro6E2COt/QEz7yYl p1Rt6Ix9bYeuZElAV/SApyAQOm1NXqakZ7cFXJEALpQ8yJ/CbtDFY9GH3fNQZEp9fZ40dl/R OQfdsOLD5xnE2qXp2tNNcWm/dU6KHxHYD5i2AL8OlACk2NIHVSVqrcIgCO0nMXxMsZHnZRn+ ODxvu8qaZECWx5jHK7rVR5b9Hvo5SJ1sLsrDyP1zix7JB2EHH5Cd3ag0Zfa4qgkdX3++9dt/ 13OW0ZH+rGd8tNdHRugrfnskrpF2tBWRiJyd1Q3J57tXcUG1gJPGbN9bds= IronPort-HdrOrdr: A9a23:0IHgGKmRtA4cNC69p2DmB8OQnoLpDfLo3DAbv31ZSRFFG/Fw9/ rCoB17726QtN91YhsdcL+7V5VoLUmzyXcX2/hyAV7BZmnbUQKTRekP0WKL+Vbd8kbFh41gPM lbEpSXCLfLfCJHZcSR2njELz73quP3jJxBho3lvghQpRkBUdAF0+/gYDzranGfQmN9dP0EPa vZ3OVrjRy6d08aa8yqb0N1JNQq97Xw5fTbiQdtPW9f1DWz X-Talos-CUID: 9a23:DZ5qBW2iCXgj3n4NC14DwbxfK5kYSEb0wHPpO2i6L0cwUqK4UEGR9/Yx X-Talos-MUID: 9a23:/+oh6wQgM/5RClhHRXS31T9kMsNx/562AX1Sisg74vaqKgNvbmI= X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="110112559" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu , Bertrand Marquis , Volodymyr Babchuk , Bob Eshleman , Alistair Francis , Connor Davis , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , "Konrad Rzeszutek Wilk" , Ross Lagerwall Subject: [XEN PATCH 07/15] build: move XEN_HAS_BUILD_ID out of Config.mk Date: Tue, 23 May 2023 17:38:03 +0100 Message-ID: <20230523163811.30792-8-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com> References: <20230523163811.30792-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1684859943288100007 Content-Type: text/plain; charset="utf-8" Whether or not the linker can do build id is only used by the hypervisor build, so move that there. Rename $(build_id_linker) to $(XEN_LDFLAGS_BUILD_ID) as this is a better name to be exported as to use the "XEN_*" namespace. Also update XEN_TREEWIDE_CFLAGS so flags can be used for arch/x86/boot/ CFLAGS_x86_32 Beside a reordering of the command line where CFLAGS is used, there shouldn't be any other changes. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu --- Config.mk | 12 ------------ xen/Makefile | 12 ++++++++++++ xen/arch/arm/Makefile | 2 +- xen/arch/riscv/Makefile | 2 +- xen/arch/x86/Makefile | 12 ++++++------ xen/scripts/Kbuild.include | 3 +++ xen/test/livepatch/Makefile | 4 ++-- 7 files changed, 25 insertions(+), 22 deletions(-) diff --git a/Config.mk b/Config.mk index d12d4c2b8f..27f48f654a 100644 --- a/Config.mk +++ b/Config.mk @@ -125,18 +125,6 @@ endef check-$(gcc) =3D $(call cc-ver-check,CC,0x040100,"Xen requires at least gc= c-4.1") $(eval $(check-y)) =20 -ld-ver-build-id =3D $(shell $(1) --build-id 2>&1 | \ - grep -q build-id && echo n || echo y) - -export XEN_HAS_BUILD_ID ?=3D n -ifeq ($(call ld-ver-build-id,$(LD)),n) -build_id_linker :=3D -else -CFLAGS +=3D -DBUILD_ID -export XEN_HAS_BUILD_ID=3Dy -build_id_linker :=3D --build-id=3Dsha1 -endif - define buildmakevars2shellvars export PREFIX=3D"$(prefix)"; = \ export XEN_SCRIPT_DIR=3D"$(XEN_SCRIPT_DIR)"; = \ diff --git a/xen/Makefile b/xen/Makefile index 27f70d2200..4dc960df2c 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -286,6 +286,18 @@ CFLAGS +=3D $(CLANG_FLAGS) export CLANG_FLAGS endif =20 +# XEN_HAS_BUILD_ID needed by Kconfig +ifeq ($(call ld-ver-build-id,$(LD)),n) +XEN_LDFLAGS_BUILD_ID :=3D +XEN_HAS_BUILD_ID :=3D n +else +CFLAGS +=3D -DBUILD_ID +XEN_TREEWIDE_CFLAGS +=3D -DBUILD_ID +XEN_HAS_BUILD_ID :=3D y +XEN_LDFLAGS_BUILD_ID :=3D --build-id=3Dsha1 +endif +export XEN_HAS_BUILD_ID XEN_LDFLAGS_BUILD_ID + export XEN_HAS_CHECKPOLICY :=3D $(call success,$(CHECKPOLICY) -h 2>&1 | gr= ep -q xen) =20 # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 4d076b278b..1cc57d2cf0 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -102,7 +102,7 @@ $(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ | $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1.S $(MAKE) $(build)=3D$(@D) $(@D)/.$(@F).1.o - $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(XEN_LDFLAGS_BUILD_ID) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \ diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile index 443f6bf15f..8a0e483c66 100644 --- a/xen/arch/riscv/Makefile +++ b/xen/arch/riscv/Makefile @@ -9,7 +9,7 @@ $(TARGET): $(TARGET)-syms $(OBJCOPY) -O binary -S $< $@ =20 $(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds - $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) -o $@ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(XEN_LDFLAGS_BUILD_ID) -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \ >$(@D)/$(@F).map diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 2672d7f4ee..c7ec315fe6 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -100,7 +100,7 @@ efi-y :=3D $(shell if [ ! -r $(objtree)/include/xen/com= pile.h -o \ $(space) efi-$(CONFIG_PV_SHIM_EXCLUSIVE) :=3D =20 -ifneq ($(build_id_linker),) +ifneq ($(XEN_LDFLAGS_BUILD_ID),) notes_phdrs =3D --notes else ifeq ($(CONFIG_PVH_GUEST),y) @@ -136,19 +136,19 @@ $(TARGET): $(TARGET)-syms $(efi-y) $(obj)/boot/mkelf32 CFLAGS-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI =20 $(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds - $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(XEN_LDFLAGS_BUILD_ID) \ $(objtree)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \ >$(@D)/.$(@F).0.S $(MAKE) $(build)=3D$(@D) $(@D)/.$(@F).0.o - $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(XEN_LDFLAGS_BUILD_ID) \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ | $(objtree)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-= y) \ >$(@D)/.$(@F).1.S $(MAKE) $(build)=3D$(@D) $(@D)/.$(@F).1.o - $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(XEN_LDFLAGS_BUILD_ID) \ $(orphan-handling-y) $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \ @@ -186,10 +186,10 @@ relocs-dummy :=3D $(obj)/efi/relocs-dummy.o $(TARGET).efi: ALT_BASE =3D 0x$(shell $(NM) $(obj)/efi/relocs-dummy.o | se= d -n 's, A ALT_START$$,,p') endif =20 -ifneq ($(build_id_linker),) +ifneq ($(XEN_LDFLAGS_BUILD_ID),) ifeq ($(call ld-ver-build-id,$(LD) $(filter -m%,$(EFI_LDFLAGS))),y) CFLAGS-y +=3D -DBUILD_ID_EFI -EFI_LDFLAGS +=3D $(build_id_linker) +EFI_LDFLAGS +=3D $(XEN_LDFLAGS_BUILD_ID) note_file :=3D $(obj)/efi/buildid.o # NB: this must be the last input in the linker call, because inputs follo= wing # the -b option will all be treated as being in the specified format. diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index 785a32c32e..d820595e2f 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -91,6 +91,9 @@ cc-ifversion =3D $(shell [ $(CONFIG_GCC_VERSION)0 $(1) $(= 2)000 ] && echo $(3) || e =20 clang-ifversion =3D $(shell [ $(CONFIG_CLANG_VERSION)0 $(1) $(2)000 ] && e= cho $(3) || echo $(4)) =20 +ld-ver-build-id =3D $(shell $(1) --build-id 2>&1 | \ + grep -q build-id && echo n || echo y) + ### # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=3D # Usage: diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile index c258ab0b59..c78f3ce06f 100644 --- a/xen/test/livepatch/Makefile +++ b/xen/test/livepatch/Makefile @@ -37,7 +37,7 @@ $(obj)/modinfo.o: =20 # # This target is only accessible if CONFIG_LIVEPATCH is defined, which -# depends on $(build_id_linker) being available. Hence we do not +# depends on $(XEN_LDFLAGS_BUILD_ID) being available. Hence we do not # need any checks. # # N.B. The reason we don't use arch/x86/note.o is that it may @@ -142,7 +142,7 @@ xen_expectations_fail-objs :=3D xen_expectations_fail.o= xen_hello_world_func.o not =20 =20 quiet_cmd_livepatch =3D LD $@ -cmd_livepatch =3D $(LD) $(XEN_LDFLAGS) $(build_id_linker) -r -o $@ $(real-= prereqs) +cmd_livepatch =3D $(LD) $(XEN_LDFLAGS) $(XEN_LDFLAGS_BUILD_ID) -r -o $@ $(= real-prereqs) =20 $(obj)/%.livepatch: FORCE $(call if_changed,livepatch) --=20 Anthony PERARD From nobody Wed Nov 27 23:47:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1684859949; cv=none; d=zohomail.com; s=zohoarc; b=W2xnQ/sQHFm13y8bVqptkQEbtco68OuIoRkpcz+dia59i0wmiFLQcjfveBuSbACz1HoDmLGN/8QHjvk7NwCSX+YFH2QGbsxZ6s574AWZlOH1Ix4aL4uXkM5RatDGadYVSvMW/F1F0yGsa3N+oywHI47+n+d/Rh40JIaI0C7iOHw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684859949; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=E17vh1mBL7js5M5lwr4eXOnePFWTTSX1pp2RmOnvNsc=; b=YkZdpuDAa4VLCp3hXeSOJuxMZ+SXU0Y15yfOhbo7ldKG8uY4Z94fIxpQSaC1HUTMc4hkmv6ZwgdjuwVzZgy8xVgQPzS1MzMykC0/psPlC4Li7X3YpEbwmN1a+dmLIk+iBGWA/awflj/pNveYzo0tVuz8yGU3jVw89IwCOwZoxGQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1684859949509362.656283163406; Tue, 23 May 2023 09:39:09 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.538558.838635 (Exim 4.92) (envelope-from ) id 1q1V26-0008Vq-7N; Tue, 23 May 2023 16:38:46 +0000 Received: by outflank-mailman (output) from mailman id 538558.838635; Tue, 23 May 2023 16:38:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V26-0008Vc-3s; Tue, 23 May 2023 16:38:46 +0000 Received: by outflank-mailman (input) for mailman id 538558; Tue, 23 May 2023 16:38:44 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V24-0006Dq-9a for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:38:44 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 471c51cd-f988-11ed-b22d-6b7b168915f2; Tue, 23 May 2023 18:38:43 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 471c51cd-f988-11ed-b22d-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859923; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UqV5mZcPJiexqI58U22QslwrAPllWJ5ALOxWdCDzORY=; b=O3tEw0qI4P5vtfAvRaAQ8FRNE2lHMLsnTPjy+UQ6yFDEW6qBgrgbpGJ+ oOjqHpHfCDizEJa89+e1c5pJnR3oP0vkkHtZb4ALLEAhUdOUfaVF9/yzy qgG3s5+1Mu6LBfaAPgWhRpl2SGQDYMhpx0nXWsc4XEtXZ0r14pSgbAh9Q Y=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 109422951 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:jbqg+q/wFFznlahHhgozDrUDs36TJUtcMsCJ2f8bNWPcYEJGY0x3y jFJCjqFPqqMa2fwKtgkaIiz901U6MeG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Z/5VAR1VWuVN7EYSd7HxM8im1EfJtHLKMQLISZIc sQ4 IronPort-HdrOrdr: A9a23:t42FNq4vKkCZFEnorQPXwPLXdLJyesId70hD6qkXc3Bom62j+P xG+c5x6faaslgssR0b+OxoWpPwIk80hKQU3WB5B97LNmTbUQCTXeNfBOXZslrdMhy72ulB1b pxN4hSYeeAa2SSVPyKhTVQxexQpOW6zA== X-Talos-CUID: =?us-ascii?q?9a23=3Ad5rPLWqI5dEx0IXWotB7xTPmUekfXiPxxijpGkG?= =?us-ascii?q?bAGFjEaXOEhyepIoxxg=3D=3D?= X-Talos-MUID: =?us-ascii?q?9a23=3A1GlSBAyDVmlAkAEsrfuyGZ1UCtOaqLyxEFFOm6k?= =?us-ascii?q?lh9aNHhdgNWaw1z+IboByfw=3D=3D?= X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="109422951" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH 08/15] build: use $(filechk, ) for all compat/.xlat/%.lst Date: Tue, 23 May 2023 17:38:04 +0100 Message-ID: <20230523163811.30792-9-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com> References: <20230523163811.30792-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1684859951284100003 Content-Type: text/plain; charset="utf-8" Make use of filechk mean that we don't have to use $(move-if-changed,). It also mean that will have sometime "UPD .." in the build output when the target changed, rather than having "GEN ..." all the time when "xlat.lst" happen to have a more recent modification timestamp. While there, replace `grep -v` by `sed '//d'` to avoid an extra fork and pipe when building. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu --- xen/include/Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/xen/include/Makefile b/xen/include/Makefile index 96d5f6f3c8..2e61b50139 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -93,15 +93,13 @@ targets +=3D $(patsubst compat/%, compat/.xlat/%, $(hea= ders-y)) $(obj)/compat/.xlat/%.h: $(obj)/compat/%.h $(obj)/compat/.xlat/%.lst $(src= tree)/tools/compat-xlat-header.py FORCE $(call if_changed,xlat_headers) =20 -quiet_cmd_xlat_lst =3D GEN $@ -cmd_xlat_lst =3D \ - grep -v '^[[:blank:]]*$(pound)' $< | sed -ne 's,@arch@,$(compat-arch-y),g= ' -re 's,[[:blank:]]+$*\.h[[:blank:]]*$$,,p' >$@.new; \ - $(call move-if-changed,$@.new,$@) +filechk_xlat_lst =3D \ + sed -ne '/^[[:blank:]]*$(pound)/d' -e 's,@arch@,$(compat-arch-y),g' -re '= s,[[:blank:]]+$*\.h[[:blank:]]*$$,,p' $< =20 .PRECIOUS: $(obj)/compat/.xlat/%.lst targets +=3D $(patsubst compat/%.h, compat/.xlat/%.lst, $(headers-y)) $(obj)/compat/.xlat/%.lst: $(srcdir)/xlat.lst FORCE - $(call if_changed,xlat_lst) + $(call filechk,xlat_lst) =20 xlat-y :=3D $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,^[?!][[:b= lank:]]+[^[:blank:]]+[[:blank:]]+,,p' $(srcdir)/xlat.lst | uniq) xlat-y :=3D $(filter $(patsubst compat/%,%,$(headers-y)),$(xlat-y)) --=20 Anthony PERARD From nobody Wed Nov 27 23:47:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1684859948; cv=none; d=zohomail.com; s=zohoarc; b=XJ7XdzHx9HKiB9TUT8iKYwK9XHVSjE9WjpXu5mMEI72wSrEU+bI5M65JCmb720azBdnmuZqe7oHYc7CGY9A5RwPSS/pVoft4nHTNa9tWeEArth5veOeBxV+RscnXjZluVLdaIUC/cPAEmLeN5BzWZe4xqAYlurJt7RcU7QT7Tg8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684859948; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=u6Fq8HMQyZOL/RAZF37XW5BXSVRp615zh+Jd33XEoSU=; b=ahxAGADtEjP77OoErtN+hiF6RTBsTnr7vVrNut6eFN5fv8JoDmshrsngd/gi2iTlCFLbdeSPk7xx5CdtqOnByfxxhZs4o4GK1hHrNT1a/fnV1ZUTNJy8fIuQPycE5FojW3I/vXCY9xsSDFIiyRF2PYSAMrAt1puCk9x6oUrU95Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1684859948866473.1881095000182; Tue, 23 May 2023 09:39:08 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.538559.838646 (Exim 4.92) (envelope-from ) id 1q1V27-0000Qq-PS; Tue, 23 May 2023 16:38:47 +0000 Received: by outflank-mailman (output) from mailman id 538559.838646; Tue, 23 May 2023 16:38:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V27-0000QP-En; Tue, 23 May 2023 16:38:47 +0000 Received: by outflank-mailman (input) for mailman id 538559; Tue, 23 May 2023 16:38:46 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V26-0006Dr-AB for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:38:46 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 47ad06e7-f988-11ed-8611-37d641c3527e; Tue, 23 May 2023 18:38:44 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 47ad06e7-f988-11ed-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859924; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/+AxULjDy0vT+JPl4g0BCJbfJV4FPatkg8JwDT25Ydw=; b=DYnhq5Jza+CZ0hGLVqwuGqwyIJqcaQqdXPWzO4G2bWRCbrnsYLfmJkNj NGqS2VDLcykKwD1vLVSbmbMU9Gjy6H14M40WGjat3yXTiMEdLj2Z5ZuQc X9/qTxWPUpSLq8Gq0q8g6DuhSFEtcZMqHBiJplSznMFNEMmUqcEWA4rPx 4=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 112568330 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:ln3pEaLH4atIe/nkFE+RHZUlxSXFcZb7ZxGr2PjKsXjdYENS3jIFx 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gp yjtMnK0PXKj3RUr3y3WMCE8AF4uNL4jxU8G0dsEZg7yiid8Odb+sM/ytfIfJNEayQCq9tYsJ 9FtRilKKq4npujvk9jFUaTAkQ== IronPort-HdrOrdr: A9a23:uSD24KF/IQNWRkV4pLqEi8eALOsnbusQ8zAXPiFKKSC9F/byqy nAppkmPHPP4gr5O0tApTn/Asa9qBrnnPZICOIqUYtKMjOJhFeV X-Talos-CUID: 9a23:7Y4ldm2+MZ6lVhgh5kdFTrxfAJl9K2Xn1CvpJ06BUWlEWrqUEnmM0fYx X-Talos-MUID: =?us-ascii?q?9a23=3Ajk0GIw3Msg/vtmLxBl65XDvjKTUj/4v2WEUzlbY?= =?us-ascii?q?8osyhHCpqNz2c0AS2e9py?= X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="112568330" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu , Doug Goldstein Subject: [XEN PATCH 09/15] build: hide commands run for kconfig Date: Tue, 23 May 2023 17:38:05 +0100 Message-ID: <20230523163811.30792-10-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com> References: <20230523163811.30792-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1684859950232100001 Content-Type: text/plain; charset="utf-8" but still show a log entry for syncconfig. We have to use kecho instead of $(cmd,) to avoid issue with prompt from kconfig. linux commits for reference: 23cd88c91343 ("kbuild: hide commands to run Kconfig, and show short log= for syncconfig") d952cfaf0cff ("kbuild: do not suppress Kconfig prompts for silent build= ") Signed-off-by: Anthony PERARD Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu --- xen/Makefile | 1 + xen/tools/kconfig/Makefile | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 4dc960df2c..127c0e40b5 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -382,6 +382,7 @@ $(KCONFIG_CONFIG): tools_fixdep # This exploits the 'multi-target pattern rule' trick. # The syncconfig should be executed only once to make all the targets. include/config/%.conf include/config/%.conf.cmd: $(KCONFIG_CONFIG) + $(Q)$(kecho) " SYNC $@" $(Q)$(MAKE) $(build)=3Dtools/kconfig syncconfig =20 ifeq ($(CONFIG_DEBUG),y) diff --git a/xen/tools/kconfig/Makefile b/xen/tools/kconfig/Makefile index b7b9a419ad..18c0f5d4f1 100644 --- a/xen/tools/kconfig/Makefile +++ b/xen/tools/kconfig/Makefile @@ -24,19 +24,19 @@ endif unexport CONFIG_ =20 xconfig: $(obj)/qconf - $< $(silent) $(Kconfig) + $(Q)$< $(silent) $(Kconfig) =20 gconfig: $(obj)/gconf - $< $(silent) $(Kconfig) + $(Q)$< $(silent) $(Kconfig) =20 menuconfig: $(obj)/mconf - $< $(silent) $(Kconfig) + $(Q)$< $(silent) $(Kconfig) =20 config: $(obj)/conf - $< $(silent) --oldaskconfig $(Kconfig) + $(Q)$< $(silent) --oldaskconfig $(Kconfig) =20 nconfig: $(obj)/nconf - $< $(silent) $(Kconfig) + $(Q)$< $(silent) $(Kconfig) =20 build_menuconfig: $(obj)/mconf =20 @@ -70,12 +70,12 @@ simple-targets :=3D oldconfig allnoconfig allyesconfig = allmodconfig \ PHONY +=3D $(simple-targets) =20 $(simple-targets): $(obj)/conf - $< $(silent) --$@ $(Kconfig) + $(Q)$< $(silent) --$@ $(Kconfig) =20 PHONY +=3D savedefconfig defconfig =20 savedefconfig: $(obj)/conf - $< $(silent) --$@=3Ddefconfig $(Kconfig) + $(Q)$< $(silent) --$@=3Ddefconfig $(Kconfig) =20 defconfig: $(obj)/conf ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) --=20 Anthony PERARD From nobody Wed Nov 27 23:47:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1684860483; cv=none; d=zohomail.com; s=zohoarc; b=lIPE5R1uE/QrjbdjgdsWpntnLNm8XwWz1wqRqfLtgJQY+CzX3DOoJUPlQ1IXMIRFKXRzHUH3Gt93AiGXeQDgGk2ws4Kex79ENkh9bNb1Wj3d2/808aqPdtr531vYQYWRG8DqNEe71TRbUIDej9uCngpac9b8DYEQHFcQVCU6nvQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684860483; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EYIDZQCFqjC9LZpmNEmoBml3mu8tWT3QFWnBhXj9Dn4=; b=meO0J7BSHG66seUeXQ1IOEevs5JnBFnksewLJepA1bNFrO0kXCWXVVnVwgEGktqTB/XVmm88akkBREswPUqX19jRUPxljdWnXvfhP+T/RYJ9wadSqh5aP5uG9p5p5vxhXxb3P53sQ/h3/nsEyg3TKk/4TCzEWDKDvcjIVQTPIAk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1684860483797125.9125325940787; Tue, 23 May 2023 09:48:03 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.538601.838711 (Exim 4.92) (envelope-from ) id 1q1VAd-0006ft-3j; Tue, 23 May 2023 16:47:35 +0000 Received: by outflank-mailman (output) from mailman id 538601.838711; Tue, 23 May 2023 16:47:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1VAc-0006de-Sg; Tue, 23 May 2023 16:47:34 +0000 Received: by outflank-mailman (input) for mailman id 538601; Tue, 23 May 2023 16:47:33 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V2Q-0006Dr-EE for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:39:06 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 5365c366-f988-11ed-8611-37d641c3527e; Tue, 23 May 2023 18:39:04 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 5365c366-f988-11ed-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859944; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CUr6Ia8hka4MDdYyEkCHkmCAcxvFP9VRnjNhVX7Kyj0=; b=QrX94MT2nLvMK7ov1dkRAEoc7v/E8vKdoyPHO/DszDViYpBAmSD6Jnx2 f8AzT8AZAVMeNCO73ZuztKU1D+10yFDHPwjlIOZRyuzDPY+JhihJ/tBbU roLvkU/BUpSneGTVrFzSHhEWn10AsxXKZYkt9nL0o+oSTXOQOflXiJa3c U=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 108859061 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:D/UT8aIYpTbgJanbFE+R4pUlxSXFcZb7ZxGr2PjKsXjdYENS1DMPm mZKCm7Qb62PZGXxfohyPNy2oUpX68fUy4JmSAtlqX01Q3x08seUXt7xwmUcnc+xBpaaEB84t ZV2hv3odp1coqr0/0/1WlTZhSAgk/rOHvykU7Ss1hlZHWdMUD0mhQ9oh9k3i4tphcnRKw6Ws Jb5rta31GWNglaYCUpKrfrbwP9TlK6q4mhA4wZlPaojUGL2zBH5MrpOfcldEFOgKmVkNrbSb /rOyri/4lTY838FYj9yuu+mGqGiaue60Tmm0hK6aYD76vRxjnVaPpIAHOgdcS9qZwChxLid/ jnvWauYEm/FNoWU8AgUvoIx/ytWZcWq85efSZSzXFD6I+QrvBIAzt03ZHzaM7H09c5HX2xi/ uEJFgscMEGmitOsm7uXds1V05FLwMnDZOvzu1llxDDdS/0nXYrCU+PB4towMDUY354UW6yEP oxANGQpNU6bC/FMEg5/5JYWleG0hn75YntApUicv6Yf6GnP1g1hlrPqNbI5f/TTHZUFwxfA+ DuuE2LREChKNMSNlyi86V2zrLXGnir0c78NLejtnhJtqALKnTFCYPEMbnOguuWwgEO6X9NZK mQX9zAooKx081akJvH/Qhm5rXisrhMaHd1KHIUS9wWl2qfSpQGDCQAsTDRMddgnv88eXiEx2 xmCmNaBLSxitviZRGyQ8p+QrCiuIm4FIGkafygGQAAZpd75r+kOYgnnF4g5VvTv15usRG+2m mrRxMQju1kNpf5V2omw4EH5uCPy973EfxRu7ynrelvwu2uVe7WZT4Cv7FHa69NJI4CYUkSNs RA4piSO0AwdJcrTzXLQGY3hCJnsvq/Ya2OE3TaDCrF7r1yQF2ifkZe8Cd2UDGNgKY46dDDge yc/UisBtcYIbBNGgUKaCr9d6vjGL4C6TbwJtdiONLKih6SdkyfZlByCnWbKgwjQfLEEyMnTw 6uzf8e2Fmo9Aq961jewTOp1+eZ1lnxhlTuPHsGil0jPPV+iiJm9EO1tDbdzRrphsPPsTPv9q L6zyPdmOz0ACbajM0E7AKYYLEwQLGhTOK0aX/d/L7bZSiI/QTFJNhMk6e95E2CTt/gPx7igE 7DUchMw9WcTclWccV/bNS87OOKzNXu9xFpiVRER0Z+T8yBLSe6SAG03J/PboZFPGDRf8MNJ IronPort-HdrOrdr: A9a23:xHAr66iFYpiKja7gCBVG0uA6YXBQXuIji2hC6mlwRA09TySZ// rBoB19726TtN9xYgBZpTnuAsm9qB/nmaKdpLNhWItKPzOW31dATrsSjrcKqgeIc0aVm9K1l5 0QF5SWYOeAdGSS5vya3ODXKbkdKaG8gcKVuds= X-Talos-CUID: 9a23:LWJsim4kRj7cSE9xI9ssxBAZNss4Y0Pm3SmBBkKJEz1gZIGxcArF X-Talos-MUID: 9a23:rxKyPgjR7Zoc9PX/l/qAdcMpJv4447y8VlI0iroZkZONNiV/EAqCtWHi X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="108859061" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH 10/15] build: rename $(AFLAGS) to $(XEN_AFLAGS) Date: Tue, 23 May 2023 17:38:06 +0100 Message-ID: <20230523163811.30792-11-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com> References: <20230523163811.30792-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1684860485664100005 Content-Type: text/plain; charset="utf-8" We don't want the AFLAGS from the environment, they are usually meant to build user space application and not for the hypervisor. Config.mk doesn't provied any $(AFLAGS) so we can start a fresh $(XEN_AFLAGS). Signed-off-by: Anthony PERARD Acked-by: Jan Beulich Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu --- xen/Makefile | 10 ++++++---- xen/arch/x86/arch.mk | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 127c0e40b5..c4a83fca76 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -258,6 +258,8 @@ export KBUILD_DEFCONFIG :=3D $(ARCH)_defconfig # reparsing Config.mk by e.g. arch/x86/boot/. export XEN_TREEWIDE_CFLAGS :=3D $(CFLAGS) =20 +XEN_AFLAGS =3D + # CLANG_FLAGS needs to be calculated before calling Kconfig ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) CLANG_FLAGS :=3D @@ -412,9 +414,9 @@ ifneq ($(CONFIG_CC_IS_CLANG),y) CFLAGS +=3D -Wa,--strip-local-absolute endif =20 -AFLAGS +=3D -D__ASSEMBLY__ +XEN_AFLAGS +=3D -D__ASSEMBLY__ =20 -$(call cc-option-add,AFLAGS,CC,-Wa$(comma)--noexecstack) +$(call cc-option-add,XEN_AFLAGS,CC,-Wa$(comma)--noexecstack) =20 LDFLAGS-$(call ld-option,--warn-rwx-segments) +=3D --no-warn-rwx-segments =20 @@ -425,7 +427,7 @@ CFLAGS +=3D $(EXTRA_CFLAGS_XEN_CORE) # Most CFLAGS are safe for assembly files: # -std=3Dgnu{89,99} gets confused by #-prefixed end-of-line comments # -flto makes no sense and annoys clang -AFLAGS +=3D $(filter-out -std=3Dgnu% -flto,$(CFLAGS)) $(AFLAGS-y) +XEN_AFLAGS +=3D $(filter-out -std=3Dgnu% -flto,$(CFLAGS)) $(AFLAGS-y) =20 # LDFLAGS are only passed directly to $(LD) LDFLAGS +=3D $(LDFLAGS_DIRECT) $(LDFLAGS-y) @@ -462,7 +464,7 @@ include $(srctree)/arch/$(TARGET_ARCH)/arch.mk =20 # define new variables to avoid the ones defined in Config.mk export XEN_CFLAGS :=3D $(CFLAGS) -export XEN_AFLAGS :=3D $(AFLAGS) +export XEN_AFLAGS :=3D $(XEN_AFLAGS) export XEN_LDFLAGS :=3D $(LDFLAGS) export CFLAGS_UBSAN =20 diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 7b5be9fe46..13ec88a628 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -80,7 +80,7 @@ ifeq ($(CONFIG_LD_IS_GNU),y) AFLAGS-$(call ld-option,--print-output-format) +=3D -DHAVE_LD_SORT_BY_INIT= _PRIORITY else # Assume all versions of LLD support this. -AFLAGS +=3D -DHAVE_LD_SORT_BY_INIT_PRIORITY +XEN_AFLAGS +=3D -DHAVE_LD_SORT_BY_INIT_PRIORITY endif =20 ifneq ($(CONFIG_PV_SHIM_EXCLUSIVE),y) --=20 Anthony PERARD From nobody Wed Nov 27 23:47:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1684859966; cv=none; d=zohomail.com; s=zohoarc; b=heTre2ElAoKV7oYDAuz/A9RbSmgD+vFsrhsEVW5+jtiJmuIDhTy1iAah00CtioKD08IrH8Jk+gMk47ijVxbbhEN+633D+6iE/ZeHhM8f45PNtoWWXm41Dvx3b2Seg9ZA9SYGK/xWKFp3kYHXovyvkIRFFPrhohSyt9LH2CouN/Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684859966; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UQ24MA9Iz3Do6i9qK7DRH0Nw4x9qHLyU1u3mTa6N5Wc=; b=GlwRzzQhujkx6pjq8cTCdOftnmrFP9mjDZ19DSn7GweWmKzw3jji86E/12/xO3OIlZ5lFfB7rOoTf73vttnzSHPzfmF969q9V4uAlave5ZzGUx4K15CeHECbigwkV6x/hX0o8O6jY0lcPoHQ+NFH7cu5Krv84IbtK11gKDX6tJ4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 16848599661261000.9465229429619; Tue, 23 May 2023 09:39:26 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.538571.838670 (Exim 4.92) (envelope-from ) id 1q1V2J-00027G-Vx; Tue, 23 May 2023 16:38:59 +0000 Received: by outflank-mailman (output) from mailman id 538571.838670; Tue, 23 May 2023 16:38:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V2J-000240-Pq; Tue, 23 May 2023 16:38:59 +0000 Received: by outflank-mailman (input) for mailman id 538571; Tue, 23 May 2023 16:38:59 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V2I-0006Dr-Ua for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:38:59 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 4eed198e-f988-11ed-8611-37d641c3527e; Tue, 23 May 2023 18:38:56 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 4eed198e-f988-11ed-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859936; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NQbxeavhneBRrc5N4TAMJ536RafB9YjyOc/ENwv/Ymk=; b=NGpLfxnujMQzESbFl3zoFl5z7trgZIOTN6hOAGjwMxY0S+rfik8Wmfoy Wa3N1jdv8NfpKDeiDMZcYr8sj0JHLWKwFLNeGWt2JZ3X4iHr3frqLHFL6 XAnUL2Hk9thB98XIaL88gNqazvt7U0FR28RrZDeX6CrT2MN3Hs4HUK9MZ c=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 109985465 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:xTHf2qoAs4rTChhkO6Qj8ZBj5lFeBmKqZRIvgKrLsJaIsI4StFCzt garIBnSOfaLNGv2Ltojb9i08E9Tvp7Rm4VnSQJq+301FXkRo5uZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpA1c/Ek/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKq04GtwUmAWP6gR5weDzSJNVvrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9Y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hC6mlwRA09TyX5ra 2TdZUgpHvJYVMqMk3I9uruBEDtex3hHP1OkOws1NWZLWrbUQKTRekP0WKF+Vzd8kXFndK1vp 0QEZSWZueRMbEAt7ec3OG5eexQvOVu8sqT9JjjJ6EGd3AVV0lihT0JezpyCidNNW977QJSLu vn2iJAzQDQAEg/X4CAKVQuefPMnNHPnIKOW296O/Z2gDP+9Q9B8dTBYmOl4is= X-Talos-CUID: 9a23:zQciRGOW3sj4YO5DSC1r8BMECvEfIkLgj3fqKkm2DFh5R+jA X-Talos-MUID: 9a23:bvn3Dwk6E3u5H3vQ4n4bdnpOOcF6wYGnWXkrlJwfv9i7MChtFRWC2WE= X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="109985465" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu , Bertrand Marquis , Volodymyr Babchuk , Bob Eshleman , Alistair Francis , Connor Davis , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH 11/15] build: rename CFLAGS to XEN_CFLAGS in xen/Makefile Date: Tue, 23 May 2023 17:38:07 +0100 Message-ID: <20230523163811.30792-12-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com> References: <20230523163811.30792-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1684859968341100001 Content-Type: text/plain; charset="utf-8" This is a preparatory patch. A future patch will not even use $(CFLAGS) to seed $(XEN_CFLAGS). Signed-off-by: Anthony PERARD Acked-by: Jan Beulich Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu --- xen/Makefile | 41 ++++++++++++++--------------- xen/arch/arm/arch.mk | 4 +-- xen/arch/riscv/arch.mk | 4 +-- xen/arch/x86/arch.mk | 58 +++++++++++++++++++++--------------------- 4 files changed, 54 insertions(+), 53 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index c4a83fca76..b3bffe8c6f 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -259,6 +259,7 @@ export KBUILD_DEFCONFIG :=3D $(ARCH)_defconfig export XEN_TREEWIDE_CFLAGS :=3D $(CFLAGS) =20 XEN_AFLAGS =3D +XEN_CFLAGS =3D $(CFLAGS) =20 # CLANG_FLAGS needs to be calculated before calling Kconfig ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) @@ -284,7 +285,7 @@ CLANG_FLAGS +=3D $(call or,$(t1),$(t2),$(t3)) endif =20 CLANG_FLAGS +=3D -Werror=3Dunknown-warning-option -CFLAGS +=3D $(CLANG_FLAGS) +XEN_CFLAGS +=3D $(CLANG_FLAGS) export CLANG_FLAGS endif =20 @@ -293,7 +294,7 @@ ifeq ($(call ld-ver-build-id,$(LD)),n) XEN_LDFLAGS_BUILD_ID :=3D XEN_HAS_BUILD_ID :=3D n else -CFLAGS +=3D -DBUILD_ID +XEN_CFLAGS +=3D -DBUILD_ID XEN_TREEWIDE_CFLAGS +=3D -DBUILD_ID XEN_HAS_BUILD_ID :=3D y XEN_LDFLAGS_BUILD_ID :=3D --build-id=3Dsha1 @@ -388,30 +389,30 @@ include/config/%.conf include/config/%.conf.cmd: $(KC= ONFIG_CONFIG) $(Q)$(MAKE) $(build)=3Dtools/kconfig syncconfig =20 ifeq ($(CONFIG_DEBUG),y) -CFLAGS +=3D -O1 +XEN_CFLAGS +=3D -O1 else -CFLAGS +=3D -O2 +XEN_CFLAGS +=3D -O2 endif =20 ifeq ($(CONFIG_FRAME_POINTER),y) -CFLAGS +=3D -fno-omit-frame-pointer +XEN_CFLAGS +=3D -fno-omit-frame-pointer else -CFLAGS +=3D -fomit-frame-pointer +XEN_CFLAGS +=3D -fomit-frame-pointer endif =20 CFLAGS-$(CONFIG_CC_SPLIT_SECTIONS) +=3D -ffunction-sections -fdata-sections =20 -CFLAGS +=3D -nostdinc -fno-builtin -fno-common -CFLAGS +=3D -Werror -Wredundant-decls -Wno-pointer-arith -$(call cc-option-add,CFLAGS,CC,-Wvla) -CFLAGS +=3D -pipe -D__XEN__ -include $(srctree)/include/xen/config.h +XEN_CFLAGS +=3D -nostdinc -fno-builtin -fno-common +XEN_CFLAGS +=3D -Werror -Wredundant-decls -Wno-pointer-arith +$(call cc-option-add,XEN_CFLAGS,CC,-Wvla) +XEN_CFLAGS +=3D -pipe -D__XEN__ -include $(srctree)/include/xen/config.h CFLAGS-$(CONFIG_DEBUG_INFO) +=3D -g =20 ifneq ($(CONFIG_CC_IS_CLANG),y) # Clang doesn't understand this command line argument, and doesn't appear = to # have a suitable alternative. The resulting compiled binary does functio= n, # but has an excessively large symbol table. -CFLAGS +=3D -Wa,--strip-local-absolute +XEN_CFLAGS +=3D -Wa,--strip-local-absolute endif =20 XEN_AFLAGS +=3D -D__ASSEMBLY__ @@ -420,14 +421,14 @@ $(call cc-option-add,XEN_AFLAGS,CC,-Wa$(comma)--noexe= cstack) =20 LDFLAGS-$(call ld-option,--warn-rwx-segments) +=3D --no-warn-rwx-segments =20 -CFLAGS +=3D $(CFLAGS-y) +XEN_CFLAGS +=3D $(CFLAGS-y) # allow extra CFLAGS externally via EXTRA_CFLAGS_XEN_CORE -CFLAGS +=3D $(EXTRA_CFLAGS_XEN_CORE) +XEN_CFLAGS +=3D $(EXTRA_CFLAGS_XEN_CORE) =20 # Most CFLAGS are safe for assembly files: # -std=3Dgnu{89,99} gets confused by #-prefixed end-of-line comments # -flto makes no sense and annoys clang -XEN_AFLAGS +=3D $(filter-out -std=3Dgnu% -flto,$(CFLAGS)) $(AFLAGS-y) +XEN_AFLAGS +=3D $(filter-out -std=3Dgnu% -flto,$(XEN_CFLAGS)) $(AFLAGS-y) =20 # LDFLAGS are only passed directly to $(LD) LDFLAGS +=3D $(LDFLAGS_DIRECT) $(LDFLAGS-y) @@ -439,16 +440,16 @@ CFLAGS_UBSAN :=3D endif =20 ifeq ($(CONFIG_LTO),y) -CFLAGS +=3D -flto +XEN_CFLAGS +=3D -flto LDFLAGS-$(CONFIG_CC_IS_CLANG) +=3D -plugin LLVMgold.so endif =20 ifdef building_out_of_srctree - CFLAGS +=3D -I$(objtree)/include - CFLAGS +=3D -I$(objtree)/arch/$(TARGET_ARCH)/include + XEN_CFLAGS +=3D -I$(objtree)/include + XEN_CFLAGS +=3D -I$(objtree)/arch/$(TARGET_ARCH)/include endif -CFLAGS +=3D -I$(srctree)/include -CFLAGS +=3D -I$(srctree)/arch/$(TARGET_ARCH)/include +XEN_CFLAGS +=3D -I$(srctree)/include +XEN_CFLAGS +=3D -I$(srctree)/arch/$(TARGET_ARCH)/include =20 # Note that link order matters! ALL_OBJS-y :=3D common/built_in.o @@ -463,7 +464,7 @@ ALL_LIBS-y :=3D lib/lib.a include $(srctree)/arch/$(TARGET_ARCH)/arch.mk =20 # define new variables to avoid the ones defined in Config.mk -export XEN_CFLAGS :=3D $(CFLAGS) +export XEN_CFLAGS :=3D $(XEN_CFLAGS) export XEN_AFLAGS :=3D $(XEN_AFLAGS) export XEN_LDFLAGS :=3D $(LDFLAGS) export CFLAGS_UBSAN diff --git a/xen/arch/arm/arch.mk b/xen/arch/arm/arch.mk index 58db76c4e1..300b8bf7ae 100644 --- a/xen/arch/arm/arch.mk +++ b/xen/arch/arm/arch.mk @@ -1,8 +1,8 @@ ######################################## # arm-specific definitions =20 -$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) -$(call cc-option-add,CFLAGS,CC,-Wnested-externs) +$(call cc-options-add,XEN_CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) +$(call cc-option-add,XEN_CFLAGS,CC,-Wnested-externs) =20 # Prevent floating-point variables from creeping into Xen. CFLAGS-$(CONFIG_ARM_32) +=3D -msoft-float diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk index 7448f759b4..aadf373ce8 100644 --- a/xen/arch/riscv/arch.mk +++ b/xen/arch/riscv/arch.mk @@ -1,7 +1,7 @@ ######################################## # RISCV-specific definitions =20 -$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) +$(call cc-options-add,XEN_CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) =20 CFLAGS-$(CONFIG_RISCV_64) +=3D -mabi=3Dlp64 =20 @@ -12,7 +12,7 @@ riscv-march-$(CONFIG_RISCV_ISA_C) :=3D $(riscv-marc= h-y)c # into the upper half _or_ the lower half of the address space. # -mcmodel=3Dmedlow would force Xen into the lower half. =20 -CFLAGS +=3D -march=3D$(riscv-march-y) -mstrict-align -mcmodel=3Dmedany +XEN_CFLAGS +=3D -march=3D$(riscv-march-y) -mstrict-align -mcmodel=3Dmedany =20 # TODO: Drop override when more of the build is working override ALL_OBJS-y =3D arch/$(TARGET_ARCH)/built_in.o diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 13ec88a628..5df3cf6bc3 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -3,42 +3,42 @@ =20 export XEN_IMG_OFFSET :=3D 0x200000 =20 -CFLAGS +=3D -I$(srctree)/arch/x86/include/asm/mach-generic -CFLAGS +=3D -I$(srctree)/arch/x86/include/asm/mach-default -CFLAGS +=3D -DXEN_IMG_OFFSET=3D$(XEN_IMG_OFFSET) +XEN_CFLAGS +=3D -I$(srctree)/arch/x86/include/asm/mach-generic +XEN_CFLAGS +=3D -I$(srctree)/arch/x86/include/asm/mach-default +XEN_CFLAGS +=3D -DXEN_IMG_OFFSET=3D$(XEN_IMG_OFFSET) =20 # Prevent floating-point variables from creeping into Xen. -CFLAGS +=3D -msoft-float - -$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) -$(call cc-option-add,CFLAGS,CC,-Wnested-externs) -$(call as-option-add,CFLAGS,CC,"vmcall",-DHAVE_AS_VMX) -$(call as-option-add,CFLAGS,CC,"crc32 %eax$(comma)%eax",-DHAVE_AS_SSE4_2) -$(call as-option-add,CFLAGS,CC,"invept (%rax)$(comma)%rax",-DHAVE_AS_EPT) -$(call as-option-add,CFLAGS,CC,"rdrand %eax",-DHAVE_AS_RDRAND) -$(call as-option-add,CFLAGS,CC,"rdfsbase %rax",-DHAVE_AS_FSGSBASE) -$(call as-option-add,CFLAGS,CC,"xsaveopt (%rax)",-DHAVE_AS_XSAVEOPT) -$(call as-option-add,CFLAGS,CC,"rdseed %eax",-DHAVE_AS_RDSEED) -$(call as-option-add,CFLAGS,CC,"clac",-DHAVE_AS_CLAC_STAC) -$(call as-option-add,CFLAGS,CC,"clwb (%rax)",-DHAVE_AS_CLWB) -$(call as-option-add,CFLAGS,CC,".equ \"x\"$(comma)1",-DHAVE_AS_QUOTED_SYM) -$(call as-option-add,CFLAGS,CC,"invpcid (%rax)$(comma)%rax",-DHAVE_AS_INVP= CID) -$(call as-option-add,CFLAGS,CC,"movdiri %rax$(comma)(%rax)",-DHAVE_AS_MOVD= IR) -$(call as-option-add,CFLAGS,CC,"enqcmd (%rax)$(comma)%rax",-DHAVE_AS_ENQCM= D) +XEN_CFLAGS +=3D -msoft-float + +$(call cc-options-add,XEN_CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) +$(call cc-option-add,XEN_CFLAGS,CC,-Wnested-externs) +$(call as-option-add,XEN_CFLAGS,CC,"vmcall",-DHAVE_AS_VMX) +$(call as-option-add,XEN_CFLAGS,CC,"crc32 %eax$(comma)%eax",-DHAVE_AS_SSE4= _2) +$(call as-option-add,XEN_CFLAGS,CC,"invept (%rax)$(comma)%rax",-DHAVE_AS_E= PT) +$(call as-option-add,XEN_CFLAGS,CC,"rdrand %eax",-DHAVE_AS_RDRAND) +$(call as-option-add,XEN_CFLAGS,CC,"rdfsbase %rax",-DHAVE_AS_FSGSBASE) +$(call as-option-add,XEN_CFLAGS,CC,"xsaveopt (%rax)",-DHAVE_AS_XSAVEOPT) +$(call as-option-add,XEN_CFLAGS,CC,"rdseed %eax",-DHAVE_AS_RDSEED) +$(call as-option-add,XEN_CFLAGS,CC,"clac",-DHAVE_AS_CLAC_STAC) +$(call as-option-add,XEN_CFLAGS,CC,"clwb (%rax)",-DHAVE_AS_CLWB) +$(call as-option-add,XEN_CFLAGS,CC,".equ \"x\"$(comma)1",-DHAVE_AS_QUOTED_= SYM) +$(call as-option-add,XEN_CFLAGS,CC,"invpcid (%rax)$(comma)%rax",-DHAVE_AS_= INVPCID) +$(call as-option-add,XEN_CFLAGS,CC,"movdiri %rax$(comma)(%rax)",-DHAVE_AS_= MOVDIR) +$(call as-option-add,XEN_CFLAGS,CC,"enqcmd (%rax)$(comma)%rax",-DHAVE_AS_E= NQCMD) =20 # GAS's idea of true is -1. Clang's idea is 1 -$(call as-option-add,CFLAGS,CC,\ +$(call as-option-add,XEN_CFLAGS,CC,\ ".if ((1 > 0) < 0); .error \"\";.endif",,-DHAVE_AS_NEGATIVE_TRUE) =20 # Check to see whether the assmbler supports the .nop directive. -$(call as-option-add,CFLAGS,CC,\ +$(call as-option-add,XEN_CFLAGS,CC,\ ".L1: .L2: .nops (.L2 - .L1)$(comma)9",-DHAVE_AS_NOPS_DIRECTIVE) =20 -CFLAGS +=3D -mno-red-zone -fpic +XEN_CFLAGS +=3D -mno-red-zone -fpic =20 # Xen doesn't use MMX or SSE interally. If the compiler supports it, also= skip # the SSE setup for variadic function calls. -CFLAGS +=3D -mno-mmx -mno-sse $(call cc-option,$(CC),-mskip-rax-setup) +XEN_CFLAGS +=3D -mno-mmx -mno-sse $(call cc-option,$(CC),-mskip-rax-setup) =20 ifeq ($(CONFIG_INDIRECT_THUNK),y) # Compile with gcc thunk-extern, indirect-branch-register if available. @@ -54,10 +54,10 @@ ifdef CONFIG_XEN_IBT # Force -fno-jump-tables to work around # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104816 # https://github.com/llvm/llvm-project/issues/54247 -CFLAGS +=3D -fcf-protection=3Dbranch -mmanual-endbr -fno-jump-tables -$(call cc-option-add,CFLAGS,CC,-fcf-check-attribute=3Dno) +XEN_CFLAGS +=3D -fcf-protection=3Dbranch -mmanual-endbr -fno-jump-tables +$(call cc-option-add,XEN_CFLAGS,CC,-fcf-check-attribute=3Dno) else -$(call cc-option-add,CFLAGS,CC,-fcf-protection=3Dnone) +$(call cc-option-add,XEN_CFLAGS,CC,-fcf-protection=3Dnone) endif =20 # If supported by the compiler, reduce stack alignment to 8 bytes. But all= ow @@ -91,7 +91,7 @@ efi-check :=3D arch/x86/efi/check $(shell mkdir -p $(dir $(efi-check))) =20 # Check if the compiler supports the MS ABI. -XEN_BUILD_EFI :=3D $(call if-success,$(CC) $(CFLAGS) -c $(srctree)/$(efi-c= heck).c -o $(efi-check).o,y) +XEN_BUILD_EFI :=3D $(call if-success,$(CC) $(XEN_CFLAGS) -c $(srctree)/$(e= fi-check).c -o $(efi-check).o,y) =20 # Check if the linker supports PE. EFI_LDFLAGS :=3D $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=3D10 @@ -129,4 +129,4 @@ export EFI_LDFLAGS endif =20 # Set up the assembler include path properly for older toolchains. -CFLAGS +=3D -Wa,-I$(objtree)/include -Wa,-I$(srctree)/include +XEN_CFLAGS +=3D -Wa,-I$(objtree)/include -Wa,-I$(srctree)/include --=20 Anthony PERARD From nobody Wed Nov 27 23:47:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1684860482; cv=none; d=zohomail.com; s=zohoarc; b=BMuDA4Dn56qmHF1B2A+K+HVZS4x0xfgfDJmbeeEPOy6F7eRGjNTSxcC6+ONSsntUGtmWPaEzQxIlADyTnFbsklBfSKLaziDrkoY+Rrz5uo5ppi1PQvajvAF+vzk5czt8BcJRULX05oKYS34IrWViv+JX/PfXuMm8Dnq2YFOgNwA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684860482; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Z8JLgvCH0HTaIeT57UZSjPwqnEegFLUGskXQF3taaSU=; b=bX3mQWNm/GkZAxsvMME6Ys6MxVOIWoUP2HNUW1u6eQZ5ft69ijxkyyFujEpGquBBvP6OYwbjKW2HiuMIt3xtvvhEEaYtjY/r28U4V+AUYIml0XCpf/3I/s0TwfsKsGhEoGiBv3PlKklYbLyj5vcU8jsId2lcwF5W3WisJDDOnFQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1684860482324544.4539307200238; Tue, 23 May 2023 09:48:02 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.538615.838725 (Exim 4.92) (envelope-from ) id 1q1VAf-00078p-8P; Tue, 23 May 2023 16:47:37 +0000 Received: by outflank-mailman (output) from mailman id 538615.838725; Tue, 23 May 2023 16:47:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1VAf-00078g-5W; Tue, 23 May 2023 16:47:37 +0000 Received: by outflank-mailman (input) for mailman id 538615; Tue, 23 May 2023 16:47:35 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V2Y-0006Dr-O2 for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:39:14 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 58185c51-f988-11ed-8611-37d641c3527e; Tue, 23 May 2023 18:39:12 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 58185c51-f988-11ed-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859952; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=M4sHTi4LXEAqx1EAv6HnupNoWKrhWbjNFEYPRFSBd30=; b=FXqQmfhChlxuws1lESkt8GOLKq5qPnLTRoXombK+s/Fbth5Q4gQVeEMh QrMXI+dz7XHobgG4QX3YHRdR2CTLXlKrtF7/KbGleNLtbofhdiC7S+fP5 T+RQrui7D0yafb/mZTaqta+w0qEKKe1W29oTBaB3olWFrfOblWc8tKi9f A=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 109422966 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:0b29w6zc/W3WM3pV9YB6t+ffxirEfRIJ4+MujC+fZmUNrF6WrkVWn GcWXGrSOPyDYmKketp2bYmwo04HuZHUx4QwGQtq+CAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTrafYEidfCc8IA85kxVvhuUltYBhhN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kuIItCO2rUHi0gLfWRMCn oCd IronPort-HdrOrdr: A9a23:xSa81KwvOvR54IamfYmiKrPwT71zdoMgy1knxilNoH1uEvBw8v rEoB1173LJYVoqMk3I+urgBED/exzhHPdOiOEs1NyZMDUO1lHHEL1f X-Talos-CUID: 9a23:+LDj4WwHUmK7At+y8MC1BgUJQJk0XWfB/E3SHGSAA0VsUoObe2KPrfY= X-Talos-MUID: 9a23:bP208AmVrVf/tWaddmyDdnpMd8FLubqJN3wyrq0agNOHPgJoYS202WE= X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="109422966" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu , Bertrand Marquis , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH 12/15] build: avoid Config.mk's CFLAGS Date: Tue, 23 May 2023 17:38:08 +0100 Message-ID: <20230523163811.30792-13-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com> References: <20230523163811.30792-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1684860483702100001 Content-Type: text/plain; charset="utf-8" The variable $(CFLAGS) is too often set in the environment, especially when building a package for a distribution. Often, those CFLAGS are intended to be use to build user spaces binaries, not a kernel. This mean packager needs to takes extra steps to build Xen by overriding the CFLAGS provided by the package build environment. With this patch, we avoid using the variable $(CFLAGS). Also, the hypervisor's build system have complete control over which CFLAGS are used. No change intended to XEN_CFLAGS used, beside some flags which may be in a different order on the command line. Signed-off-by: Anthony PERARD Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu --- Notes: There's still $(EXTRA_CFLAGS_XEN_CORE) which allows to add more CFLAGS if someone building Xen needs to add more CFLAGS to the hypervisor build. xen/Makefile | 11 ++++++++++- xen/arch/arm/arch.mk | 4 ++++ xen/arch/x86/arch.mk | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/xen/Makefile b/xen/Makefile index b3bffe8c6f..4dc3acf2a6 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -259,7 +259,16 @@ export KBUILD_DEFCONFIG :=3D $(ARCH)_defconfig export XEN_TREEWIDE_CFLAGS :=3D $(CFLAGS) =20 XEN_AFLAGS =3D -XEN_CFLAGS =3D $(CFLAGS) +XEN_CFLAGS =3D +ifeq ($(XEN_OS),SunOS) + XEN_CFLAGS +=3D -Wa,--divide -D_POSIX_C_SOURCE=3D200112L -D__EXTENSIO= NS__ +endif +XEN_CFLAGS +=3D -fno-strict-aliasing +XEN_CFLAGS +=3D -std=3Dgnu99 +XEN_CFLAGS +=3D -Wall -Wstrict-prototypes +$(call cc-option-add,XEN_CFLAGS,CC,-Wdeclaration-after-statement) +$(call cc-option-add,XEN_CFLAGS,CC,-Wno-unused-but-set-variable) +$(call cc-option-add,XEN_CFLAGS,CC,-Wno-unused-local-typedefs) =20 # CLANG_FLAGS needs to be calculated before calling Kconfig ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) diff --git a/xen/arch/arm/arch.mk b/xen/arch/arm/arch.mk index 300b8bf7ae..0478fadde2 100644 --- a/xen/arch/arm/arch.mk +++ b/xen/arch/arm/arch.mk @@ -1,6 +1,10 @@ ######################################## # arm-specific definitions =20 +ifeq ($(XEN_TARGET_ARCH),arm32) + XEN_CFLAGS +=3D -marm +endif + $(call cc-options-add,XEN_CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) $(call cc-option-add,XEN_CFLAGS,CC,-Wnested-externs) =20 diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 5df3cf6bc3..fc3b1dc922 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -1,6 +1,8 @@ ######################################## # x86-specific definitions =20 +XEN_CFLAGS +=3D -m64 + export XEN_IMG_OFFSET :=3D 0x200000 =20 XEN_CFLAGS +=3D -I$(srctree)/arch/x86/include/asm/mach-generic --=20 Anthony PERARD From nobody Wed Nov 27 23:47:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1684859961; cv=none; d=zohomail.com; s=zohoarc; b=CEJ68z9KVO+QBbaWaPDbK7sUTI4IAcuFlXRh/E271snXoLlub1plYL4aaPVg1uGmnb/4eEQXeyEcxfN4qq509bLnJigymyJOFPWETdtCY/1n+yt+4z5bEFypfiGXu00SpVWNboAGf/v8dtr6qK1/RzStkdASG3Okqyb2ecbA918= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684859961; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7tJxIdP9HFiI6jBgNK13OedzKa0lW+tthyR9v7Z7m98=; b=OSov1qe4+5tUX05uaeuQuymYIKK07CPoVow3wntrm1f/lvT33illH2X37SmwOQHXyXOoUmK5C8uQgautP5kkBWVAosiXwdknBHBAs33Clfc2l6jX++XqPt5bNVQ1dauDWDb3JZI9VaRjwwajllEMH2noB40D8hv/tHau3sUDVOs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1684859961305912.2317092994451; Tue, 23 May 2023 09:39:21 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.538563.838655 (Exim 4.92) (envelope-from ) id 1q1V2G-0001Xz-W2; Tue, 23 May 2023 16:38:56 +0000 Received: by outflank-mailman (output) from mailman id 538563.838655; Tue, 23 May 2023 16:38:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V2G-0001Xj-Sr; Tue, 23 May 2023 16:38:56 +0000 Received: by outflank-mailman (input) for mailman id 538563; Tue, 23 May 2023 16:38:55 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V2F-0006Dq-IC for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:38:55 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 4d58af33-f988-11ed-b22d-6b7b168915f2; Tue, 23 May 2023 18:38:54 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 4d58af33-f988-11ed-b22d-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859934; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xUrRJZg21IcuIXPT65Mny77WEiL8WRyRZGb2P5u/V+k=; b=LZ61PVuPAlSVkaOC4RYQddLagOPLe1XbU0xz7v36taSS2HOe/PAKUWMk euDVWxBUxQ3ODQcGXOgEXCNeTnnPxLxM3GSRdRxlctLd7X6vaPfxkbsZn D1b0nLMkKm6bEtXggTb0GfsSoKq+A0ttIOKTqdvPF1NI3wYkn7FO1ZQeL U=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 110112588 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:CRZ2A6ODbD5H+ZXvrR2Wl8FynXyQoLVcMsEvi/4bfWQNrUoghGMFn GsYDD2DbPeOM2D8fIh1aou19xgHucWHzIJkSgto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQAOKnUoYoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGjxSs/rrRC9H5qyo42tF5AdmP5ingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0t11KjhX8 8w3EmpOUD6biMir+4uUF+Y506zPLOGzVG8eknRpzDWfBvc6W5HTBa7N4Le03h9p2JoIR6yHI ZNEN3w2Nk+ojx5nYz/7DLo3mvuogX/uNSVVsluPqYI84nTJzRw327/oWDbQUoXTHZwMxBvI9 goq+UzwMB03d9qgkgap1X6ptrORgHOiVqE7QejQGvlC3wTImz175ActfUu2p7y1h1CzX/pbK lcI4Ww+oK4q7kupQ9LhGRqirxasvBQRRt5RGO0S8xyWx+zf5APxLmoZSj9MbvQ2uclwQiYlv neShM/gDzFrtLyTSFqe+62SoDf0PjIaRUcdYQcUQA1D5MPsyLzflTqWEIwlSvTsyISoR3epm WviQDUCa6s7tswgjry9zX/92XGSiIDGZBMO3yqKUTfwhu9mX7KNa4ut4FndyP9PKoeFU1WM1 EQ5d9iiAPMmVs/UynHUKAkZNPTwvqvebmWA6bJ6N8N5nwlB7UJPamy5DNtWAE5yevgJdjbyC KM4kVMAvcQDVJdGgEIeXm5QNyjI5fK4fTgGfqqOBjarXnSWXFHvwc2WTRTMt10BaWB1+U3FB b+VcNy3EVERArl9wTy9So81iOF7mn9unT+IFMmjk3xLNIZyg1bME9843KamNLhlvMtoXi2Om zqgCyd640oGC7CvCsUm2YUSMUoLPRAGOHwCkOQOLrTrClM/SAkc5wr5netJl3pNw/4EyY8lP xiVBidl9bYIrSafc1TVNSgzOe+HsFQWhStTABHA9G2AgxALCbtDJo9GH3frVdHLLNBe8MM= IronPort-HdrOrdr: A9a23:CD91cKvMtS3VwGBX/AUAJYtZ7skDhtV00zEX/kB9WHVpm6yj+v xG/c5rsSMc7Qx6ZJhOo7+90cW7L080lqQFhLX5X43SPzUO0VHARO1fBO3ZogEIcxeUygc379 YDT0ERMr3N5CNB/KHHCAnTKadd/DGEmprY+ts3GR1WPH9Xg6IL1XYJNu6CeHcGIjWvnfACZe ChDswsnUvYRV0nKv6VK1MiROb5q9jChPvdEGM7705O0nj3sduwgoSKaCSl4g== X-Talos-CUID: 9a23:KD4jOmyU9n6r63qOtdRbBgUvGOt8a3vt402KYHGWEWlDVYasZgKfrfY= X-Talos-MUID: =?us-ascii?q?9a23=3AZnozNw/eKAaoSy0k1ob4b3KQf85a74ntDn9Wrbk?= =?us-ascii?q?ht8y0aXJta26Trx3iFw=3D=3D?= X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="110112588" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH 13/15] build: fix compile.h compiler version command line Date: Tue, 23 May 2023 17:38:09 +0100 Message-ID: <20230523163811.30792-14-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com> References: <20230523163811.30792-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1684859962304100003 Content-Type: text/plain; charset="utf-8" CFLAGS is just from Config.mk, instead use the flags used to build Xen. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu --- Notes: I don't know if CFLAGS is even useful there, just --version without the flags might produce the same result. xen/build.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/build.mk b/xen/build.mk index e2a78aa806..d468bb6e26 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -23,7 +23,7 @@ define cmd_compile.h -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \ -e 's/@@domain@@/$(XEN_DOMAIN)/g' \ -e 's/@@hostname@@/$(XEN_BUILD_HOST)/g' \ - -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 2>&1 | head -1)!= g' \ + -e 's!@@compiler@@!$(shell $(CC) $(XEN_CFLAGS) --version 2>&1 | head = -1)!g' \ -e 's/@@version@@/$(XEN_VERSION)/g' \ -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \ -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \ --=20 Anthony PERARD From nobody Wed Nov 27 23:47:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1684859966; cv=none; d=zohomail.com; s=zohoarc; b=GtH19Yifi0w1Y70WxEhWvQGWDhGKv4naEXXI6AzS2MyBE08oW/bxNGP1xGjVZArhe3XN0ZUIgGiP6hj8UFBw+BJK9w8xTZfXC2iBiVhOguR3+jv10ABCHSTA50eGVAm9SlBoeCzSeNYU1bgD8T2fYR49Xi14sbVIwDMX0CF2slI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684859966; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=L1uoRNHpwhfw2mvoAP10X3JSoNzibz+VhmTs5R82CHY=; b=ngyCtf17JUelyR4VqTDcMXunbhVFlOpurYRvr/NRpKZGg7w3C9fcfkmTDzHG8G87zWLEJ0Y+VOvAIkBfO7XP9nyvUKWRQVDm3RRbkqJDttpB6JpbbVYtVjMr/iVbn+jetMcz3izrXCN0DevVH6t3wZTMjEqdJO3SECsnymGgi0Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1684859966477968.8686512554975; Tue, 23 May 2023 09:39:26 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.538572.838685 (Exim 4.92) (envelope-from ) id 1q1V2L-0002YH-Fp; Tue, 23 May 2023 16:39:01 +0000 Received: by outflank-mailman (output) from mailman id 538572.838685; Tue, 23 May 2023 16:39:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V2L-0002Y8-4v; Tue, 23 May 2023 16:39:01 +0000 Received: by outflank-mailman (input) for mailman id 538572; Tue, 23 May 2023 16:39:00 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V2J-0006Dr-UY for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:38:59 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 4f8cbac7-f988-11ed-8611-37d641c3527e; Tue, 23 May 2023 18:38:57 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 4f8cbac7-f988-11ed-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859937; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/u1bPN10AWgMTCILIOBzV6UQMmmPOJyKlHt8eO7R7EE=; b=P7sTDJPWEL+hYfGJusW8tGz0ldynvxlDXQZXe+F0bgr3t+tLmJJlvOT4 5E1MRDAPGijuYt/Z4y5XbLtkCzHf+lrikQ47Zq9Gp/T4b1bwZEXQDrt2J 6gnamkmMExxLH1e7DilYYS7m5DgoZ/AAoAKsCjbs//ykeQsiwuv4n6vYE Q=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 112568347 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:A5SOsqiH3MG+/aaBIWpKvC/WX161UxAKZh0ujC45NGQN5FlHY01je htvW2jUPPiNNGvwLt5ybYW+9UID7ZPcytU1TAA6q3w1Qysb9cadCdqndUqhZCn6wu8v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MProSPEdYco yE5Rvi9 IronPort-HdrOrdr: A9a23:OhteVq0nZ2XJDKANE2fIDAqjBNEkLtp133Aq2lEZdPU1SKylfq WV98jzuiWYtN98YhsdcLO7WZVoP0myyXcd2+B4AV7IZmXbUQWTQr1f0Q== X-Talos-CUID: 9a23:H1KEWW/5dh3YhMKwz02Vv0AvNet0UkPa907ZGVTiGUVMabrOUEDFrQ== X-Talos-MUID: 9a23:dsWiigkPbcARgL6gz/LjdnplLMQr/I2IWHxKiKkAgfS1O3VTMWqS2WE= X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="112568347" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH 14/15] Config.mk: move $(cc-option, ) to config/compiler-testing.mk Date: Tue, 23 May 2023 17:38:10 +0100 Message-ID: <20230523163811.30792-15-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com> References: <20230523163811.30792-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1684859968592100003 Content-Type: text/plain; charset="utf-8" In xen/, it isn't necessary to include Config.mk in every Makefile in subdirectories as nearly all necessary variables should be calculated in xen/Makefile. But some Makefile make use of the macro $(cc-option,) that is only available in Config.mk. Extract $(cc-option,) from Config.mk so we can use it without including Config.mk and thus without having to recalculate some CFLAGS which would be ignored. Signed-off-by: Anthony PERARD Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu --- Config.mk | 27 +-------------------------- config/compiler-testing.mk | 25 +++++++++++++++++++++++++ xen/Rules.mk | 1 + 3 files changed, 27 insertions(+), 26 deletions(-) create mode 100644 config/compiler-testing.mk diff --git a/Config.mk b/Config.mk index 27f48f654a..ebc8d0dfdd 100644 --- a/Config.mk +++ b/Config.mk @@ -18,6 +18,7 @@ realpath =3D $(wildcard $(foreach file,$(1),$(shell cd -P= $(dir $(file)) && echo " or =3D $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip = $(3)),$(3),$(if $(strip $(4)),$(4))))) =20 -include $(XEN_ROOT)/.config +include $(XEN_ROOT)/config/compiler-testing.mk =20 XEN_COMPILE_ARCH ?=3D $(shell uname -m | sed -e s/i.86/x86_32/ \ -e s/i86pc/x86_32/ -e s/amd64/x86_64/ \ @@ -79,32 +80,6 @@ PYTHON_PREFIX_ARG ?=3D --prefix=3D"$(prefix)" # to permit the user to set PYTHON_PREFIX_ARG to '' to workaround this bug: # https://bugs.launchpad.net/ubuntu/+bug/362570 =20 -# cc-option: Check if compiler supports first option, else fall back to se= cond. -# -# This is complicated by the fact that unrecognised -Wno-* options: -# (a) are ignored unless the compilation emits a warning; and -# (b) even then produce a warning rather than an error -# To handle this we do a test compile, passing the option-under-test, on a= code -# fragment that will always produce a warning (integer assigned to pointer= ). -# We then grep for the option-under-test in the compiler's output, the pre= sence -# of which would indicate an "unrecognized command-line option" warning/er= ror. -# -# Usage: cflags-y +=3D $(call cc-option,$(CC),-march=3Dwinchip-c6,-march= =3Di586) -cc-option =3D $(shell if test -z "`echo 'void*p=3D1;' | \ - $(1) $(2) -c -o /dev/null -x c - 2>&1 | grep -- $(2:-Wa$(com= ma)%=3D%) -`"; \ - then echo "$(2)"; else echo "$(3)"; fi ;) - -# cc-option-add: Add an option to compilation flags, but only if supported. -# Usage: $(call cc-option-add CFLAGS,CC,-march=3Dwinchip-c6) -cc-option-add =3D $(eval $(call cc-option-add-closure,$(1),$(2),$(3))) -define cc-option-add-closure - ifneq ($$(call cc-option,$$($(2)),$(3),n),n) - $(1) +=3D $(3) - endif -endef - -cc-options-add =3D $(foreach o,$(3),$(call cc-option-add,$(1),$(2),$(o))) - # cc-ver: Check compiler against the version requirement. Return boolean '= y'/'n'. # Usage: ifeq ($(call cc-ver,$(CC),ge,0x030400),y) cc-ver =3D $(shell if [ $$((`$(1) -dumpversion | awk -F. \ diff --git a/config/compiler-testing.mk b/config/compiler-testing.mk new file mode 100644 index 0000000000..9677f91abe --- /dev/null +++ b/config/compiler-testing.mk @@ -0,0 +1,25 @@ +# cc-option: Check if compiler supports first option, else fall back to se= cond. +# +# This is complicated by the fact that unrecognised -Wno-* options: +# (a) are ignored unless the compilation emits a warning; and +# (b) even then produce a warning rather than an error +# To handle this we do a test compile, passing the option-under-test, on a= code +# fragment that will always produce a warning (integer assigned to pointer= ). +# We then grep for the option-under-test in the compiler's output, the pre= sence +# of which would indicate an "unrecognized command-line option" warning/er= ror. +# +# Usage: cflags-y +=3D $(call cc-option,$(CC),-march=3Dwinchip-c6,-march= =3Di586) +cc-option =3D $(shell if test -z "`echo 'void*p=3D1;' | \ + $(1) $(2) -c -o /dev/null -x c - 2>&1 | grep -- $(2:-Wa$(com= ma)%=3D%) -`"; \ + then echo "$(2)"; else echo "$(3)"; fi ;) + +# cc-option-add: Add an option to compilation flags, but only if supported. +# Usage: $(call cc-option-add CFLAGS,CC,-march=3Dwinchip-c6) +cc-option-add =3D $(eval $(call cc-option-add-closure,$(1),$(2),$(3))) +define cc-option-add-closure + ifneq ($$(call cc-option,$$($(2)),$(3),n),n) + $(1) +=3D $(3) + endif +endef + +cc-options-add =3D $(foreach o,$(3),$(call cc-option-add,$(1),$(2),$(o))) diff --git a/xen/Rules.mk b/xen/Rules.mk index 68b10ca5ef..8177d405c3 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -19,6 +19,7 @@ __build: =20 include $(XEN_ROOT)/Config.mk include $(srctree)/scripts/Kbuild.include +include $(XEN_ROOT)/config/compiler-testing.mk =20 # Initialise some variables obj-y :=3D --=20 Anthony PERARD From nobody Wed Nov 27 23:47:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1684860482; cv=none; d=zohomail.com; s=zohoarc; b=SAQIR577JFCSXzz6zf+QNek8HWNsSdUHb8M3U8AdrXBTyRyJPqWVGfvIuyx/giUi5AuM6Q8EH0EMcd5BVT/LnTQOIDairbVT5xTCKeSo9dcR53gnadxNGvRuTb0WK4e3LkfHfItdIa3AXbjZFOQcbPipPnOL7URugGpdNmI+bwA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684860482; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/qaqPr3P9n/9nEQOh7GWdO4jsQYx5tNzLQkR4mtIvoE=; b=Vl6xVE+6/s5bVZW4X42Q+RkwNbdnShu2VZWP9Cyuwi30dDdy3/8Pbd+RzvbukfFl8sHuwyJ7RlPkALvB8rHo4yVJ4BvVhUTpe+GTAAvFjwlFq+JAKqXG6+v//h5LvmMKr+I1q6vFgzNLpb+aZ3Sv2uIPmY/mcyJ4g7oRsO/fdsY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1684860482834605.4185282461972; Tue, 23 May 2023 09:48:02 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.538600.838706 (Exim 4.92) (envelope-from ) id 1q1VAc-0006d5-RJ; Tue, 23 May 2023 16:47:34 +0000 Received: by outflank-mailman (output) from mailman id 538600.838706; Tue, 23 May 2023 16:47:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1VAc-0006cy-LI; Tue, 23 May 2023 16:47:34 +0000 Received: by outflank-mailman (input) for mailman id 538600; Tue, 23 May 2023 16:47:33 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V2L-0006Dq-Jd for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:39:01 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 50b7961c-f988-11ed-b22d-6b7b168915f2; Tue, 23 May 2023 18:38:59 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 50b7961c-f988-11ed-b22d-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859939; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FFiqj1ESYfIyZ3l/pGkAtoeGdSC6hrZ1HgE4QjQoKLM=; b=hMONPKQOWRfooN7SyTyrio+zS/vcRROvZLp181GlE5D33I+65KK2C7ej +KemFwvr0142Q2QZ04hlW+oHHrWW4ztf/4NdUzjgCo2cnEJHvjHQQSMIp qohS/yv96aFPorMNXf9MrGYx1akmPWjPBixvY2n/1hPRrQraovA3lFhQd Q=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 112568352 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:4tWeS6heu9iS9JxuHAdsVXmFX161UxAKZh0ujC45NGQN5FlHY01je htvXjuAb/aPa2X9eo1xOY2090gO6JPcmtNkHFQ6q39gFC8b9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrWCYmYpHlUMpB4J0XpLg/Q+jpNjne+3CgaMv cKai8DEMRqu1iUc3lg8sspvkzsx+qyq0N8klgZmP6sT4QWFzyN94K83fsldEVOpGuG4IcbiL wrz5OnR1n/U+R4rFuSknt7TGqHdauePVeQmoiM+t5mK2nCulARrukoIHKN0hXNsoyeIh7hMJ OBl7vRcf+uL0prkw4zxWzEAe8130DYvFLXveRBTuuTLp6HKnueFL1yDwyjaMKVBktubD12i+ tQGEBQ/Szuqp9if/+q4SfRwuPUGNJnSadZ3VnFIlVk1DN4jSJHHBa7L+cVZzHE7gcUm8fT2P pRDL2A1NVKZPkMJYw1MYH49tL7Aan3XejtEqFWTtOwv7nLa1gBZ27nxKtvFPNeNQK25m27B/ ziboTSiX0ty2Nq322uez2qhmez0pAjUQoM8GoKkpsNxjwjGroAUIEJPDgbqyRWjsWa8RtZeJ ko86ico668o+ySDTNPwQhm5q36spQMHVpxbFOhSwB6J4rrZ5UCeHGdsZiVadNUsucsyRDor/ lyEhdXkAXpoqrL9YWKQ8PKYoC2/PQARLHQefmkUQA0d+d7hrYovyBXVQb5e/LWd14OvX2uqm nbT8XZ43u9I5SIW60ml1U7/pwCJjbHpdCcKvgbUQ36b3yZhNLfwMuRE9mPnxfpHKY+YSHyIs 34Fh9WS4YgyMH2dqMCeaL5TRe/0vp5pJBWZ2AcyRMd5q1xB7lb5JehtDCdCyFCF2yruURvge wfttAxY//e/11P6PPYsM+pd5ynHpJUM9OgJtNiONrKigbArLmdrGR2CgmbOt10BaGB2zckC1 W6zKK5A90oyB6V91yaRTOwAy7ItzS1W7TqNFcykn0z7iuvHPCL9pVI53LymN7pR0U95iF+Nr 4Y32zWikH2zr9ESkgGIqNVOfDjm3FAwBIzsqtw/S9Nv1jFOQTl7Y9eImONJRmCQt/gN/gs+1 i3nCxAwJZuWrSGvFDhmnVg4MOm+Askn/SNnVcHuVH7xs0UejU+UxP93X/MKkXMProSPEdYco yE5Rvi9 IronPort-HdrOrdr: A9a23:IP5oP6h9NcmKU0Mfu0DocS4MvXBQXrkji2hC6mlwRA09TyX4ra CTdZEgviMc5wx9ZJhNo7q90cq7IE80i6Qb3WB5B97LYOCMggeVxe9Zg7ff/w== X-Talos-CUID: 9a23:8Gg8sWwFN2FrOH2iILjFBgUKIuQXV1b07E35HBe7Cnt1doywUQ+prfY= X-Talos-MUID: =?us-ascii?q?9a23=3AYUm1dgz3etzLgAZcjWMAOCwuFAyaqLb/E30VnIo?= =?us-ascii?q?FgPCvGjZxFTmikGSKWYByfw=3D=3D?= X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="112568352" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH 15/15] build: remove Config.mk include from Rules.mk Date: Tue, 23 May 2023 17:38:11 +0100 Message-ID: <20230523163811.30792-16-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com> References: <20230523163811.30792-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1684860484393100003 Content-Type: text/plain; charset="utf-8" Everything needed to build the hypervisor should already be configured by "xen/Makefile", thus Config.mk shouldn't be needed. Then, Config.mk keeps on testing support of some CFLAGS with CC, the result of this testing is not used at this stage so the build is slowed unnecessarily. Likewise, GCC is checked to be at the minimum at 4.2 when entering every sub-directory, so the check have run countless time at this stage. We only need to export a few more configuration variables. And add some variables in Kbuild.include, and macro fallbacks for Make older than 3.81. (Adding `or` just in case. it's only used in xen/Makefile, which includes Config.mk and so has already the fallback.) Signed-off-by: Anthony PERARD Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu --- Notes: Removing Config.mk benefit: Rebuild on my computer is aboud 1 second faster overall. Save maybe 3 seconds of user time system less loaded xen/Makefile | 4 ++++ xen/Rules.mk | 1 - xen/scripts/Kbuild.include | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/xen/Makefile b/xen/Makefile index 4dc3acf2a6..9af7223c66 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -246,10 +246,14 @@ export TARGET_ARCH :=3D $(shell echo $(XEN_TARGET= _ARCH) | \ sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/= g' \ -e s'/riscv.*/riscv/g') =20 +export XEN_COMPILE_ARCH XEN_TARGET_ARCH export CONFIG_SHELL :=3D $(SHELL) export CC CXX LD NM OBJCOPY OBJDUMP ADDR2LINE +export CPP AR export YACC =3D $(if $(BISON),$(BISON),bison) export LEX =3D $(if $(FLEX),$(FLEX),flex) +export HOSTCC HOSTCXX HOSTCFLAGS +export EMBEDDED_EXTRA_CFLAGS LDFLAGS_DIRECT =20 # Default file for 'make defconfig'. export KBUILD_DEFCONFIG :=3D $(ARCH)_defconfig diff --git a/xen/Rules.mk b/xen/Rules.mk index 8177d405c3..8291e0a573 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -17,7 +17,6 @@ __build: =20 -include $(objtree)/include/config/auto.conf =20 -include $(XEN_ROOT)/Config.mk include $(srctree)/scripts/Kbuild.include include $(XEN_ROOT)/config/compiler-testing.mk =20 diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index d820595e2f..dfa66f2c8a 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -8,6 +8,13 @@ empty :=3D space :=3D $(empty) $(empty) space_escape :=3D _-_SPACE_-_ pound :=3D \# +comma :=3D , +open :=3D ( +close :=3D ) + +# fallbacks for GNU Make older than 3.81 +realpath =3D $(wildcard $(foreach file,$(1),$(shell cd -P $(dir $(file)) &= & echo "$$PWD/$(notdir $(file))"))) +or =3D $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip = $(3)),$(3),$(if $(strip $(4)),$(4))))) =20 ### # Name of target with a '.' as filename prefix. foo/bar.o =3D> foo/.bar.o --=20 Anthony PERARD