[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/5] build: arm64: provide -target and -march if using clang
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Date: Fri, 29 Nov 2024 01:49:10 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kqih6yfoliSqu4Tbh2SQlCEAACi38qPHAM/1ieOhAjg=; b=Lb8A8nwGOVmAdhyC5Qt8gg3gpcXhOOle2ygdwUYiSnlydq+yVDAJ9rC0BIIBBWTOFS1liyGNRrUFthTL4Ph1RtudbyzG8+WBB2YPuIwKRoLIoj/SQ9NgjgXP9Q6CBawDBeOhJZ0p4mDz72M2ruyNoBz+cn+6mGbxRNqX6RrtNck2w1VmJQ3Q148bbVtB9Wr6sw6f3g+h+/jusXal7Xk0L/unDR7hf+MGmuUnozGIHwVwIKz9xG+7qYZj717q30J+PFEPwXlukaPOIX+eFPCIdwEw7aVwgxX1YBng0wMBqJcTHnIsX3WN29/Qn1iVG/Qq1CTraiZHhiPnM84QsEK4yg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wcBursqTkwlaQrLG5sDu2k+Z3UWX2VZyzZMHxUzSSEZ5hC8afwJHFdv67vYoV/yDq/KFB3JXZzGXxtAJPRiI/9II3MuYHg+LhbrVBUJ0ChAFzTW1XEEep+gF3a8CspqR2AZFQRH4G5krpZZZc+FKHZv6y8Fud8rJWghxR/d8nJhD9Qf1uq9f/vJwooTnvXfDWSSW1T2xLlj6P2A5JQwX3VQJ4t0YQx6Sv+RfmhMgn4nDztmru7K2RE8qxyB4syd6hnKsqAJpxny0eYcdfcHGhZruyfQvS5F+tZYTORHhIkQFbSl5aHNbQg4p39azeHqQ1pdlfZQ+hdKzX1ILZDsnCg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
- Cc: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- Delivery-date: Fri, 29 Nov 2024 01:49:27 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHbQgDiBM9r6Gu0CEmbvf51boI0mQ==
- Thread-topic: [PATCH 3/5] build: arm64: provide -target and -march if using clang
Provide -target and -march explicitly when building with clang. This
makes cross-compilation much easier, because clang accept this
parameters regardless of host platform. Basically,
make XEN_TARGET_ARCH=arm64 clang=y llvm=y
will behave in the same way if building Xen on x86, or on arm64 or on
any other platform.
-march is required because with default value, clang will not
recognize EL2 registers.
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
---
config/arm64.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/config/arm64.mk b/config/arm64.mk
index c4662f67d0..97eb9a82e7 100644
--- a/config/arm64.mk
+++ b/config/arm64.mk
@@ -5,6 +5,10 @@ CONFIG_XEN_INSTALL_SUFFIX :=
CFLAGS += #-marm -march= -mcpu= etc
+ifeq ($(clang),y)
+CFLAGS += -target aarch64 -march=armv8-a
+endif
+
# Use only if calling $(LD) directly.
LDFLAGS_DIRECT += -EL
--
2.47.0
|