From nobody Wed May 15 23:42:22 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=1677189893; cv=none; d=zohomail.com; s=zohoarc; b=DmtI1a0eGvMV3gHCOIUWqqZDRGsucceNlDt3U26FC4m5SufU4ASa3pixM1ylggK6W5cc0Duaf+5hkWRQ8k5dvmmh16wLvJ7X3GJ3WpQdn/lDWbLQ/d3YiGJIeRQv5Wy/PoZwKCnAHk12cb60YhKrhJ9etLWUewvY8xYuSrpB8oY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677189893; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=On1hU1M4o7rDdvKzqnW+AVRDQRrjpJHfIGnKcYFWXLg=; b=aQ8XaaWjBjLlVoa+5zv5krQqKqa5ycPC4rrYLKtK0UvHmcvBzTA9axd/WmLPwoTE5zX4nY5oCWhkG/33Ii7cJMzL9hlu63opRH94yyBItT5PRH5btUpVfMK/o8jh0kJTKwddNzYVo/zbrwSarfRJNv5HTNs8BS28PZ0IWa1GSgw= 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 16771898934028.324381907901511; Thu, 23 Feb 2023 14:04:53 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.500718.772194 (Exim 4.92) (envelope-from ) id 1pVJhR-0002Sb-Oh; Thu, 23 Feb 2023 22:04:25 +0000 Received: by outflank-mailman (output) from mailman id 500718.772194; Thu, 23 Feb 2023 22:04:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pVJhR-0002SU-M2; Thu, 23 Feb 2023 22:04:25 +0000 Received: by outflank-mailman (input) for mailman id 500718; Thu, 23 Feb 2023 22:04:24 +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 1pVJhP-0002SO-UQ for xen-devel@lists.xenproject.org; Thu, 23 Feb 2023 22:04:24 +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 044619af-b3c6-11ed-a82a-c9ca1d2f71af; Thu, 23 Feb 2023 23:04:19 +0100 (CET) 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: 044619af-b3c6-11ed-a82a-c9ca1d2f71af DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1677189859; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=E4KXqTbBtzEm7GtNIUTntvH9tKT1e6wGunp75/m7oHw=; b=RD3Ui4a8WPSXmp3h7jBslwSOl0W/4HKWorxtQKzkxOA5kbfnz6Wv8fwZ JLna1VznF9x32VPGjRLdq5t0K2Sk9KK40BA4DH89uXQBPooQMy6LMRmLU vqeQlyWHVPoJw86ZhEaiCNEVmK1zUguqAC29QfIZ4rlyySt6kw5I16MNP I=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 100719643 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:hQ6xgqxzn6y+aGgr1Bt6t+chxirEfRIJ4+MujC+fZmUNrF6WrkVVn WUbWjrSOa6DMWKjKdAnOoyy9k8AsMCGyIIxHgNuqCAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTrafYEidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw//F+UwHUMja4mtC5QRkP6sT5zcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KUwTr KAZOhk0Uk+ehsKs5JexSOBgutt2eaEHPKtH0p1h5TTQDPJgSpHfWaTao9Rf2V/chOgXQ6yYP ZBAL2MyMlKZOUYn1lQ/UfrSmM+BgHXlfiIeg1WSvactuEDYzRBr0airO93QEjCPbZwNxhnB9 zyapAwVBDkdDfKe5xalrEijm9SSmCyiQropKIWno6sCbFq7mTVIVUx+uUGAiem0jAuyVsxSL 2QQ+zEytu4i+UqzVN7/Uhak5nmesXY0efBdDuk74wGl0bfP7kCSAW1sZiFFQMwrsokxXzNC6 7OSt4q3X3o16uTTEC/DsO7O9lteJBT5M0cvOHZYTBks2uW8vYATlDbqRNRqHJKq24id9S7L/ xiGqy03hrM2hMEN1rmm8V2vvw9AtqQlXSZuuFyJAzvNAhdRIdf8Otf2sQSzAeNodt7xc7WXg JQTdyFyBsgqBIrFqiGCSf5l8FqBt6fca220bbKC8vAcG9WRF5yLJ904DNJWfh0B3iM4ldjBM SfuVft5vsM7AZdTRfYfj3iNI8or17P8Mt/uS+rZaNFDCrAoKlDYpX4xPxHNjjC8+KTJrU3YE c3GGftA8F5AUfg3pNZIb7p1PUAXKtAWmjqIGMGTI+WP2ruCfn+FIYrpw3PXBt3VGJis+V2Pm /4Gbpvi9vmqeLGmCsUh2dJJfA9iwLlSLcyelvG7gcbfe1A6QD98UKWPqV7jEqQ895loei7z1 inVcidlJJDX3xUr9S3ihqhfVY7S IronPort-HdrOrdr: A9a23:LElF16pd793uSovlcEymnBsaV5o8eYIsimQD101hICG9Ffbo9P xG/c566faQsl16ZJhOo7690da7MBbhHPJOjbX5Xo3OYOCFghrLEGgK1+KL/9SKIUzDH4Bmup uIepIObOHNMQ== X-IronPort-AV: E=Sophos;i="5.97,322,1669093200"; d="scan'208";a="100719643" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Anthony PERARD Subject: [PATCH] xen: Work around Clang -E vs -Wunicode bug Date: Thu, 23 Feb 2023 22:03:58 +0000 Message-ID: <20230223220358.2611252-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1677189895731100001 https://github.com/llvm/llvm-project/issues/60958 While trying to work around a different Clang-IAS bug, I stubled onto In file included from arch/x86/asm-macros.c:3: ./arch/x86/include/asm/spec_ctrl_asm.h:144:19: error: \u used with no following hex digits; treating as '\' followed by identifier [-Werror,= -Wunicode] .L\@_fill_rsb_loop\uniq: ^ It turns out that Clang -E is sensitive to the file extension of the source file it is processing. asm-macros should really have been .S from the outset, as it is ultimately generating assembly, not C. Rename it, which causes Clang not to complain. We need to introduce rules for generating a .i file from .S, and substituti= ng c_flags for a_flags lets us drop the now-redundant -D__ASSEMBLY__. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Wei Liu CC: Anthony PERARD --- xen/Rules.mk | 6 ++++++ xen/arch/x86/Makefile | 2 +- xen/arch/x86/{asm-macros.c =3D> asm-macros.S} | 0 3 files changed, 7 insertions(+), 1 deletion(-) rename xen/arch/x86/{asm-macros.c =3D> asm-macros.S} (100%) diff --git a/xen/Rules.mk b/xen/Rules.mk index d6b7cec0a882..59072ae8dff2 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -273,6 +273,9 @@ $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): $(= obj)/%.init.o: $(obj)/%.o quiet_cmd_cpp_i_c =3D CPP $@ cmd_cpp_i_c =3D $(CPP) $(call cpp_flags,$(c_flags)) -MQ $@ -o $@ $< =20 +quiet_cmd_cpp_i_S =3D CPP $@ +cmd_cpp_i_S =3D $(CPP) $(call cpp_flags,$(a_flags)) -MQ $@ -o $@ $< + quiet_cmd_cc_s_c =3D CC $@ cmd_cc_s_c =3D $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -S $< -o $@ =20 @@ -282,6 +285,9 @@ cmd_cpp_s_S =3D $(CPP) $(call cpp_flags,$(a_flags)) -MQ= $@ -o $@ $< $(obj)/%.i: $(src)/%.c FORCE $(call if_changed_dep,cpp_i_c) =20 +$(obj)/%.i: $(src)/%.S FORCE + $(call if_changed_dep,cpp_i_S) + $(obj)/%.s: $(src)/%.c FORCE $(call if_changed_dep,cc_s_c) =20 diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 177a2ff74272..5accbe4c6746 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -240,7 +240,7 @@ $(obj)/efi/buildid.o $(obj)/efi/relocs-dummy.o: ; .PHONY: include include: $(objtree)/arch/x86/include/asm/asm-macros.h =20 -$(obj)/asm-macros.i: CFLAGS-y +=3D -D__ASSEMBLY__ -P +$(obj)/asm-macros.i: CFLAGS-y +=3D -P =20 $(objtree)/arch/x86/include/asm/asm-macros.h: $(obj)/asm-macros.i $(src)/M= akefile $(call filechk,asm-macros.h) diff --git a/xen/arch/x86/asm-macros.c b/xen/arch/x86/asm-macros.S similarity index 100% rename from xen/arch/x86/asm-macros.c rename to xen/arch/x86/asm-macros.S --=20 2.30.2