From patchwork Thu May 4 07:54:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 679083 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp290430wrs; Thu, 4 May 2023 04:46:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7EVJ4VqGoiQCx0XxtJqkg4Tw/sUhw6voWraOWRtLvu/S6xCCO8T8GW/DBCagG61EtkaaAP X-Received: by 2002:a17:902:aa02:b0:1ab:25b:257f with SMTP id be2-20020a170902aa0200b001ab025b257fmr3165339plb.36.1683200803865; Thu, 04 May 2023 04:46:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683200803; cv=none; d=google.com; s=arc-20160816; b=Hl/8bn7/rrgDgMsJiHw5NhpIkw1zNL5Osq+MeSfm+petTH7fy/3Wfz0DrlqcZodmkd kW3Wy33FZ1xJ1GnN5Z/UyfjjbKml52F3lNnvwpNx6g+prfdjHbhpk8Q4gxbHyNHPkq+w d3ZEkgWdTxISxywB/mXCWj1zywDM2g2oBTmfl92nTdvSmH2oCPDvLah2I61b9vY7V93X s9wdPICFz+Bm34e+qPON2Gsq/MSuNcUGL9cr7PLLr63Pt4udE2T/qJPvF8vxuaDXy097 RlC++rHKNll2pexFSPP9Un6wt+0b7tJZj6W6ErwiDdipfOuwPJCSKlKTnWInnp1vjqnJ Vb2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eKyzOcXZxL3bzaSjNkOVe1Mxf8MNCKLkzmxj0G/rFHA=; b=xMuHV7hiOQHlWft6Bz/EhkufDHN3UZQBuan8aAK+pPMfu+JaenKJodbdVXoVzTu0gH N+35orZ2Vx9Zpbn9/h2xpsl3y23XbRsqwuPRWuO8WY8jmD9DLl/C5C+dxTVQQmNqiH0G 3v1zWe5DM/ak8L5FzvBx43TU7V1yIfJllV6z4+80WvoHoKG6ekEeTPRY/kO5OUUVh1uJ wvJAXk7w9FFIMNNs7twFdLIjvErDQfdbZxo0PkgNVvzM7ZTUSpVxZZA/wemRCaz6MAsu w8c6I3MkYzgmWj8G2mulXWKcv9z19qYKHqFzn4IgeMJ15cjMnboli6G0gITIkJyefBKE I1ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mGTYmX3K; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id f5-20020a17090274c500b001aafaf1a917si8418624plt.472.2023.05.04.04.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 May 2023 04:46:43 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mGTYmX3K; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A95EC857A5; Thu, 4 May 2023 13:45:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="mGTYmX3K"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2E455855D9; Thu, 4 May 2023 09:55:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 763FF827A6 for ; Thu, 4 May 2023 09:55:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=leo.yan@linaro.org Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1aae5c2423dso1103965ad.3 for ; Thu, 04 May 2023 00:55:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683186921; x=1685778921; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eKyzOcXZxL3bzaSjNkOVe1Mxf8MNCKLkzmxj0G/rFHA=; b=mGTYmX3KHt657Vqz3UC5DwPmaVdvT9QtzZZ90IUgJ9/JL3Rw9pbSoAxdKtilbI0Zxz ixeq6QQ1THjOGVshBJtBeuGNZGqHNRW15bUUhSQNl/sryGSCLNV/6qUxInKCfaI1cFQe f/kMYZ/dWnC4MCi9tTwi1L8kFuoFtct9rm2HXvZ0SHHvFyHy3s91TkHz2eOyQcOpQpQh 1cm+4715h3BFxcDulf4TLmc4UsObVEVip7u73Zwlok8o8hKdgheiRF8hkSK9Ypg07eyS CZqLQ8IKlzzobLNOkL18540zwDEvLGyBsCFx7uAcN93lHocrq2EYZ3cDaDnHBAaTiuGl gpog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683186921; x=1685778921; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eKyzOcXZxL3bzaSjNkOVe1Mxf8MNCKLkzmxj0G/rFHA=; b=X83LRw4zR2wn5QjSyIWDC0foh52M0I9KuOdInfArlfNTT1Yavk+tnRLZxecPXGNHHS CIlgMv+vSjBN0Ut/c05kPKfrNaOU4ONQwGurfjKUhobnPJdJYPgtiBEZcF6hh3DCt0s1 kmBP2Rwv6/dTWI/OkqX/pbXxOZVQmJNJmOdZjivQkJAm1BXj5+nhtjG8OlFYdBT+KejQ H0TZBfzTiACkApxXo3Tf5RgQE8XNGnBvBDk7PmY5RX8Dxynvw1S2uB+K25HYOuCacJ2i 7VzhYp4mAagPH5ZkuX2hIp8ROJZnGYoFsByp5QmH8DncHkTY8Y/8/vD0Wb6uALlvYu4A PO6Q== X-Gm-Message-State: AC+VfDyQquAA0N/isGJikvl+pZjsiFm1CYnjBFcszHi2mo56Pe9bbinj xYSNkPviGSqYT5ZqRAmv9hdYlfPeswxp69P4VSUniA== X-Received: by 2002:a17:902:b591:b0:1ab:8f4:af3a with SMTP id a17-20020a170902b59100b001ab08f4af3amr2402806pls.39.1683186920795; Thu, 04 May 2023 00:55:20 -0700 (PDT) Received: from leoy-yangtze.lan ([107.151.177.135]) by smtp.gmail.com with ESMTPSA id s18-20020a170902ea1200b001a4edbabad3sm7939104plg.230.2023.05.04.00.55.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 May 2023 00:55:20 -0700 (PDT) From: Leo Yan To: u-boot@lists.denx.de, Andrii Anisov , Oleksandr Andrushchenko , Anastasiia Lukianenko Cc: Leo Yan Subject: [PATCH v1 2/2] doc: Add info for building Xen target with Clang Date: Thu, 4 May 2023 15:54:59 +0800 Message-Id: <20230504075459.59855-3-leo.yan@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230504075459.59855-1-leo.yan@linaro.org> References: <20230504075459.59855-1-leo.yan@linaro.org> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 04 May 2023 13:45:54 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean When build Xen target with Clang, the linker reports failure. This patch adds the related info in the documentation as a known issue and gives details for how to dismiss the building failure with Clang. Signed-off-by: Leo Yan --- doc/build/clang.rst | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/doc/build/clang.rst b/doc/build/clang.rst index 1d35616eb5..cc265506c2 100644 --- a/doc/build/clang.rst +++ b/doc/build/clang.rst @@ -74,3 +74,39 @@ simplified with a simple wrapper script - saved as #!/bin/sh exec clang -target arm-freebsd-eabi --sysroot /usr/arm-freebsd "$@" + + +Known Issues +------------ + +When build U-boot for `xenguest_arm64_defconfig` target, it reports linkage +error: + +.. code-block:: bash + + aarch64-linux-gnu-ld.bfd: drivers/xen/hypervisor.o: in function `do_hypervisor_callback': + /home/leoy/Dev2/u-boot/drivers/xen/hypervisor.c:188: undefined reference to `__aarch64_swp8_acq_rel' + aarch64-linux-gnu-ld.bfd: drivers/xen/hypervisor.o: in function `synch_test_and_set_bit': + /home/leoy/Dev2/u-boot/./arch/arm/include/asm/xen/system.h:40: undefined reference to `__aarch64_ldset1_acq_rel' + aarch64-linux-gnu-ld.bfd: drivers/xen/hypervisor.o: in function `synch_test_and_clear_bit': + /home/leoy/Dev2/u-boot/./arch/arm/include/asm/xen/system.h:28: undefined reference to `__aarch64_ldclr1_acq_rel' + aarch64-linux-gnu-ld.bfd: drivers/xen/hypervisor.o: in function `synch_test_and_set_bit': + /home/leoy/Dev2/u-boot/./arch/arm/include/asm/xen/system.h:40: undefined reference to `__aarch64_ldset1_acq_rel' + aarch64-linux-gnu-ld.bfd: drivers/xen/hypervisor.o: in function `synch_test_and_clear_bit': + /home/leoy/Dev2/u-boot/./arch/arm/include/asm/xen/system.h:28: undefined reference to `__aarch64_ldclr1_acq_rel' + aarch64-linux-gnu-ld.bfd: drivers/xen/events.o: in function `synch_test_and_clear_bit': + /home/leoy/Dev2/u-boot/./arch/arm/include/asm/xen/system.h:28: undefined reference to `__aarch64_ldclr1_acq_rel' + aarch64-linux-gnu-ld.bfd: drivers/xen/events.o: in function `synch_test_and_set_bit': + /home/leoy/Dev2/u-boot/./arch/arm/include/asm/xen/system.h:40: undefined reference to `__aarch64_ldset1_acq_rel' + aarch64-linux-gnu-ld.bfd: drivers/xen/gnttab.o: in function `gnttab_end_access': + /home/leoy/Dev2/u-boot/drivers/xen/gnttab.c:109: undefined reference to `__aarch64_cas2_acq_rel' + Segmentation fault + +To fix the failure, we need to append option `-mno-outline-atomics` in Clang +command to not generate local calls to out-of-line atomic operations: + +.. code-block:: bash + + make HOSTCC=clang xenguest_arm64_defconfig + make HOSTCC=clang CROSS_COMPILE=aarch64-linux-gnu- \ + CC="clang -target aarch64-linux-gnueabi -mno-outline-atomics" -j8