From patchwork Thu Mar 27 13:55:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 60081 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB6DEC36010 for ; Thu, 27 Mar 2025 13:55:49 +0000 (UTC) Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web11.50399.1743083741584072170 for ; Thu, 27 Mar 2025 06:55:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@qualcomm.com header.s=qcppdkim1 header.b=GyKa17MQ; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: oss.qualcomm.com, ip: 205.220.168.131, mailfrom: dmitry.baryshkov@oss.qualcomm.com) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 52R5jDUA012382 for ; Thu, 27 Mar 2025 13:55:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=SM+IlWEYt4n c/J3FdkmsdaotwlmJiOhl1MIB1BvrPY0=; b=GyKa17MQ/4Fapky5Z8uijGDr+ef jVtMQitQYqXSP+ETI49xnihB4Vu7bd7BdYRUj0Ed6dahB0io4SQnr3xc9ah+Du7r 3I7ZUYTVXFMmLozvpt2VCZMQajCpS2fBTNLbM6svWkmoZ+RegzPCVvEC52Mn5suC GUgbtTFO+LzOXNFn01j5+ieHQ4VPPVIzWjuRl/LTPOipjdHTewwjb5+1iRt/SCZb F7yqLbIt/oHDcsx7Ucw4/nFogZifiP/+1lJTpqm0zkJomzaNXZ62kgG/23uwcmML QnK8a56G3E+NQVsUQMeqFKTFeSV5J0LZrN1HejkOK4wBu+4lL4TunQcGI4w== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45mmutk4mt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 27 Mar 2025 13:55:40 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7c5f3b94827so59487285a.0 for ; Thu, 27 Mar 2025 06:55:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743083724; x=1743688524; 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=SM+IlWEYt4nc/J3FdkmsdaotwlmJiOhl1MIB1BvrPY0=; b=qiyoVULJtnYX6wIb4aAVLQyd6JOFPbfPAwQKS7yzz5HCV0vJz4FIqbsGnXUdQrVDnx fbfWLi6uEIlz28qdPpaaaUGwcCXmAmT70XrdY0H2scpaYGURdi2bG6vSLGiFfVmZZ07r qkFa2+IX+6AG4Gy9xX87aiqFN7Dt8L8zGrXeOVu1SX98LatBpIgN6nXluddMQjU6R/vq XwYFc5VbZVndNaswJvppIg32wjiFuIJwq8RRLMJOp2L8NBZmOZzruVC8rQBxqKeDESyl khtuqizz9mi+xSOKrS8NgKMTapQAaxfzd0lIhT+5ufhEnIcpEw91mj4Ii87rFB3iS3YQ 97ug== X-Gm-Message-State: AOJu0YyOyyfwGu/0u1ulEL92DpyT8E/HCUMjQAH4l24TSV1Qn4CV0wtl 4s2lBTGczHFA3kWKAcGAl3K66sRltU3db13iQr/cBxXtPmfc5J2WtvKknmd9+c4jzDN1a6dbHpO WyhWPCLREQ7P6XO8EURXsw78CPUdVvwlRpgVsEy4dtbUCAdAdE6xSc2cQRvEsrsnxxaoverILzr sUY3RJK8KDvgM= X-Gm-Gg: ASbGnctJiEHZr+caGGf/H1AnqRzPJbiYWKVctzZs6doq4qt4GdD0BjhOVXmJERpz8kL PsJZ8UeIZrZSa87z64dUKU7my7B+msM3lUs+FxT1/D/dp1aMF2itZ4ysz7fDfGrZ2Ow/imKQt/h KskhCWsAgVATgmBKY2AHU6vja4Kigvmy11zFORUxZtjyqlT598AlqNu75FwOfDFES+xYtMp5qsa h1s85+pc3h5d0/D0AMOZ/P9RnF9F6Ff1w8HhdXfBEFFt2iqaxzjyUyTiu0ttbG0dBIkPdSlh/IC 9GnbPf55cY6bTWmTA3k2j8GqiOpx6CIGZh+wd/l7UVRNjx35rlUx8mXWPqBRzOHZyWTKdmqx88s LPC/XEhUrdhuEiWGfqg3YXk6CUEuL X-Received: by 2002:a05:620a:3703:b0:7c5:4738:8a0e with SMTP id af79cd13be357-7c5eda66e5dmr521717285a.44.1743083724021; Thu, 27 Mar 2025 06:55:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEl8CjV1C9LO2PJnqynPw9paAVrBCxX0zAlFEct/y/rNIC5RPI2xr6pjx2gvX9CYFmsLLzCig== X-Received: by 2002:a05:620a:3703:b0:7c5:4738:8a0e with SMTP id af79cd13be357-7c5eda66e5dmr521713285a.44.1743083723536; Thu, 27 Mar 2025 06:55:23 -0700 (PDT) Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30d7d910e70sm24288271fa.105.2025.03.27.06.55.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Mar 2025 06:55:22 -0700 (PDT) From: Dmitry Baryshkov To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 1/8] llvm: move libLLVM.so.N.M to llvm-libllvm package Date: Thu, 27 Mar 2025 15:55:13 +0200 Message-Id: <20250327135520.3920189-2-dmitry.baryshkov@oss.qualcomm.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com> References: <20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: lR7DGtYChCWGjAeNpXGHv3-9r9wjssEk X-Authority-Analysis: v=2.4 cv=MqlS63ae c=1 sm=1 tr=0 ts=67e558dd cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=xqWC_Br6kY4A:10 a=Vs1iUdzkB0EA:10 a=EUspDBNiAAAA:8 a=O224Tk8ENGDN2UPLuq4A:9 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-GUID: lR7DGtYChCWGjAeNpXGHv3-9r9wjssEk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-27_01,2025-03-26_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 mlxlogscore=921 mlxscore=0 bulkscore=0 adultscore=0 malwarescore=0 suspectscore=0 lowpriorityscore=0 clxscore=1015 phishscore=0 impostorscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2503270096 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 27 Mar 2025 13:55:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/213737 Neither MAJOR_VER nor MINOR_VER are defined, so libLLVM.so.N.M ends up in the main libllvm package rather than the llvm-libllvm package, as expected. Fix this by properly using two-component version. Fixes: db3bf550a372 ("llvm: Update to 18.1.0 RC4") Signed-off-by: Dmitry Baryshkov --- meta/recipes-devtools/llvm/llvm_20.1.0.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/llvm/llvm_20.1.0.bb b/meta/recipes-devtools/llvm/llvm_20.1.0.bb index 7ffc6ec1cb8a..296a164cdd7f 100644 --- a/meta/recipes-devtools/llvm/llvm_20.1.0.bb +++ b/meta/recipes-devtools/llvm/llvm_20.1.0.bb @@ -19,6 +19,7 @@ VER_SUFFIX = "" PV .= "${VER_SUFFIX}" MAJOR_VERSION = "${@oe.utils.trim_version("${PV}", 1)}" +MAJ_MIN_VERSION = "${@oe.utils.trim_version("${PV}", 2)}" LLVM_RELEASE = "${PV}" @@ -152,7 +153,7 @@ FILES:${PN}-bugpointpasses = "\ FILES:${PN}-libllvm = "\ ${libdir}/libLLVM-${MAJOR_VERSION}.so \ - ${libdir}/libLLVM.so.${MAJOR_VER}.${MINOR_VER} \ + ${libdir}/libLLVM.so.${MAJ_MIN_VERSION} \ " FILES:${PN}-liblto += "\ From patchwork Thu Mar 27 13:55:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 60077 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5DE8C3600B for ; Thu, 27 Mar 2025 13:55:29 +0000 (UTC) Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web10.50536.1743083727389787519 for ; Thu, 27 Mar 2025 06:55:27 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@qualcomm.com header.s=qcppdkim1 header.b=Rww+CxEI; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: oss.qualcomm.com, ip: 205.220.168.131, mailfrom: dmitry.baryshkov@oss.qualcomm.com) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 52R5jFMg010902 for ; Thu, 27 Mar 2025 13:55:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=lrnxHIQhpnz Qk8LjlG6rp9IzYwU1+oVEHFQn83Bqpwk=; b=Rww+CxEIUKkbrQcIyjWZuhXqKQL 95erRM8FfN3JS4+v3YGwkTNBhZEkxmfuoRi8oqw5Jkj+eFrMd2ojOaOSJhSNthDe tgSL9Eb0cHYSVKEUAF/7//rK+b5KQpj6yIXbKqFQzUGmKHwkMZohsilvsi6LJ44V b9gzd7AU0HmJMIRD1O4XTttNytwKzqTwWTiFVnXvlR7mTtKTTND3UEaYrHDd3fSc yMHW7qHKYAItNINCcFpFnE1YOqI+ivgFO5CO4XDM8Sr3d9MY63gRpN3I8W6/Eday sQ3xKNJcsjtiM07xCaixwA4WroPkMVVCaBjVUrjlK8ejBCV66C+xTSUWYKQ== Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45n0kqhaes-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 27 Mar 2025 13:55:26 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7c3c5e92d41so164428985a.1 for ; Thu, 27 Mar 2025 06:55:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743083725; x=1743688525; 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=lrnxHIQhpnzQk8LjlG6rp9IzYwU1+oVEHFQn83Bqpwk=; b=WKHISlclPBkTowHJnP3FENNeEBXgNrm/VCpjVHEPfg9O+UTHWFtDoRuKAfUlP2VR7/ VnD5ZxnrRB8q5fedXdYVF+Ko1Jikx3n0zRQ0EXS9rEh0za9hLYQoDp1QMuNZesqWzZ7F 91dgyERtVa2DDPhiwo+O28et65OvMjklL3QJLgqzIp7e9qryvbtk6a3hxpLv6z/G+UkE f8lnwnbw6Qqnl7RN0S9gComCmjHd14MTmbkNxF1P6/omHrkQcZteZakgQxnuimclNDoJ kTuZ4vBmgxa3GxpjITEluNRLxpn1T8gJYBOvLAxyP3vs6lrg7RPAsCSaAnbvLMDSXy6A JeSw== X-Gm-Message-State: AOJu0YzyRF8M17vsaRTlTntVBMqHEPdQVeOTDNi0psH0zvRQt64hYCw3 U4tEjKmStrIEuow5RWXyyIt7jGRzq4Niitj9S+LQ+2DuCLtelrnXYV7OVh6crY40wWO5ObLJLWx +OrfrqthqETgXy/7zLYvX7deyg3yDLAMHiY4OaSZoHBbBjviKqBcZq945mb7X6tnUJYlyn7vAqk b9sVvA0Uv7hsU= X-Gm-Gg: ASbGnctPzwvVn2Wzl4CYChhdK/j87snBIP+kJ36BfMquHba+N0YAbDMvDxiay8C/e53 7c7/kIdTMOhpgSf4z9EgnaLCEmpt53OdoCWpJjEgivZn0ARgRYU2Ro6HtXMr7QoQl1otvN+C4JC gweuNMMKugcoUHP1VSzaBWIV17EWGV+L+Xa77nxCRR4cvVOOcptekYqI/cH28lzRtinV5OcGJYO vHaCE7Egqap73j41WDmnbk19TmX8rfzqH8CA85mZLzlwfQtj33gAkZhZi/QNcsRckffbLobRtPU zQKDMHUGYzHTLqDzcXkq4q607hCl7FbuUK3gp8MFQP1AKxP2ibyCrDeMTLmOvR9HUKcyf0hFaOB VPg7bpwnkUDOGEE76kXMsxhhUF1jB X-Received: by 2002:a05:620a:4256:b0:7c5:5d9b:b626 with SMTP id af79cd13be357-7c5eda60393mr746833885a.36.1743083725061; Thu, 27 Mar 2025 06:55:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGIedesBUx/K8L7Zdhr4JoGy/owrEVlQwS7jJ5zPZaHfY+RTVO9YDphy6/V/gzSUy3A6zZo9w== X-Received: by 2002:a05:620a:4256:b0:7c5:5d9b:b626 with SMTP id af79cd13be357-7c5eda60393mr746827785a.36.1743083724560; Thu, 27 Mar 2025 06:55:24 -0700 (PDT) Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30d7d910e70sm24288271fa.105.2025.03.27.06.55.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Mar 2025 06:55:23 -0700 (PDT) From: Dmitry Baryshkov To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 2/8] llvm: use OECMAKE_SOURCEPATH to specify cmake dir Date: Thu, 27 Mar 2025 15:55:14 +0200 Message-Id: <20250327135520.3920189-3-dmitry.baryshkov@oss.qualcomm.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com> References: <20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 1eR2IU5zRSDO91S0KOGJS2zW9Wn_q0tR X-Authority-Analysis: v=2.4 cv=FrcF/3rq c=1 sm=1 tr=0 ts=67e558ce cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=xqWC_Br6kY4A:10 a=Vs1iUdzkB0EA:10 a=NEAV23lmAAAA:8 a=EUspDBNiAAAA:8 a=D0RIUQgIwEgepnv7z8kA:9 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-GUID: 1eR2IU5zRSDO91S0KOGJS2zW9Wn_q0tR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-27_01,2025-03-26_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxlogscore=968 clxscore=1015 suspectscore=0 malwarescore=0 adultscore=0 impostorscore=0 mlxscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2503270095 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 27 Mar 2025 13:55:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/213731 Instead of pushing an `llvm` sourcedir into S, specify it through the OECMAKE_SOURCEPATH so that all the patches are applied to the topdir and debug paths also use top path to map. Signed-off-by: Dmitry Baryshkov --- meta/recipes-devtools/llvm/llvm_20.1.0.bb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meta/recipes-devtools/llvm/llvm_20.1.0.bb b/meta/recipes-devtools/llvm/llvm_20.1.0.bb index 296a164cdd7f..7470d2b4d8a5 100644 --- a/meta/recipes-devtools/llvm/llvm_20.1.0.bb +++ b/meta/recipes-devtools/llvm/llvm_20.1.0.bb @@ -24,15 +24,17 @@ MAJ_MIN_VERSION = "${@oe.utils.trim_version("${PV}", 2)}" LLVM_RELEASE = "${PV}" SRC_URI = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${PV}/llvm-project-${PV}.src.tar.xz \ - file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \ - file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \ + file://0007-llvm-allow-env-override-of-exe-path.patch \ + file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch \ file://llvm-config \ " SRC_URI[sha256sum] = "4579051e3c255fb4bb795d54324f5a7f3ef79bd9181e44293d7ee9a7f62aad9a" UPSTREAM_CHECK_URI = "https://github.com/llvm/llvm-project" UPSTREAM_CHECK_REGEX = "llvmorg-(?P\d+(\.\d+)+)" -S = "${WORKDIR}/llvm-project-${PV}.src/llvm" +S = "${WORKDIR}/llvm-project-${PV}.src" + +OECMAKE_SOURCEPATH = "${S}/llvm" LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install" From patchwork Thu Mar 27 13:55:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 60082 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6E78C3600B for ; Thu, 27 Mar 2025 13:55:49 +0000 (UTC) Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web11.50398.1743083740259264733 for ; Thu, 27 Mar 2025 06:55:40 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@qualcomm.com header.s=qcppdkim1 header.b=eC/X6oQk; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: oss.qualcomm.com, ip: 205.220.168.131, mailfrom: dmitry.baryshkov@oss.qualcomm.com) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 52R5jEPA025664 for ; Thu, 27 Mar 2025 13:55:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=AkTOh9tAbmi gNSP4S5+Szfi+tsJ/KboFvALsFtkOZPA=; b=eC/X6oQkRRgYbbRcBT9Q6miU/qx dBVqurZa8+8clAOD9gst6R4wdux7zuMux+BYTOrSIsLzYhtu9JwlzcNhzJAHP4cE b78FYUZNYcQVRDtxPZncLdhPo1qUZGpTiWk+EXk8fx9+cg2y/VHJSkPOq5vK6znA mvYYYZ0oD/SvSQlZh9+fzitHp4KLwVeMG0HZ+8cZcfiwbgR6+Q2h6lEo2NhgDZRm dNXu/dbh+A76CQNGM2mWZgabYYOciVy1N/BMFkzbRI7UjnQUy6UL+UMFhdDDMDXb 60+HWaGtGwTZ5bjIAahT3b8mJfYnXTcBcJxPb9dJA6y9F6EiIyEAyWW6R2w== Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45n0nus9qb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 27 Mar 2025 13:55:39 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-7c5ba3b91b1so195454685a.0 for ; Thu, 27 Mar 2025 06:55:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743083727; x=1743688527; 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=AkTOh9tAbmigNSP4S5+Szfi+tsJ/KboFvALsFtkOZPA=; b=CWO7osZbaemTqxnBYGNq2gJvnbeM03G4n2TCe5RopdFz9koIAYGKZJecbM1ULIL7t7 7ikFlHaq+ql6XS07ld5pMGQsxSxAQgwCsWU4wXUh6LNBVpY/iX7kNwPFljIk1fOf2kGZ R+uLcjzm+WLIkubLA3MxAyqwYnE4rety80FSaMzSMIy5UregKq1INGkcPWCopV944uhG HgL3iIcDXXs0/7zMWPvvlGQkyku6ZzNMnNnxSrzDfJ/+YOa9ewfHsN5GaPnSyMXSoj+X qasxHBsAm/mtyDyE+7SyIRYn/CGmr+6nISvauiqznHP3HYR4re2CyHrGyvXQICrnQc5e 0gPg== X-Gm-Message-State: AOJu0YzN0N062glohgK13nNuqLYqilQmt5MFlwz7R8Mgj0BNifGbSmsk KU7zNsa8wwGPPfDfVTWLfy6RDNppq5aPDIoljuMYRA25lJ6zcXQgjxAfKskUcT/ZBAo7IBqhTqv WpKdj627OfHwyK8U0YyoFv4o6pWPzsAagNQxgEqXNRKjpcmY3DXlV0tBcUCwbbQ6+mU8RHhkpkW 3XjSssbi3Fb2s= X-Gm-Gg: ASbGncsHtuxhwRVL7LqWI6TiaqX6oieoDUwSzA7tPL9deX4JKTUohYGpNjfnLhTbKQb Uu/8pnE6uVVH5xXsmrfO9ZVUlo872nvD3plisjncQWBCkW9OMJhyia6uZ691Mol/4be1Q6q4Dbp vWDU24N9bKrr6zAClpsVSKrmFY9dNPmaYeXF+tnjVL2Nb1OjbSJlUua1+cTZvbcDFxE/89RQLt0 v0R1AwIjRsbGQZLtRVJbKMbWvC9zwVTG3bdoHiRteDLtSl1y8zhK1huM6AwzGQCyOCfRpvP8L2R d/O/wEbduliY2rIVUmRV7UhVVNlb8Z9BmvjIRe/C9/Ek/NbBnm/taSzI7ZiIF8bQ0cdlRokiB0S 4rbzr5s9EffKUhkiqZmkkv2ffO+Zw X-Received: by 2002:a05:620a:3946:b0:7c5:3b8d:9f2f with SMTP id af79cd13be357-7c5f6c44475mr38033785a.17.1743083726421; Thu, 27 Mar 2025 06:55:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHWBA5flNTuzSqA8yU5emWOQ0lsobvc8wTB6xcKGFT0KpOj9oNYKco6eri5z9tLlPkw8cpQjg== X-Received: by 2002:a05:620a:3946:b0:7c5:3b8d:9f2f with SMTP id af79cd13be357-7c5f6c44475mr38028785a.17.1743083725820; Thu, 27 Mar 2025 06:55:25 -0700 (PDT) Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30d7d910e70sm24288271fa.105.2025.03.27.06.55.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Mar 2025 06:55:24 -0700 (PDT) From: Dmitry Baryshkov To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 3/8] llvm: support building libclc Date: Thu, 27 Mar 2025 15:55:15 +0200 Message-Id: <20250327135520.3920189-4-dmitry.baryshkov@oss.qualcomm.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com> References: <20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com> MIME-Version: 1.0 X-Proofpoint-GUID: HCA13srewmxzpoEonucTXcn3Q8100yBf X-Authority-Analysis: v=2.4 cv=AcaxH2XG c=1 sm=1 tr=0 ts=67e558db cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=xqWC_Br6kY4A:10 a=Vs1iUdzkB0EA:10 a=NEAV23lmAAAA:8 a=Twlkf-z8AAAA:8 a=EUspDBNiAAAA:8 a=YiW2yjIvKM0L5YyyVhYA:9 a=a97rIl97qucA:10 a=NFOGd7dJGGMPyQGDc5-O:22 a=-74SuR6ZdpOK_LpdRCUo:22 X-Proofpoint-ORIG-GUID: HCA13srewmxzpoEonucTXcn3Q8100yBf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-27_01,2025-03-26_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxlogscore=999 impostorscore=0 malwarescore=0 bulkscore=0 mlxscore=0 adultscore=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 suspectscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2503270096 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 27 Mar 2025 13:55:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/213736 Current Mesa requires libclc in order to build Intel Gallium (iris) or Vulkan drivers. In order to unblock Mesa updates, build libclc (and clang) as a part of the build process. Don't install clang into the target system, it is only used during the build process. Proper handling of clang as a toolchain is a separate and much more complicated topic. Signed-off-by: Dmitry Baryshkov --- .../llvm/llvm/fix-native-compilation.patch | 67 +++++++++++++++++++ meta/recipes-devtools/llvm/llvm_20.1.0.bb | 43 ++++++++++-- 2 files changed, 106 insertions(+), 4 deletions(-) create mode 100644 meta/recipes-devtools/llvm/llvm/fix-native-compilation.patch diff --git a/meta/recipes-devtools/llvm/llvm/fix-native-compilation.patch b/meta/recipes-devtools/llvm/llvm/fix-native-compilation.patch new file mode 100644 index 000000000000..4d51b6617cc4 --- /dev/null +++ b/meta/recipes-devtools/llvm/llvm/fix-native-compilation.patch @@ -0,0 +1,67 @@ +From e94e529aefb28b65165e978daa2bfd89867ee8d0 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov +Date: Fri, 21 Mar 2025 17:17:52 +0200 +Subject: [PATCH] cmake/modules/CrossCompile: fix NATIVE build setup + +Fix variables being passed to cmake when generating NATIVE build dir. + +Upstream-Status: Inappropriate [OE-Specific build-system fix] +Signed-off-by: Dmitry Baryshkov + +Index: llvm-project-20.1.0.src/llvm/cmake/modules/CrossCompile.cmake +=================================================================== +--- llvm-project-20.1.0.src.orig/llvm/cmake/modules/CrossCompile.cmake ++++ llvm-project-20.1.0.src/llvm/cmake/modules/CrossCompile.cmake +@@ -23,19 +23,37 @@ function(llvm_create_cross_target projec + if (EXISTS ${LLVM_MAIN_SRC_DIR}/cmake/platforms/${toolchain}.cmake) + set(CROSS_TOOLCHAIN_FLAGS_INIT + -DCMAKE_TOOLCHAIN_FILE=\"${LLVM_MAIN_SRC_DIR}/cmake/platforms/${toolchain}.cmake\") ++ elseif (${target_name} STREQUAL NATIVE) ++ set(CROSS_TOOLCHAIN_FLAGS_INIT ++ -DCMAKE_C_COMPILER=\"${LLVM_NATIVE_C_COMPILER}\" ++ -DCMAKE_CXX_COMPILER=\"${LLVM_NATIVE_CXX_COMPILER}\" ++ -DCMAKE_C_FLAGS=\"${LLVM_NATIVE_C_FLAGS}\" ++ -DCMAKE_CXX_FLAGS=\"${LLVM_NATIVE_CXX_FLAGS}\" ++ -DCMAKE_EXE_LINKER_FLAGS=\"${LLVM_NATIVE_LD_FLAGS}\" ++ ) + elseif (NOT CMAKE_CROSSCOMPILING) + set(CROSS_TOOLCHAIN_FLAGS_INIT + -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} + -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} + ) + endif() + set(CROSS_TOOLCHAIN_FLAGS_${target_name} ${CROSS_TOOLCHAIN_FLAGS_INIT} + CACHE STRING "Toolchain configuration for ${target_name}") + + # project specific version of the flags up above + set(CROSS_TOOLCHAIN_FLAGS_${project_name}_${target_name} "" + CACHE STRING "Toolchain configuration for ${project_name}_${target_name}") + ++ if (${target_name} STREQUAL NATIVE) ++ set(cross_flags ++ "-DLLVM_DEFAULT_TARGET_TRIPLE='${LLVM_NATIVE_TRIPLE}'") ++ else() ++ set(cross_flags ++ "-DLLVM_DEFAULT_TARGET_TRIPLE='${LLVM_TARGET_TRIPLE}'" ++ "-DLLVM_TARGET_ARCH='${LLVM_TARGET_ARCH}'" ++ "-DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE") ++ endif() ++ + if (buildtype) + set(build_type_flags "-DCMAKE_BUILD_TYPE=${buildtype}") + endif() +@@ -91,12 +111,11 @@ function(llvm_create_cross_target projec + -DCMAKE_C_COMPILER_LAUNCHER="${CMAKE_C_COMPILER_LAUNCHER}" + -DCMAKE_CXX_COMPILER_LAUNCHER="${CMAKE_CXX_COMPILER_LAUNCHER}" + ${CROSS_TOOLCHAIN_FLAGS_${target_name}} ${CMAKE_CURRENT_SOURCE_DIR} ++ #${CROSS_TOOLCHAIN_FLAGS_INIT} ${CMAKE_CURRENT_SOURCE_DIR} + ${CROSS_TOOLCHAIN_FLAGS_${project_name}_${target_name}} +- -DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE ++ ${cross_flags} + -DLLVM_TARGETS_TO_BUILD="${targets_to_build_arg}" + -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${experimental_targets_to_build_arg}" +- -DLLVM_DEFAULT_TARGET_TRIPLE="${LLVM_TARGET_TRIPLE}" +- -DLLVM_TARGET_ARCH="${LLVM_TARGET_ARCH}" + -DLLVM_ENABLE_PROJECTS="${llvm_enable_projects_arg}" + -DLLVM_EXTERNAL_PROJECTS="${llvm_external_projects_arg}" + -DLLVM_ENABLE_RUNTIMES="${llvm_enable_runtimes_arg}" diff --git a/meta/recipes-devtools/llvm/llvm_20.1.0.bb b/meta/recipes-devtools/llvm/llvm_20.1.0.bb index 7470d2b4d8a5..0fb336ee7747 100644 --- a/meta/recipes-devtools/llvm/llvm_20.1.0.bb +++ b/meta/recipes-devtools/llvm/llvm_20.1.0.bb @@ -26,8 +26,10 @@ LLVM_RELEASE = "${PV}" SRC_URI = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${PV}/llvm-project-${PV}.src.tar.xz \ file://0007-llvm-allow-env-override-of-exe-path.patch \ file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch \ + file://fix-native-compilation.patch \ file://llvm-config \ " + SRC_URI[sha256sum] = "4579051e3c255fb4bb795d54324f5a7f3ef79bd9181e44293d7ee9a7f62aad9a" UPSTREAM_CHECK_URI = "https://github.com/llvm/llvm-project" UPSTREAM_CHECK_REGEX = "llvmorg-(?P\d+(\.\d+)+)" @@ -56,19 +58,22 @@ def get_llvm_arch(bb, d, arch_var): def get_llvm_host_arch(bb, d): return get_llvm_arch(bb, d, 'HOST_ARCH') -PACKAGECONFIG ??= "libllvm" +PACKAGECONFIG ??= "libllvm libclc" # if optviewer OFF, force the modules to be not found or the ones on the host would be found PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml" PACKAGECONFIG[libllvm] = "" +PACKAGECONFIG[libclc] = "" # # Default to build all OE-Core supported target arches (user overridable). # -LLVM_TARGETS ?= "AMDGPU;${@get_llvm_host_arch(bb, d)}" +LLVM_TARGETS ?= "AMDGPU;NVPTX;SPIRV;${@get_llvm_host_arch(bb, d)}" ARM_INSTRUCTION_SET:armv5 = "arm" ARM_INSTRUCTION_SET:armv4t = "arm" +LLVM_PROJECTS = "${@bb.utils.contains('PACKAGECONFIG', 'libclc', 'clang;libclc', '', d)}" + EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \ -DLLVM_ENABLE_EXPENSIVE_CHECKS=OFF \ -DLLVM_ENABLE_PIC=ON \ @@ -82,6 +87,13 @@ EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \ -DLLVM_VERSION_SUFFIX='${VER_SUFFIX}' \ -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \ -DCMAKE_BUILD_TYPE=Release \ + -DLLVM_ENABLE_PROJECTS='${LLVM_PROJECTS}' \ + -DLLVM_NATIVE_TRIPLE='${BUILD_SYS}' \ + -DLLVM_NATIVE_C_COMPILER=\'${@ d.getVar('BUILD_CC').replace('ccache', '').strip()}\' \ + -DLLVM_NATIVE_CXX_COMPILER=\'${@ d.getVar('BUILD_CXX').replace('ccache', '').strip()}\' \ + -DLLVM_NATIVE_C_FLAGS='${BUILD_CFLAGS}' \ + -DLLVM_NATIVE_CXX_FLAGS='${BUILD_CXXFLAGS}' \ + -DLLVM_NATIVE_LD_FLAGS='${BUILD_LDFLAGS}' \ " EXTRA_OECMAKE:append:class-target = "\ @@ -89,6 +101,8 @@ EXTRA_OECMAKE:append:class-target = "\ -DLLVM_HOST_TRIPLE=${TARGET_SYS} \ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \ -DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \ + -DLLVM_NATIVE_TOOL_DIR=${STAGING_BINDIR_NATIVE} \ + -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ " EXTRA_OECMAKE:append:class-nativesdk = "\ @@ -96,6 +110,8 @@ EXTRA_OECMAKE:append:class-nativesdk = "\ -DLLVM_HOST_TRIPLE=${SDK_SYS} \ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \ -DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \ + -DLLVM_NATIVE_TOOL_DIR=${STAGING_BINDIR_NATIVE} \ + -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ " # patch out build host paths for reproducibility @@ -124,11 +140,26 @@ do_install() { # Remove opt-viewer: https://llvm.org/docs/Remarks.html rm -rf ${D}${datadir}/opt-viewer - rmdir ${D}${datadir} + rmdir ${D}${datadir} || true # reproducibility sed -i -e 's,${WORKDIR},,g' ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake fi + + # Remove clang bits from target packages, we are not providing it for the system + if ${@bb.utils.contains('PACKAGECONFIG', 'libclc', 'true', 'false', d)} && + [ "${CLASSOVERRIDE}" != "class-native" ] ; then + rm -f ${D}${bindir}/clang* + rm -fr ${D}${libdir}/clang + rm -fr ${D}${datadir}/clang + + rm -f ${D}${bindir}/scan* + rm -fr ${D}${libdir}/libscanbuild + rm -fr ${D}${datadir}/scan-build + rm -fr ${D}${datadir}/scan-view + + rm -fr ${D}${libdir}/libear + fi } do_install:append:class-native() { @@ -145,9 +176,11 @@ llvm_sysroot_preprocess() { ln -sf llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV} } -PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto" +PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto ${PN}-clc" +PROVIDES = "libclc" RRECOMMENDS:${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liboptremarks" +RPROVIDES:${PN}-clc += "libclc" FILES:${PN}-bugpointpasses = "\ ${libdir}/BugpointPasses.so \ @@ -180,6 +213,8 @@ FILES:${PN}-staticdev += "\ ${libdir}/*.a \ " +FILES:${PN}-clc += "${datadir}/clc" + INSANE_SKIP:${PN}-libllvm += "dev-so" BBCLASSEXTEND = "native nativesdk" From patchwork Thu Mar 27 13:55:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 60078 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5AF3C3600B for ; Thu, 27 Mar 2025 13:55:39 +0000 (UTC) Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web10.50537.1743083729734071692 for ; Thu, 27 Mar 2025 06:55:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@qualcomm.com header.s=qcppdkim1 header.b=TbQ+CdLu; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: oss.qualcomm.com, ip: 205.220.168.131, mailfrom: dmitry.baryshkov@oss.qualcomm.com) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 52R5jFYo005975 for ; Thu, 27 Mar 2025 13:55:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=fxx1fa5HZBr rEZSe2K5qu3SgXGL/0e99fwkiFL3qFrc=; b=TbQ+CdLuQmITsnBajZu9nPVMvJZ 7y2atASvHV0mxHX/XfvgUE//gFbdM9N9Nz6Gv4OL4twSHMfSlp2KquMYyi1YXRtz kBKPUe63lBUrbt19ss20CeXQ6g2p0j1qgug9PSmyXk/AS9OhZ0fpYGwy6DoN356L XOW8tkwfk98+dranSxxjKYCIXt2EGJHqOxlofJQYsmOyeV015uYdeNq5i+8zclI8 /42SRssB46bkINrALKX+RNHZV8uE2gxCPJWo8Ch2iPbzA/nHoFdH6cjA3mdOXSQw 4OUP0mo7Apbk2R6rPU3dG3sIgGatBveJ4biDFsnBJgeiUgFqo+Iad9zflYg== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45m7nf5fcc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 27 Mar 2025 13:55:29 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7c548e16909so117961885a.2 for ; Thu, 27 Mar 2025 06:55:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743083728; x=1743688528; 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=fxx1fa5HZBrrEZSe2K5qu3SgXGL/0e99fwkiFL3qFrc=; b=TBBkwz/+iua3bc3pHQ521SERpQpIN2M8kZUh43Zn99JRseRRw5hUmHuEf+KKDorrEu Pj6OjNlNFLbWKxuRHok/9ZYCYM3lR0nZY1gBGWy2rLQHGC3f5/QsIFPIbx+kfsyYTwxk MRdsna71GX6oqr6yebKPFzCnSmpYE9yAVQBc7WPmX6OcndgWYmKcin0kGeFE2c8RfJas cSghl0k9dct9BliZjGtNdMvsEtgHsGKlllG30vkKmeYoVHRg3Bo01sMZYddNeC6+5Y4D hmzpuVq5EqoCkWajSS8Xh8fZ6H5ZcLfYSSIEC/I2hcwoTWSJwFS2DrkPyIc6mM9iK9xN noFg== X-Gm-Message-State: AOJu0YyVlpyFVUaJY1Tl45D4G53QYHBbTo5gD9ZJYSXIomAcuf9RFtL7 Nr2SWzHcPRVzQuqcZmWf4I3mvb8bGLVJho6pxMX8xq2F6TxD+gulZ0+VUOzVcLIwDQdVsi61QE1 qXy2FXvLXGgzccNYKFLdEKhPQL4I/hDc43yBr+S8KCFATGxGaLCP4zxquyd+yePlaBQ873MAcPH Or7BOw0ukMTq0= X-Gm-Gg: ASbGncvbxnVBkjmm+ioZI9Da4rj6+nc/NIkjly9fZB7p66QwEkCxak5GGvOqk3/hdbs 3yv3KEA1lBsSejMhcYlJiKKaEq5zK6bWywA2/KkYFOHQmFmg6pJ9F0e9RZWayDSfAP6zeDw/tJ7 HvgidNJ/CO9MQs8G8JjW4hg/XaLpYBIsHB4gLWO3Y6JJ69aqCyP/3WZvmWF1an3xbZ8dkw5Dgo5 F3096QuaiwN80JfgCvS4qu8tXx+k3FENCqIymm+vik0cpWq3aGY9z9BrwYjLiFOZH9DL6IdI9C1 1BDVT5cDOxqBsK0FNxfTYj0+c1L9/2aznr2+C1ISWnkcqZ6mljzD6m/zC6y3YVZmydC4aUPv3Bs IcpjpFYpQllKy70kFAcL/QvJVx8Ov X-Received: by 2002:a05:620a:4707:b0:7c5:4738:8a11 with SMTP id af79cd13be357-7c5eda127e6mr609486685a.27.1743083727610; Thu, 27 Mar 2025 06:55:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkxb1k5mfY5fI9aXQo5nAV12C4RwKH6mSAx+ZYrNaOidMJcqlyKe0dtd9B7xkGfyWL9E3i4Q== X-Received: by 2002:a05:620a:4707:b0:7c5:4738:8a11 with SMTP id af79cd13be357-7c5eda127e6mr609481585a.27.1743083727010; Thu, 27 Mar 2025 06:55:27 -0700 (PDT) Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30d7d910e70sm24288271fa.105.2025.03.27.06.55.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Mar 2025 06:55:26 -0700 (PDT) From: Dmitry Baryshkov To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 4/8] llvm: import YOCTO_ALTERNATE_LIBDIR patch from meta-clang Date: Thu, 27 Mar 2025 15:55:16 +0200 Message-Id: <20250327135520.3920189-5-dmitry.baryshkov@oss.qualcomm.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com> References: <20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 3wDfzUoOHnpPgJzob-JEP0nS1mtTmz8I X-Proofpoint-GUID: 3wDfzUoOHnpPgJzob-JEP0nS1mtTmz8I X-Authority-Analysis: v=2.4 cv=IMMCChvG c=1 sm=1 tr=0 ts=67e558d1 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=xqWC_Br6kY4A:10 a=Vs1iUdzkB0EA:10 a=EUspDBNiAAAA:8 a=IvTj1HvjAAAA:8 a=pGLkceISAAAA:8 a=mnq_9Jzftx32lQRVvlkA:9 a=PEH46H7Ffwr30OY-TuGO:22 a=kmyLcwvAnC_t3PsnBtKb:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-27_01,2025-03-26_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 malwarescore=0 mlxscore=0 clxscore=1015 phishscore=0 priorityscore=1501 mlxlogscore=999 adultscore=0 lowpriorityscore=0 bulkscore=0 spamscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2503270095 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 27 Mar 2025 13:55:39 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/213732 Cross-building of mesa requires us to be able to provide target-specific value for --libdir. Update the cross-environment llvm-config patch from meta-clang in order to allow overriding the --libdir output. Signed-off-by: Dmitry Baryshkov --- ...-llvm-allow-env-override-of-exe-path.patch | 41 +++++++++++++++++-- meta/recipes-devtools/llvm/llvm/llvm-config | 7 ++++ 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/meta/recipes-devtools/llvm/llvm/0007-llvm-allow-env-override-of-exe-path.patch b/meta/recipes-devtools/llvm/llvm/0007-llvm-allow-env-override-of-exe-path.patch index 29266013ecb1..e598a9e5d49b 100644 --- a/meta/recipes-devtools/llvm/llvm/0007-llvm-allow-env-override-of-exe-path.patch +++ b/meta/recipes-devtools/llvm/llvm/0007-llvm-allow-env-override-of-exe-path.patch @@ -8,16 +8,18 @@ return the libraries, include directories, etc. from inside the sysroot rather than from the native sysroot. Thus provide an env override for calling llvm-config from a target sysroot. +Add YOCTO_ALTERNATE_LIBDIR and YOCTO_ALTERNATE_EXE_PATH env variables + Upstream-Status: Inappropriate [OE-specific] Signed-off-by: Martin Kelly Signed-off-by: Khem Raj --- - llvm/tools/llvm-config/llvm-config.cpp | 7 +++++++ - 1 file changed, 7 insertions(+) + llvm/tools/llvm-config/llvm-config.cpp | 25 +++++++++++++++++++------ + 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp -index d5b76b1bb..6c28c34bc 100644 +index d5b76b1bb6c1..a739f0d8dbea 100644 --- a/llvm/tools/llvm-config/llvm-config.cpp +++ b/llvm/tools/llvm-config/llvm-config.cpp @@ -246,6 +246,13 @@ Typical components:\n\ @@ -34,3 +36,36 @@ index d5b76b1bb..6c28c34bc 100644 // This just needs to be some symbol in the binary; C++ doesn't // allow taking the address of ::main however. void *P = (void *)(intptr_t)GetExecutablePath; +@@ -325,7 +332,7 @@ int main(int argc, char **argv) { + // Compute various directory locations based on the derived location + // information. + std::string ActivePrefix, ActiveBinDir, ActiveIncludeDir, ActiveLibDir, +- ActiveCMakeDir; ++ ActiveCMakeDir, BaseLibDir; + std::string ActiveIncludeOption; + if (IsInDevelopmentTree) { + ActiveIncludeDir = std::string(LLVM_SRC_ROOT) + "/include"; +@@ -366,12 +373,18 @@ int main(int argc, char **argv) { + sys::fs::make_absolute(ActivePrefix, Path); + ActiveBinDir = std::string(Path); + } +- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX; +- { +- SmallString<256> Path(LLVM_INSTALL_PACKAGE_DIR); +- sys::fs::make_absolute(ActivePrefix, Path); +- ActiveCMakeDir = std::string(Path); ++ // Hack for Yocto: we need to override the lib path when we are using ++ // llvm-config from within a target sysroot since LLVM_LIBDIR_SUFFIX ++ // maybe different for host llvm vs target e.g. ppc64 Libdir=lib64 but ++ // x86_64 Libdir = lib ++ const char *YoctoLibDir = std::getenv("YOCTO_ALTERNATE_LIBDIR"); ++ if (YoctoLibDir != nullptr) { ++ BaseLibDir = std::string(YoctoLibDir); ++ } else { ++ BaseLibDir = std::string("/lib") + LLVM_LIBDIR_SUFFIX; + } ++ ActiveLibDir = ActivePrefix + BaseLibDir; ++ ActiveCMakeDir = ActiveLibDir + "/cmake/llvm"; + ActiveIncludeOption = "-I" + ActiveIncludeDir; + } + diff --git a/meta/recipes-devtools/llvm/llvm/llvm-config b/meta/recipes-devtools/llvm/llvm/llvm-config index 5e4ded2da5bc..d9d994a2032f 100644 --- a/meta/recipes-devtools/llvm/llvm/llvm-config +++ b/meta/recipes-devtools/llvm/llvm/llvm-config @@ -9,6 +9,13 @@ # Provide ours from the environment instead. NEXT_LLVM_CONFIG="$(which -a llvm-config | sed -n 2p)" +SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" +export YOCTO_ALTERNATE_EXE_PATH="${YOCTO_ALTERNATE_EXE_PATH:="$(readlink -f "$SCRIPT_DIR/../llvm-config")"}" +if [ -n "$( echo $base_libdir | sed -n '/lib64/p')" ]; then + export YOCTO_ALTERNATE_LIBDIR="${YOCTO_ALTERNATE_LIBDIR:="/lib64"}" +else + export YOCTO_ALTERNATE_LIBDIR="${YOCTO_ALTERNATE_LIBDIR:="/lib"}" +fi if [[ $# == 0 ]]; then exec "$NEXT_LLVM_CONFIG" fi From patchwork Thu Mar 27 13:55:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 60083 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E29C5C36012 for ; Thu, 27 Mar 2025 13:55:49 +0000 (UTC) Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web10.50545.1743083741581711936 for ; Thu, 27 Mar 2025 06:55:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@qualcomm.com header.s=qcppdkim1 header.b=HSjCRFtW; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: oss.qualcomm.com, ip: 205.220.168.131, mailfrom: dmitry.baryshkov@oss.qualcomm.com) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 52R5jRnE012841 for ; Thu, 27 Mar 2025 13:55:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=2L1YqyzMcWE FSrFFjAKwckg73pcKfdXuizGOneATh9w=; b=HSjCRFtW4DJBFpAcN59EYK58RUV VbrH8YuPb5qs05BAP/kKMNSyQa+QxjEWTeCv9natT2XidOknERHLjgN+2A5+hJS5 QK3qQuzy15txPaPF/oFdZJJWIdczl2RWHEeOm1A69WbyS+3qH2H/Ds04Rz+xeCQV XPxzl+eO/55wXVPdpNHDVAiDEswm8nAELeXQxd7YnoTcaso5O8xk+uGczzHm8c2l tKgnZhLHJreWjHCvSI5KN6aTWrcV9kPQTgtZG+C5VhCe5V8j/6TapeUVqvrHEKaq GfKXdwWSvhDVIl2VNBaAbPCi6xCZalfqYY+qwoI7xc7sJW6q0KTGaQf5Nvg== Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45mmutk4n4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 27 Mar 2025 13:55:41 +0000 (GMT) Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-6ed0526b507so16081746d6.0 for ; Thu, 27 Mar 2025 06:55:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743083729; x=1743688529; 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=2L1YqyzMcWEFSrFFjAKwckg73pcKfdXuizGOneATh9w=; b=bSmw1Yvx1zyBijK+6bADURAnurQAIJXZBsSEK3Zv++dxl4gFPODuvK73Kpu0d2t9SA ldHT8mQ+Zlq8rw2MPkWZ9LRZeMEP4//EEEC5B2CzRvKoOOg5Mz2WMiHU+LGHGEhebyvO AyFwU7Chv4F5sINlWLIXVxZFyJYAekc2OhNVa9wCd2UbZgNo9HOZhTBNAqsGKtEe5IsH Re1fCCpV9BXe33Y5ohHQ8ftPfPtKn4FFoWloG/uTe1RefFYuO0XMdpUAsFik6tpWXx6O PxYK7bzFP/bGN0m+Nm6AxDoQfJvLkuQD91/88KTGdPDIiN9Yty4VhmXRY8RGCKKtpu9N dikQ== X-Gm-Message-State: AOJu0YwV7VFmM8TB+prw5vjhMhDD5CByebuyfLSMpUc6iLYDbn4TS+VK 1cKoU3RV/01lgnPE9A62icR2wfEIY3EN5VNt//pAGM0YfLfhpwtQJpFKBH12BlkoaWuw6OkRdgG /4L24+Zmh5UslREAw95Oh0Y4nKNd7bDzVGHUcgT/ilVhDIBGhfYqdV4DNqVvGLHQwUbozwhG1DR Mcd/NIS5+/gvM= X-Gm-Gg: ASbGncv94XLsl8FSsf4HXay08bzmWsWh9tV//j+kBg9KrMIGR24IeweJBogHjSWCqLQ RyFxPlP4e35sCPuFwzHZjl+V/ZJ5n9t+L4O9xJ8B4k50KdnYlWXiIXAzisMS6O3KRd+Jrem/5wb xUmMLK8X17eOrtS6d1+W3/Y0DDOq5VXvM6MwcQ6DKudmOUGAVxZMIyyPcXNUu3f0nia4Y2Fzjmx iBw/AGb1YnMOFA/3fVSFWSwWkcn3lJsfsT+P3BepktvgEEqnqiD/hV8vHha8V/Ka9YMZQPUV8Vc rABKX30vANmy5ivIzKSnU7i9wdBRnbIOYbHmmhQLGRioTswa6zJfRlua4aSrROJVR0n1PCo7MsH alHq3OoXGm/WCeEs38yUxNzZA2xUa X-Received: by 2002:a05:6214:acc:b0:6e8:eabf:fd55 with SMTP id 6a1803df08f44-6ed2392f050mr45766026d6.39.1743083728761; Thu, 27 Mar 2025 06:55:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGswRBsVy98CTNEBzxmg1QckYC5TWLAkr/BvdFb1mTDtD0XsYKhLjfys6mMB65lc1wpTtMc8Q== X-Received: by 2002:a05:6214:acc:b0:6e8:eabf:fd55 with SMTP id 6a1803df08f44-6ed2392f050mr45765586d6.39.1743083728129; Thu, 27 Mar 2025 06:55:28 -0700 (PDT) Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30d7d910e70sm24288271fa.105.2025.03.27.06.55.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Mar 2025 06:55:27 -0700 (PDT) From: Dmitry Baryshkov To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 5/8] llvm: add SPIRV-LLVM-Translator support Date: Thu, 27 Mar 2025 15:55:17 +0200 Message-Id: <20250327135520.3920189-6-dmitry.baryshkov@oss.qualcomm.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com> References: <20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: a9kiJHzlGJvfeMS07iLCpmSylaOLKSWf X-Authority-Analysis: v=2.4 cv=MqlS63ae c=1 sm=1 tr=0 ts=67e558dd cx=c_pps a=7E5Bxpl4vBhpaufnMqZlrw==:117 a=xqWC_Br6kY4A:10 a=Vs1iUdzkB0EA:10 a=NEAV23lmAAAA:8 a=EUspDBNiAAAA:8 a=NxEeosk9xJlwc9cSGm8A:9 a=pJ04lnu7RYOZP9TFuWaZ:22 X-Proofpoint-GUID: a9kiJHzlGJvfeMS07iLCpmSylaOLKSWf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-27_01,2025-03-26_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 mlxlogscore=999 mlxscore=0 bulkscore=0 adultscore=0 malwarescore=0 suspectscore=0 lowpriorityscore=0 clxscore=1015 phishscore=0 impostorscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2503270096 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 27 Mar 2025 13:55:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/213738 Mesa builds require SPIRV-LLVM-Translator in order to build CLC support. While it is possible to build it separately (like meta-clang does), it also requires a separate clang compiler (which OE-Core doesn't provide). Use an alternative path and build SPIRV-LLVM-Translator as a part of the LLVM build process, lifting the requirement for the separate clang. Once clang is properly integrated into the OE-Core layer, this can be split to a separate package and dropped. Signed-off-by: Dmitry Baryshkov --- ...ossCompile-pass-SPIR-V-headers-path-.patch | 40 +++++++++++++++++++ .../llvm/llvm/spirv-internal-build.patch | 27 +++++++++++++ meta/recipes-devtools/llvm/llvm_20.1.0.bb | 32 ++++++++++++--- 3 files changed, 94 insertions(+), 5 deletions(-) create mode 100644 meta/recipes-devtools/llvm/llvm/0001-cmake-modules-CrossCompile-pass-SPIR-V-headers-path-.patch create mode 100644 meta/recipes-devtools/llvm/llvm/spirv-internal-build.patch diff --git a/meta/recipes-devtools/llvm/llvm/0001-cmake-modules-CrossCompile-pass-SPIR-V-headers-path-.patch b/meta/recipes-devtools/llvm/llvm/0001-cmake-modules-CrossCompile-pass-SPIR-V-headers-path-.patch new file mode 100644 index 000000000000..316a6bdbf2b1 --- /dev/null +++ b/meta/recipes-devtools/llvm/llvm/0001-cmake-modules-CrossCompile-pass-SPIR-V-headers-path-.patch @@ -0,0 +1,40 @@ +From e94e529aefb28b65165e978daa2bfd89867ee8d0 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov +Date: Fri, 21 Mar 2025 17:17:52 +0200 +Subject: [PATCH] cmake/modules/CrossCompile: pass SPIR-V headers path to + native build + +In case LLVM is being built together with SPIRV-LLVM-Translator, it +might be required to pass LLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR define +to the native build too. Extend native build setup to pass that variable +to the called cmake too. + +Upstream-Status: Inappropriate [OE-Specific build-system fix] +Signed-off-by: Dmitry Baryshkov +--- + llvm/cmake/modules/CrossCompile.cmake | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/llvm/cmake/modules/CrossCompile.cmake b/llvm/cmake/modules/CrossCompile.cmake +index 3b31d3e218a3..24b62f4ff8af 100644 +--- a/llvm/cmake/modules/CrossCompile.cmake ++++ b/llvm/cmake/modules/CrossCompile.cmake +@@ -81,6 +81,10 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype) + set(libc_flags -DLLVM_LIBC_GPU_BUILD=ON) + endif() + ++ if (LLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR) ++ set(spirv_headers "-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${LLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR}") ++ endif() ++ + add_custom_command(OUTPUT ${${project_name}_${target_name}_BUILD}/CMakeCache.txt + COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" + -DCMAKE_MAKE_PROGRAM="${CMAKE_MAKE_PROGRAM}" +@@ -101,6 +105,7 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype) + -DLLVM_INCLUDE_BENCHMARKS=OFF + -DLLVM_INCLUDE_TESTS=OFF + ${build_type_flags} ${linker_flag} ${external_clang_dir} ${libc_flags} ++ ${spirv_headers} + ${ARGN} + WORKING_DIRECTORY ${${project_name}_${target_name}_BUILD} + DEPENDS CREATE_${project_name}_${target_name} diff --git a/meta/recipes-devtools/llvm/llvm/spirv-internal-build.patch b/meta/recipes-devtools/llvm/llvm/spirv-internal-build.patch new file mode 100644 index 000000000000..14233d312870 --- /dev/null +++ b/meta/recipes-devtools/llvm/llvm/spirv-internal-build.patch @@ -0,0 +1,27 @@ +From e94e529aefb28b65165e978daa2bfd89867ee8d0 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov +Date: Fri, 21 Mar 2025 17:17:52 +0200 +Subject: [PATCH] SPIRV-LLVM-Translator: fix handling of built-in SPIRV targer + +Upstream-Status: Pending +Signed-off-by: Dmitry Baryshkov + +Index: llvm-project-20.1.0.src/llvm/projects/SPIRV-LLVM-Translator/CMakeLists.txt +=================================================================== +--- llvm-project-20.1.0.src.orig/llvm/projects/SPIRV-LLVM-Translator/CMakeLists.txt ++++ llvm-project-20.1.0.src/llvm/projects/SPIRV-LLVM-Translator/CMakeLists.txt +@@ -116,6 +116,14 @@ if(LLVM_SPIRV_BUILD_EXTERNAL) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) + endif() ++else() ++ message(STATUS "Internal LLVM library") ++ is_llvm_target_library("SPIRV" spirv_present_result INCLUDED_TARGETS) ++ if(spirv_present_result) ++ message(STATUS "Found SPIR-V Backend") ++ set(SPIRV_BACKEND_FOUND TRUE) ++ add_compile_definitions(LLVM_SPIRV_BACKEND_TARGET_PRESENT) ++ endif() + endif() + + set(LLVM_SPIRV_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include) diff --git a/meta/recipes-devtools/llvm/llvm_20.1.0.bb b/meta/recipes-devtools/llvm/llvm_20.1.0.bb index 0fb336ee7747..df2c497c14cc 100644 --- a/meta/recipes-devtools/llvm/llvm_20.1.0.bb +++ b/meta/recipes-devtools/llvm/llvm_20.1.0.bb @@ -23,10 +23,20 @@ MAJ_MIN_VERSION = "${@oe.utils.trim_version("${PV}", 2)}" LLVM_RELEASE = "${PV}" +SRCREV_spirv = "68edc9d3d10ff6ec6353803a1bc60a5c25e7b715" +SPIRV_BRANCH = "llvm_release_200" + +SRC_URI_SPIRV = " \ + git://github.com/KhronosGroup/SPIRV-LLVM-Translator;protocol=https;name=spirv;branch=${SPIRV_BRANCH};destsuffix=llvm-project-${PV}.src/llvm/projects/SPIRV-LLVM-Translator \ + file://0001-cmake-modules-CrossCompile-pass-SPIR-V-headers-path-.patch \ + file://spirv-internal-build.patch \ +" + SRC_URI = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${PV}/llvm-project-${PV}.src.tar.xz \ file://0007-llvm-allow-env-override-of-exe-path.patch \ file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch \ file://fix-native-compilation.patch \ + ${@bb.utils.contains('PACKAGECONFIG', 'spirv', '${SRC_URI_SPIRV}', '', d)} \ file://llvm-config \ " @@ -58,11 +68,12 @@ def get_llvm_arch(bb, d, arch_var): def get_llvm_host_arch(bb, d): return get_llvm_arch(bb, d, 'HOST_ARCH') -PACKAGECONFIG ??= "libllvm libclc" +PACKAGECONFIG ??= "libllvm libclc spirv" # if optviewer OFF, force the modules to be not found or the ones on the host would be found PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml" PACKAGECONFIG[libllvm] = "" PACKAGECONFIG[libclc] = "" +PACKAGECONFIG[spirv] = "-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${STAGING_INCDIR}/.. ,,spirv-tools-native spirv-headers" # # Default to build all OE-Core supported target arches (user overridable). @@ -72,7 +83,9 @@ LLVM_TARGETS ?= "AMDGPU;NVPTX;SPIRV;${@get_llvm_host_arch(bb, d)}" ARM_INSTRUCTION_SET:armv5 = "arm" ARM_INSTRUCTION_SET:armv4t = "arm" -LLVM_PROJECTS = "${@bb.utils.contains('PACKAGECONFIG', 'libclc', 'clang;libclc', '', d)}" +LLVM_PROJECTS_CLANG = "${@bb.utils.contains_any('PACKAGECONFIG', 'libclc spirv', 'clang', '', d)}" +LLVM_PROJECTS_CLC = "${@bb.utils.contains('PACKAGECONFIG', 'libclc', ';libclc', '', d)}" +LLVM_PROJECTS = "${LLVM_PROJECTS_CLANG}${LLVM_PROJECTS_CLC}" EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \ -DLLVM_ENABLE_EXPENSIVE_CHECKS=OFF \ @@ -147,7 +160,7 @@ do_install() { fi # Remove clang bits from target packages, we are not providing it for the system - if ${@bb.utils.contains('PACKAGECONFIG', 'libclc', 'true', 'false', d)} && + if ${@bb.utils.contains_any('PACKAGECONFIG', 'libclc spirv', 'true', 'false', d)} && [ "${CLASSOVERRIDE}" != "class-native" ] ; then rm -f ${D}${bindir}/clang* rm -fr ${D}${libdir}/clang @@ -176,11 +189,12 @@ llvm_sysroot_preprocess() { ln -sf llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV} } -PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto ${PN}-clc" -PROVIDES = "libclc" +PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto ${PN}-clc ${PN}-spirv" +PROVIDES = "libclc spirv-llvm-translator" RRECOMMENDS:${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liboptremarks" RPROVIDES:${PN}-clc += "libclc" +RPROVIDES:${PN}-spirv += "spirv-llvm-translator" FILES:${PN}-bugpointpasses = "\ ${libdir}/BugpointPasses.so \ @@ -215,6 +229,14 @@ FILES:${PN}-staticdev += "\ FILES:${PN}-clc += "${datadir}/clc" +FILES:${PN}-spirv = " \ + ${bindir}/llvm-spirv \ + ${includedir}/LLVMSPIRVLib \ + ${libdir}/pkgconfig/LLVMSPIRVLib.pc \ + ${libdir}/libLLVMSPIRV* \ +" + INSANE_SKIP:${PN}-libllvm += "dev-so" +INSANE_SKIP:${PN}-spirv += "staticdev" BBCLASSEXTEND = "native nativesdk" From patchwork Thu Mar 27 13:55:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 60079 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C17D4C36010 for ; Thu, 27 Mar 2025 13:55:39 +0000 (UTC) Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web11.50394.1743083733402706931 for ; Thu, 27 Mar 2025 06:55:33 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@qualcomm.com header.s=qcppdkim1 header.b=oXM1ZzlH; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: oss.qualcomm.com, ip: 205.220.168.131, mailfrom: dmitry.baryshkov@oss.qualcomm.com) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 52R5jEkh005949 for ; Thu, 27 Mar 2025 13:55:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= bmEZ/uTy7TumYc3NPc13anNtuTSTFev2i/Ozww53toY=; b=oXM1ZzlHpIStd8NR DwQRxeARAtj9YK4tA1Q9evsVvZWobmeSIzEG0kbvIZTmfyxrLvLOKhyoGfJgR1/b G7yq0cmj0IAvJG4hDsiD5UDPnyKXh4t///8q6fBvEasATnFXjDIYFUYP3R6ZQC+l BEUflKSNX9iewNq42Cbntv/UmI0FDZzY0EnuUc+/wWUD4gYZEOIlWALWunYJwlEA DCJ+y+Kl5mGy4nuzx4Ykgt2eTkz6NVrc25snIQILF369t6On9UamFfZ/J7aGZH/Y cbAFRdouvnCZlDcnd8mVCTh5HiQc5jEL+4Rti6C3RNfCe4Eh967McKxWH+CyifuC n5eCTQ== Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45m7nf5fck-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 27 Mar 2025 13:55:32 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7c5e2a31f75so278173985a.1 for ; Thu, 27 Mar 2025 06:55:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743083731; x=1743688531; 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=bmEZ/uTy7TumYc3NPc13anNtuTSTFev2i/Ozww53toY=; b=DvT+KYu7oPnbqASB/bhY6nj1lsgrYOja5dAUtB/UtbShfqgJvms6EerBxOw5legzh0 P5JldmXrdILojRyvqXn5ZJmMnM4G19be+yhuFsyZn3PQWonbdZyvSqlppY0xtI1YTp/q vrHD/DJ95nJ9qAQB9NgPokJ58660vT0SV8nPV2lnYMaSMrCy71Ch0ehU2TOqeKuNPDfO 4UL4VeuzA97yGZHSzn1EDePVYu0kDkryeQOgs0qcXYpDQGSgdJTf2zYr8x0ouB5uXA9t oF1p/Zgkf7qjgncrqHYP/w4Lko5wrRQ9FIuzJqOsbVPcHPAzLP0mIz7jGSPq0U6ivi9w hV9Q== X-Gm-Message-State: AOJu0YyZ78rFj73OaYV8YaJR1/U8Ynls+ax+OTOAYUtKJaqJQEXY5vwD MSX1y2wEJlQPoAFUPyqY5jejNUoNLKfUodqVQgzUTf6K0ztzTwWXt02Phm/VwHSBkeGxqQ6IjUq CMZMut4fWtmlXvlYsvMkx6TTZrIKe4lP8YySZgNUedUrZy92iEive5FUx7xi0l2QfNbHLTUf+uW 3FETOTfXO5eKg= X-Gm-Gg: ASbGncsINzvOEEDb/W560hSCJUtokJqoE9CLpdqZi4d8yWDZKAoI0OcJ1I75C+7EJle 1/vC3Lqj1L6T8XwYu4vKscK50yfsBU9o7EqMIQoeY2c/11GzZxANrbDIlJVXBnhyKJpbic1CF9w QRpc+47/MXa8FQGeVjrNT4rPMSWP9C8fsbznaj/rdTDUzIF1nYdebuiQrEz3TXhULbB/7nDz6o1 mGBLbRwFlfJzNx6MOJjfKRyr0L5s3KNLMAbWt0AGjVZ8TagTyBhdGCQ0gIaKyqeRGGxBo3TMqq9 e1+C+jdHEW9msi+2xPqw3H1GJGJdtT0/Oo3Mmo61wEgVsjnQ7J1hKYwqbj3uZOa55QECG28FKkG 4n2nLktKPLPHv3OpcGcxy/XWxAgnp X-Received: by 2002:a05:620a:2456:b0:7c5:afa6:83ed with SMTP id af79cd13be357-7c5ed9db05dmr488311085a.11.1743083730234; Thu, 27 Mar 2025 06:55:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEHKqN7RtgFRd8mWvGwU03MlgxjgiisYdOrx9JB3Nun9Vu/yvKFn99uiRHfdjomsUzYEBC0jg== X-Received: by 2002:a05:620a:2456:b0:7c5:afa6:83ed with SMTP id af79cd13be357-7c5ed9db05dmr488305285a.11.1743083729423; Thu, 27 Mar 2025 06:55:29 -0700 (PDT) Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30d7d910e70sm24288271fa.105.2025.03.27.06.55.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Mar 2025 06:55:28 -0700 (PDT) From: Dmitry Baryshkov To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 6/8] mesa: upgrade 24.0.7 -> 25.0.2 Date: Thu, 27 Mar 2025 15:55:18 +0200 Message-Id: <20250327135520.3920189-7-dmitry.baryshkov@oss.qualcomm.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com> References: <20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 4OPHoE8tyqKXQCcHLiVyQOBrIxZRh8pU X-Proofpoint-GUID: 4OPHoE8tyqKXQCcHLiVyQOBrIxZRh8pU X-Authority-Analysis: v=2.4 cv=IMMCChvG c=1 sm=1 tr=0 ts=67e558d4 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=Vs1iUdzkB0EA:10 a=ZpVaWaFtAAAA:8 a=e5mUnYsNAAAA:8 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=kiadaU6TOzT6zAdNjyoA:9 a=XZ9zjgA0ByK4FuMM:21 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=geQEn1fu34MA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 a=5tn4MO8azEBWFjlAA-rn:22 a=Vxmtnl_E_bksehYqCbjh:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-27_01,2025-03-26_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 malwarescore=0 mlxscore=0 clxscore=1015 phishscore=0 priorityscore=1501 mlxlogscore=999 adultscore=0 lowpriorityscore=0 bulkscore=0 spamscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2503270095 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-0031df01.pphosted.com id 52R5jEkh005949 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 27 Mar 2025 13:55:39 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/213733 Upgrade the Mesa package, dropping applied and refreshing outstanding patches. The dri3 config option is now gone, dependencies are merged into X11 deps. The swrast gallium driver has been split into softpipe and llvmpipe drivers. Reworked OpenCL support to use mesa_clc compiler. Changelog: https://docs.mesa3d.org/relnotes/25.0.2.html License-Update: license text cleared and clarified. Signed-off-by: Dmitry Baryshkov --- ...-meson-do-not-pull-in-clc-for-clover.patch | 53 ------------ ...lude-missing-llvm-IR-header-Module.h.patch | 41 --------- .../0001-drisw-fix-build-without-dri3.patch | 58 ------------- ...on-t-encode-build-path-into-binaries.patch | 46 ++++++++-- ...son-use-target-path-for-Clang-libdir.patch | 28 +++++++ ...on-t-try-zink-if-not-enabled-in-mesa.patch | 42 ---------- meta/recipes-graphics/mesa/mesa.inc | 84 ++++++++++--------- 7 files changed, 110 insertions(+), 242 deletions(-) delete mode 100644 meta/recipes-graphics/mesa/files/0001-Revert-meson-do-not-pull-in-clc-for-clover.patch delete mode 100644 meta/recipes-graphics/mesa/files/0001-amd-Include-missing-llvm-IR-header-Module.h.patch delete mode 100644 meta/recipes-graphics/mesa/files/0001-drisw-fix-build-without-dri3.patch create mode 100644 meta/recipes-graphics/mesa/files/0001-meson-use-target-path-for-Clang-libdir.patch delete mode 100644 meta/recipes-graphics/mesa/files/0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch diff --git a/meta/recipes-graphics/mesa/files/0001-Revert-meson-do-not-pull-in-clc-for-clover.patch b/meta/recipes-graphics/mesa/files/0001-Revert-meson-do-not-pull-in-clc-for-clover.patch deleted file mode 100644 index 1711e22585a7..000000000000 --- a/meta/recipes-graphics/mesa/files/0001-Revert-meson-do-not-pull-in-clc-for-clover.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 051f41beda540f0ae77b341db01a6de83c9e938a Mon Sep 17 00:00:00 2001 -From: Markus Volk -Date: Fri, 8 Mar 2024 15:53:11 +0100 -Subject: [PATCH] Revert "meson: do not pull in clc for clover" - -This reverts commit 815a6647eb1383e9dc704ffcc266d85f3b13338a. -Upstream-Status: Inappropriate [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27783/diffs?commit_id=a976f2c9f0c07f9e06cc9affd9124b45bc60c2bd] - -Once the merge request above was added, it will only be possible to provide opencl spir-v with gallium-rusticl=true. This is not yet supported in the mesa recipe. -For now reverting this commit allows to still use clover with opencl-spirv, which would otherwise be broken starting from mesa 24.0.2. - -After it was merged, this patch needs to be removed and rusticl support will be required - -Signed-off-by: Markus Volk ---- - meson.build | 3 ++- - src/compiler/meson.build | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/meson.build b/meson.build -index 2db6185..741b5d1 100644 ---- a/meson.build -+++ b/meson.build -@@ -813,6 +813,7 @@ if _opencl != 'disabled' - error('The Clover OpenCL state tracker requires rtti') - endif - -+ with_clc = true - with_gallium_opencl = true - with_opencl_icd = _opencl == 'icd' - else -@@ -837,7 +838,7 @@ if with_gallium_rusticl - endif - - dep_clc = null_dep --if with_gallium_opencl or with_clc -+if with_clc - dep_clc = dependency('libclc') - endif - -diff --git a/src/compiler/meson.build b/src/compiler/meson.build -index 8d73544..1dae56d 100644 ---- a/src/compiler/meson.build -+++ b/src/compiler/meson.build -@@ -79,7 +79,7 @@ subdir('nir') - - subdir('spirv') - --if with_clc -+if with_opencl_spirv - subdir('clc') - endif - if with_gallium diff --git a/meta/recipes-graphics/mesa/files/0001-amd-Include-missing-llvm-IR-header-Module.h.patch b/meta/recipes-graphics/mesa/files/0001-amd-Include-missing-llvm-IR-header-Module.h.patch deleted file mode 100644 index 82ad88a079c1..000000000000 --- a/meta/recipes-graphics/mesa/files/0001-amd-Include-missing-llvm-IR-header-Module.h.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 777d69cf15b80ab1f109a4936d6e4801c4b0e0f3 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 1 Jul 2024 23:09:29 -0700 -Subject: [PATCH] amd: Include missing llvm IR header Module.h -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -With LLVM-19, Module.h header is not being pulled, which results in -compile errors e.g. - -src/amd/llvm/ac_llvm_helper.cpp:102:10: error: no matching function for call to ‘unwrap(LLVMOpaqueModule*&)’ - 102 | unwrap(module)->setTargetTriple(TM->getTargetTriple().getTriple()); - | ~~~~~~^~~~~~~~ -In file included from /mnt/b/yoe/master/build/tmp/work/x86_64-linux/mesa-native/24.0.7/recipe-sysroot-native/usr/include/llvm/IR/Type.h:18, - from /mnt/b/yoe/master/build/tmp/work/x86_64-linux/mesa-native/24.0.7/recipe-sysroot-native/usr/include/llvm/IR/DerivedTypes.h:23, - from /mnt/b/yoe/master/build/tmp/work/x86_64-linux/mesa-native/24.0.7/recipe-sysroot-native/usr/include/llvm/IR/InstrTypes.h:26, - from /mnt/b/yoe/master/build/tmp/work/x86_64-linux/mesa-native/24.0.7/recipe-sysroot-native/usr/include/llvm/Analysis/TargetLibraryInfo.h:14, - from ../mesa-24.0.7/src/amd/llvm/ac_llvm_helper.cpp:8: - -Its getting the definition from llvm/IR/Type.h instead of Module.h and caused -confusion to compiler - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29993] -Signed-off-by: Khem Raj ---- - src/amd/llvm/ac_llvm_helper.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/amd/llvm/ac_llvm_helper.cpp b/src/amd/llvm/ac_llvm_helper.cpp -index 5d065279ad1..af4a50f8409 100644 ---- a/src/amd/llvm/ac_llvm_helper.cpp -+++ b/src/amd/llvm/ac_llvm_helper.cpp -@@ -8,6 +8,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/meta/recipes-graphics/mesa/files/0001-drisw-fix-build-without-dri3.patch b/meta/recipes-graphics/mesa/files/0001-drisw-fix-build-without-dri3.patch deleted file mode 100644 index ab1615209063..000000000000 --- a/meta/recipes-graphics/mesa/files/0001-drisw-fix-build-without-dri3.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 4bd15a419e892da843489c374c58c5b29c40b5d6 Mon Sep 17 00:00:00 2001 -From: Romain Naour -Date: Tue, 6 Feb 2024 09:47:09 +0100 -Subject: [PATCH 1/2] drisw: fix build without dri3 - -commit 1887368df41 ("glx/sw: check for modifier support in the kopper path") -added dri3_priv.h header and dri3_check_multibuffer() function in drisw that -can be build without dri3. - - i686-buildroot-linux-gnu/bin/ld: src/glx/libglx.a.p/drisw_glx.c.o: in function `driswCreateScreenDriver': - drisw_glx.c:(.text.driswCreateScreenDriver+0x3a0): undefined reference to `dri3_check_multibuffer' - collect2: error: ld returned 1 exit status - -Add HAVE_DRI3 guard around dri3_priv.h header and the zink code using -dri3_check_multibuffer(). - -Fixes: 1887368df41 ("glx/sw: check for modifier support in the kopper path") - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27478] -Signed-off-by: Romain Naour -Signed-off-by: Khem Raj ---- - src/glx/drisw_glx.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c -index 3d3f752..4b19e2d 100644 ---- a/src/glx/drisw_glx.c -+++ b/src/glx/drisw_glx.c -@@ -32,7 +32,9 @@ - #include - #include "dri_common.h" - #include "drisw_priv.h" -+#ifdef HAVE_DRI3 - #include "dri3_priv.h" -+#endif - #include - #include - #include -@@ -995,6 +997,7 @@ driswCreateScreenDriver(int screen, struct glx_display *priv, - goto handle_error; - } - -+#ifdef HAVE_DRI3 - if (pdpyp->zink) { - bool err; - psc->has_multibuffer = dri3_check_multibuffer(priv->dpy, &err); -@@ -1005,6 +1008,7 @@ driswCreateScreenDriver(int screen, struct glx_display *priv, - goto handle_error; - } - } -+#endif - - glx_config_destroy_list(psc->base.configs); - psc->base.configs = configs; --- -2.44.0 - diff --git a/meta/recipes-graphics/mesa/files/0001-freedreno-don-t-encode-build-path-into-binaries.patch b/meta/recipes-graphics/mesa/files/0001-freedreno-don-t-encode-build-path-into-binaries.patch index 5975ab4472ec..953a724dc092 100644 --- a/meta/recipes-graphics/mesa/files/0001-freedreno-don-t-encode-build-path-into-binaries.patch +++ b/meta/recipes-graphics/mesa/files/0001-freedreno-don-t-encode-build-path-into-binaries.patch @@ -22,18 +22,29 @@ diff --git a/src/freedreno/afuc/meson.build b/src/freedreno/afuc/meson.build index bb7cebf5a748..351cc31ef2de 100644 --- a/src/freedreno/afuc/meson.build +++ b/src/freedreno/afuc/meson.build -@@ -56,6 +56,7 @@ if with_tests +@@ -56,10 +56,12 @@ if with_tests asm_fw = custom_target('afuc_test.fw', output: 'afuc_test.fw', - command: [asm, '-g', '6', files('../.gitlab-ci/traces/afuc_test.asm'), '@OUTPUT@'], + command: [asm, files('../.gitlab-ci/traces/afuc_test.asm'), '@OUTPUT@'], ++ env: {'RNN_PATH': rnn_src_path}, + ) + asm_fw_a7xx = custom_target('afuc_test_a7xx.fw', + output: 'afuc_test_a7xx.fw', + command: [asm, files('../.gitlab-ci/traces/afuc_test_a7xx.asm'), '@OUTPUT@'], + env: {'RNN_PATH': rnn_src_path}, ) test('afuc-asm', diff, -@@ -120,6 +122,7 @@ if cc.sizeof('size_t') > 4 +@@ -120,11 +122,13 @@ if cc.sizeof('size_t') > 4 disasm_fw = custom_target('afuc_test.asm', output: 'afuc_test.asm', - command: [disasm, '-u', files('../.gitlab-ci/reference/afuc_test.fw'), '-g', '630'], + command: [disasm, '-u', files('../.gitlab-ci/reference/afuc_test.fw')], ++ env: {'RNN_PATH': rnn_src_path}, + capture: true + ) + disasm_fw_a7xx = custom_target('afuc_test_a7xx.asm', + output: 'afuc_test_a7xx.asm', + command: [disasm, '-u', files('../.gitlab-ci/reference/afuc_test_a7xx.fw')], + env: {'RNN_PATH': rnn_src_path}, capture: true ) @@ -71,8 +82,29 @@ index 98e49b8fcf0e..145e72597eb9 100644 -rnn_path = rnn_src_path + ':' + get_option('prefix') + '/' + rnn_install_path +rnn_path = get_option('prefix') + '/' + rnn_install_path - dep_lua = dependency('lua54', 'lua53', 'lua52', 'lua', required: false, - allow_fallback: true, version: '>=5.2') --- + dep_libarchive = dependency('libarchive', allow_fallback: true, required: false) + dep_libxml2 = dependency('libxml-2.0', allow_fallback: true, required: false) +diff --git a/src/freedreno/registers/gen_header.py b/src/freedreno/registers/gen_header.py +--- a/src/freedreno/registers/gen_header.py ++++ b/src/freedreno/registers/gen_header.py +@@ -885,13 +885,14 @@ The rules-ng-ng source files this header + """) + maxlen = 0 + for filepath in p.xml_files: +- maxlen = max(maxlen, len(filepath)) ++ maxlen = max(maxlen, len(os.path.basename(filepath))) + for filepath in p.xml_files: +- pad = " " * (maxlen - len(filepath)) ++ filename = os.path.basename(filepath) ++ pad = " " * (maxlen - len(filename)) + filesize = str(os.path.getsize(filepath)) + filesize = " " * (7 - len(filesize)) + filesize + filetime = time.ctime(os.path.getmtime(filepath)) +- print("- " + filepath + pad + " (" + filesize + " bytes, from " + filetime + ")") ++ print("- " + filename + pad + " (" + filesize + " bytes, from " + filetime + ")") + if p.copyright_year: + current_year = str(datetime.date.today().year) + print() +--- 2.39.2 diff --git a/meta/recipes-graphics/mesa/files/0001-meson-use-target-path-for-Clang-libdir.patch b/meta/recipes-graphics/mesa/files/0001-meson-use-target-path-for-Clang-libdir.patch new file mode 100644 index 000000000000..ef7ae8942e33 --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0001-meson-use-target-path-for-Clang-libdir.patch @@ -0,0 +1,28 @@ +From ecea6fe0d250c3026c22a60ac5420528cc3632d8 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov +Date: Wed, 26 Mar 2025 12:19:10 +0200 +Subject: [PATCH] meson: use target path for Clang libdir + +Instead of trying to detect the target libdir through llvm-config tool +(and ending up with the sysroot path), get libdir from the build +options. Clang is known to use the same libdir in OE build environment. + +Upstream-Status: Inappropriate [OE-Specific] +Signed-off-by: Dmitry Baryshkov +--- + src/gallium/frontends/clover/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/gallium/frontends/clover/meson.build b/src/gallium/frontends/clover/meson.build +index e569b86a1bea..2fc30ffe1ac2 100644 +--- a/src/gallium/frontends/clover/meson.build ++++ b/src/gallium/frontends/clover/meson.build +@@ -44,7 +44,7 @@ libclllvm = static_library( + clover_cpp_args, + clover_opencl_cpp_args, + '-DCLANG_RESOURCE_DIR="@0@"'.format(join_paths( +- dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir'), 'clang', ++ get_option('libdir'), 'clang', + dep_llvm.version(), 'include', + )), + ], diff --git a/meta/recipes-graphics/mesa/files/0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch b/meta/recipes-graphics/mesa/files/0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch deleted file mode 100644 index 036a0b494539..000000000000 --- a/meta/recipes-graphics/mesa/files/0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 62495ebb977866c52d5bed8499a547c49f0d9bc1 Mon Sep 17 00:00:00 2001 -From: Romain Naour -Date: Tue, 6 Feb 2024 09:47:10 +0100 -Subject: [PATCH 2/2] glxext: don't try zink if not enabled in mesa - -Commit 7d9ea77b459 ("glx: add automatic zink fallback loading between hw and sw drivers") -added an automatic zink fallback even when the zink gallium is not -enabled at build time. - -It leads to unexpected error log while loading drisw driver and -zink is not installed on the rootfs: - - MESA-LOADER: failed to open zink: /usr/lib/dri/zink_dri.so - -Fixes: 7d9ea77b459 ("glx: add automatic zink fallback loading between hw and sw drivers") - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27478] -Signed-off-by: Romain Naour -Signed-off-by: Khem Raj ---- - src/glx/glxext.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/glx/glxext.c b/src/glx/glxext.c -index 05c825a..7a06aa9 100644 ---- a/src/glx/glxext.c -+++ b/src/glx/glxext.c -@@ -908,9 +908,11 @@ __glXInitialize(Display * dpy) - #endif /* HAVE_DRI3 */ - if (!debug_get_bool_option("LIBGL_DRI2_DISABLE", false)) - dpyPriv->dri2Display = dri2CreateDisplay(dpy); -+#if defined(HAVE_ZINK) - if (!dpyPriv->dri3Display && !dpyPriv->dri2Display) - try_zink = !debug_get_bool_option("LIBGL_KOPPER_DISABLE", false) && - !getenv("GALLIUM_DRIVER"); -+#endif /* HAVE_ZINK */ - } - #endif /* GLX_USE_DRM */ - if (glx_direct) --- -2.44.0 - diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index f6a91a7002f8..9d71cd7917e2 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -10,21 +10,18 @@ HOMEPAGE = "http://mesa3d.org" BUGTRACKER = "https://bugs.freedesktop.org" SECTION = "x11" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10" +LIC_FILES_CHKSUM = "file://docs/license.rst;md5=ffe678546d4337b732cfd12262e6af11" PE = "2" SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \ file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ - file://0001-drisw-fix-build-without-dri3.patch \ - file://0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch \ - file://0001-Revert-meson-do-not-pull-in-clc-for-clover.patch \ - file://0001-amd-Include-missing-llvm-IR-header-Module.h.patch \ file://0001-freedreno-don-t-encode-build-path-into-binaries.patch\ + file://0001-meson-use-target-path-for-Clang-libdir.patch \ " -SRC_URI[sha256sum] = "7454425f1ed4a6f1b5b107e1672b30c88b22ea0efea000ae2c7d96db93f6c26a" -PV = "24.0.7" +SRC_URI[sha256sum] = "adf904d083b308df95898600ffed435f4b5c600d95fb6ec6d4c45638627fdc97" +PV = "25.0.2" UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P\d+(\.\d+)+)" @@ -38,8 +35,7 @@ do_install:append() { fi } -DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native" -DEPENDS:append:class-target = " ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'mesa-native', '', d)}" +DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native" EXTRANATIVEPATH += "chrpath-native" PROVIDES = " \ ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \ @@ -77,44 +73,43 @@ EXTRA_OEMESON = " \ -Dplatforms='${@",".join("${PLATFORMS}".split())}' \ " -EXTRA_OEMESON:append:class-target = " ${@bb.utils.contains('PACKAGECONFIG', 'opencl', '-Dintel-clc=system', '', d)}" -EXTRA_OEMESON:append:class-native = " ${@bb.utils.contains('PACKAGECONFIG', 'opencl', '-Dintel-clc=enabled', '', d)}" - def strip_comma(s): return s.strip(',') + PACKAGECONFIG = " \ gallium \ video-codecs \ ${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm virgl', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'dri3', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'zink', '', d)} \ " -PACKAGECONFIG:append:class-native = " gallium-llvm r600" +PACKAGECONFIG:append:x86 = " libclc gallium-llvm" +PACKAGECONFIG:append:x86-64 = " libclc gallium-llvm" +PACKAGECONFIG:append:class-native = " libclc gallium-llvm r600" # "gbm" requires "opengl" PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled" -X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr" +X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr xorgproto libxshmfence" # "x11" requires "opengl" PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}" PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" -PACKAGECONFIG[dri3] = "-Ddri3=enabled, -Ddri3=disabled, xorgproto libxshmfence" +VULKAN_DRIVERS_AMD = "" +VULKAN_DRIVERS_AMD:x86 = ",amd" +VULKAN_DRIVERS_AMD:x86-64 = ",amd" +# i686 is a 32 bit override for mesa-native +VULKAN_DRIVERS_AMD:i686 = ",amd" + +VULKAN_DRIVERS_INTEL = "${@bb.utils.contains('PACKAGECONFIG', 'libclc', ',intel', '', d)}" +VULKAN_DRIVERS_LLVM = ",swrast${VULKAN_DRIVERS_INTEL}${VULKAN_DRIVERS_INTEL}" -# Vulkan drivers need dri3 enabled -# amd could be enabled as well but requires gallium-llvm with llvm >= 3.9 VULKAN_DRIVERS = "" -VULKAN_DRIVERS:append:x86 = ",intel,amd" -VULKAN_DRIVERS:append:x86-64 = ",intel,amd" -# i686 is a 32 bit override for mesa-native -VULKAN_DRIVERS:append:i686 = ",intel,amd" VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}" -VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',swrast', '', d)}" +VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${VULKAN_DRIVERS_LLVM}', '', d)}" VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'imagination', ',imagination-experimental', '', d)}" PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers" @@ -137,7 +132,7 @@ PACKAGECONFIG[freedreno-fdperf] = ",,libconfig" PACKAGECONFIG[tools] = "-Dtools=${@strip_comma('${TOOLS}')}, -Dtools='', ${TOOLS_DEPS}" PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false" -PACKAGECONFIG[glvnd] = "-Dglvnd=true, -Dglvnd=false, libglvnd" +PACKAGECONFIG[glvnd] = "-Dglvnd=true, -Dglvnd=disabled, libglvnd" # "gles" requires "opengl" PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2=disabled" @@ -145,9 +140,16 @@ PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2 # "egl" requires "opengl" PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled" -# "opencl" requires libclc from meta-clang and spirv-tools from OE-Core -OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}" -PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools python3-ply-native" +MESA_CLC = "system" +MESA_CLC:class-native = "enabled" +INSTALL_MESA_CLC = "false" +INSTALL_MESA_CLC:class-native = "true" +MESA_NATIVE = "mesa-native" +MESA_NATIVE:class-native = "" + +# "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG! +# Be sure to enable them both for the target and for the native build. +PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dmesa-clc=${MESA_CLC} -Dinstall-mesa-clc=${INSTALL_MESA_CLC},-Dgallium-opencl=disabled,${MESA_NATIVE}" PACKAGECONFIG[broadcom] = "" PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native" @@ -157,13 +159,13 @@ PACKAGECONFIG[vc4] = "" PACKAGECONFIG[v3d] = "" PACKAGECONFIG[zink] = "" -GALLIUMDRIVERS = "swrast" +GALLIUMDRIVERS = "softpipe" # gallium swrast was found to crash Xorg on startup in x32 qemu GALLIUMDRIVERS:x86-x32 = "" -GALLIUMDRIVERS:append:x86 = ",i915,iris,crocus" -GALLIUMDRIVERS:append:x86-64 = ",i915,iris,crocus" +GALLIUMDRIVERS:append:x86 = ",i915,crocus" +GALLIUMDRIVERS:append:x86-64 = ",i915,crocus" # i686 is a 32 bit override for mesa-native -GALLIUMDRIVERS:append:i686 = ",i915,iris,crocus" +GALLIUMDRIVERS:append:i686 = ",i915,crocus" GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}" GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" @@ -173,8 +175,9 @@ GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '' GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '', d)}" # radeonsi requires LLVM +GALLIUMDRIVERS_IRIS = "${@bb.utils.contains('PACKAGECONFIG', 'libclc', ',iris', '', d)}" GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}" -GALLIUMDRIVERS_LLVM = ",r300,nouveau${GALLIUMDRIVERS_RADEONSI}" +GALLIUMDRIVERS_LLVM = ",llvmpipe,r300,nouveau${GALLIUMDRIVERS_IRIS}${GALLIUMDRIVERS_RADEONSI}" GALLIUMDRIVERS_LLVM:append:x86 = ",svga" GALLIUMDRIVERS_LLVM:append:x86-64 = ",svga" # i686 is a 32 bit override for mesa-native @@ -189,6 +192,7 @@ GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl' PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers='', libdrm" PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, -Dllvm=disabled, llvm llvm-native elfutils" +PACKAGECONFIG[libclc] = ",,libclc spirv-tools spirv-llvm-translator" PACKAGECONFIG[xa] = "-Dgallium-xa=enabled, -Dgallium-xa=disabled" PACKAGECONFIG[va] = "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial" PACKAGECONFIG[vdpau] = "-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpau" @@ -242,6 +246,7 @@ RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'lib PACKAGES =+ "libegl-mesa libegl-mesa-dev \ libosmesa libosmesa-dev \ + libgallium \ libgl-mesa libgl-mesa-dev \ libglx-mesa libglx-mesa-dev \ libglapi libglapi-dev \ @@ -267,13 +272,6 @@ do_install:append () { rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc } -do_install:append:class-native () { - if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'true', 'false', d)}; then - install -d ${D}${bindir} - install -m0755 ${B}/src/intel/compiler/intel_clc ${D}${bindir} - fi -} - # For the packages that make up the OpenGL interfaces, inject variables so that # they don't get Debian-renamed (which would remove the -mesa suffix), and # RPROVIDEs/RCONFLICTs on the generic libgl name. @@ -344,7 +342,8 @@ FILES:mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d" FILES:mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${libdir}/libpowervr_rogue.so ${datadir}/vulkan" FILES:${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*" FILES:libegl-mesa = "${libdir}/libEGL*.so.* ${datadir}/glvnd/egl_vendor.d" -FILES:libgbm = "${libdir}/libgbm.so.*" +FILES:libgbm = "${libdir}/libgbm.so.* ${libdir}/gbm/*_gbm.so" +FILES:libgallium = "${libdir}/libgallium-*.so" FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*" FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*" FILES:libgl-mesa = "${libdir}/libGL.so.*" @@ -372,6 +371,9 @@ FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \ FILES:${PN}-tools = "${bindir} ${datadir}" ALLOW_EMPTY:${PN}-tools = "1" +# All DRI drivers are symlinks to libdril_dri.so +INSANE_SKIP:mesa-megadriver += "dev-so" + # Fix upgrade path from mesa to mesa-megadriver RREPLACES:mesa-megadriver = "mesa" RCONFLICTS:mesa-megadriver = "mesa" From patchwork Thu Mar 27 13:55:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 60080 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3060C36011 for ; Thu, 27 Mar 2025 13:55:39 +0000 (UTC) Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web10.50539.1743083733815759592 for ; Thu, 27 Mar 2025 06:55:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@qualcomm.com header.s=qcppdkim1 header.b=oOgOahL2; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: oss.qualcomm.com, ip: 205.220.168.131, mailfrom: dmitry.baryshkov@oss.qualcomm.com) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 52R5jVSD011085 for ; Thu, 27 Mar 2025 13:55:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=+uFD/jg+vd5 uTZgqQ3nzf/qNti3pKQgftOOKFHWwVEI=; b=oOgOahL2qjFqYkMPGiCv3qzXbsq oloAFu+8sux/m7iq+JRZ478MpcEqMDg1op3k5tcpNXE/T/28diMhCfBuoScH6AQD 6og/7GGDJoDZzQCBGVqOMNtdio6fcRoAWxpIdXwFCvS4Hqyv4hgxdTPk7cCTUHVZ WpRF6erH/R7NZnwV5+wd7zirHf9dbQbY0PGUV3eaeP8HgdYi8x1YBqoJqW8Q/Dtp N7rR/Meh2vrncHDwGQHIcqSMa0mrXa812pIDipaylN1oP+NAjs4Yx9qWiYpMZCWi ugtTlv3wk64xXajtc7pzglmy66iR7u/33EGoc7QynrvS1AAbGj64loGpCow== Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45n0kqhafd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 27 Mar 2025 13:55:33 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7c5d608e703so198975485a.3 for ; Thu, 27 Mar 2025 06:55:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743083731; x=1743688531; 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=+uFD/jg+vd5uTZgqQ3nzf/qNti3pKQgftOOKFHWwVEI=; b=QhCVnA3lNsEEJ2qU5yAOIoneUhq94dpE4D83NEPH4QJMLFqObAS8eXvBN0GfzA3+GP HFnUsRZr9Rae0JA6y9Is05Cvl0AgQivVwMMFV90kzzBKQFuZI0/zkKKpJueUPsExrIx4 Ca/C2V2boQ8qrzGIqpctsGrrAtwCqwT5sC+6JxHz8P03H3huUAacS5qCOoFHyMKm8Ypy M0XplUV2Y/6RWHRNn1YV5MZ/6Hwrj/6NSR8D6Z9+VYAVqMWNSkc8Q90QWF1hA+DA76Ab cuBeaswVB7+Edi2T79eOCp8qHrSZf+Obm3oROWQHfiHn/5Q0d42jQPBKa6KMvPCi4Qc7 E3Fg== X-Gm-Message-State: AOJu0YyYgWtdHfgWm4PAkbdfXkg03mP7Vt0Lmz0CYi5AEwSWYTpETFCF E2qauyMVLIEQbZFEDaHnTrT5+2efKZrtw0JPJQvULMIJRRusM4sFvpU8fngS0p1+HM9Rj8kcwur FmC898jVWwLtHxW10vt08f9aDLRYc/a+rnv9EtEsdVAWkoZzxijHoQ0aAge4VpJ48raGSF8D4bu Kj4iGz4h4hy7k= X-Gm-Gg: ASbGncs4qq73fnH8rJzOLCxJ3iH0RKMxeWxD0o7e8fLwt6cTFQsJO7xvNVo2FIknNFN kqfVIbmzNPOp9ypcXUKPz0LGGyFXrTowwCq7v3Wrsk87l1kDLizDA2tPrWwJ3OQ+YBjlHDWQU4Y SY6xjb7JP5u1pPwcHm0mJtZM9n6regGSmQbx+n4jYuO8WvXOUoSkPp3+6wlcpNC8PW3RLuKE5Or FX3GQOWZUw+a0EeupFTKE/TZWZcqadU++a6T00xNIe+RIqS94MjK3J9hvArCsmeQZOuB0bOoaIN cLOGfL6MzUPSGUVZjGJr3hGlFHu0CTU0hbNQxgFOt7y1FjNmjZMzoFKuj0Kg7NUjuMhZRfy5Qxd i51i3sG+8DoX5dNuvSLeUI6DaHdjX X-Received: by 2002:a05:620a:17a1:b0:7c5:6a2a:d0d0 with SMTP id af79cd13be357-7c5ed9dea7fmr558281085a.5.1743083731182; Thu, 27 Mar 2025 06:55:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE06+fJTpw+WGR6MFxht0CQnG97q31fX//wcRNYke/pNMp/2YeBCVZSItEtARAHqnRxS+EJdg== X-Received: by 2002:a05:620a:17a1:b0:7c5:6a2a:d0d0 with SMTP id af79cd13be357-7c5ed9dea7fmr558277385a.5.1743083730593; Thu, 27 Mar 2025 06:55:30 -0700 (PDT) Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30d7d910e70sm24288271fa.105.2025.03.27.06.55.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Mar 2025 06:55:29 -0700 (PDT) From: Dmitry Baryshkov To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 7/8] bindgen-cli: a tool to generate Rust bindings Date: Thu, 27 Mar 2025 15:55:19 +0200 Message-Id: <20250327135520.3920189-8-dmitry.baryshkov@oss.qualcomm.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com> References: <20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: pEzBY5F8bphBWO2ScbydXC3Q6Ai34-yl X-Authority-Analysis: v=2.4 cv=FrcF/3rq c=1 sm=1 tr=0 ts=67e558d5 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=xqWC_Br6kY4A:10 a=Vs1iUdzkB0EA:10 a=R22tBeTbAAAA:8 a=EUspDBNiAAAA:8 a=t7CeM3EgAAAA:8 a=iGHA9ds3AAAA:8 a=QyXUC8HyAAAA:8 a=pGLkceISAAAA:8 a=NEAV23lmAAAA:8 a=DTLswWHaHqxS3IvHltUA:9 a=bTQJ7kPSJx9SKPbeHEYW:22 a=71pCXManv-pOE82v44e3:22 a=FdTzh2GWekK77mhwV6Dw:22 a=nM-MV4yxpKKO9kiQg6Ot:22 X-Proofpoint-GUID: pEzBY5F8bphBWO2ScbydXC3Q6Ai34-yl X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-27_01,2025-03-26_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxlogscore=999 clxscore=1015 suspectscore=0 malwarescore=0 adultscore=0 impostorscore=0 mlxscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2503270095 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 27 Mar 2025 13:55:39 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/213734 Import bindgen-cli from the meta-clang layer, as it is required to generate bindings for Mesa / RustiCL. Specify Khem as maintainer as he is maintaining the meta-clang layer, which included this recipe too. Signed-off-by: Dmitry Baryshkov --- meta/conf/distro/include/maintainers.inc | 1 + .../bindgen-cli/bindgen-cli-crates.inc | 186 ++++++++++++++++++ .../bindgen-cli/bindgen-cli_0.71.1.bb | 19 ++ 3 files changed, 206 insertions(+) create mode 100644 meta/recipes-devtools/bindgen-cli/bindgen-cli-crates.inc create mode 100644 meta/recipes-devtools/bindgen-cli/bindgen-cli_0.71.1.bb diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 2b47d3103c03..953abed2a943 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -64,6 +64,7 @@ RECIPE_MAINTAINER:pn-bash = "Hongxu Jia " RECIPE_MAINTAINER:pn-bash-completion = "Unassigned " RECIPE_MAINTAINER:pn-bc = "Anuj Mittal " RECIPE_MAINTAINER:pn-bind = "Unassigned " +RECIPE_MAINTAINER:pn-bindgen-cli = "Khem Raj " RECIPE_MAINTAINER:pn-binutils = "Khem Raj " RECIPE_MAINTAINER:pn-binutils-cross-${TARGET_ARCH} = "Khem Raj " RECIPE_MAINTAINER:pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Khem Raj " diff --git a/meta/recipes-devtools/bindgen-cli/bindgen-cli-crates.inc b/meta/recipes-devtools/bindgen-cli/bindgen-cli-crates.inc new file mode 100644 index 000000000000..a758440c9d32 --- /dev/null +++ b/meta/recipes-devtools/bindgen-cli/bindgen-cli-crates.inc @@ -0,0 +1,186 @@ +# Autogenerated with 'bitbake -c update_crates bindgen-cli' + +# from Cargo.lock +SRC_URI += " \ + crate://crates.io/aho-corasick/1.1.3 \ + crate://crates.io/annotate-snippets/0.11.4 \ + crate://crates.io/anstyle/1.0.10 \ + crate://crates.io/autocfg/1.4.0 \ + crate://crates.io/bitflags/1.3.2 \ + crate://crates.io/bitflags/2.2.1 \ + crate://crates.io/block/0.1.6 \ + crate://crates.io/cc/1.2.2 \ + crate://crates.io/cexpr/0.6.0 \ + crate://crates.io/cfg-if/1.0.0 \ + crate://crates.io/clang-sys/1.8.1 \ + crate://crates.io/clap/4.1.4 \ + crate://crates.io/clap_complete/4.2.0 \ + crate://crates.io/clap_derive/4.1.0 \ + crate://crates.io/clap_lex/0.3.1 \ + crate://crates.io/either/1.13.0 \ + crate://crates.io/env_logger/0.10.0 \ + crate://crates.io/env_logger/0.8.4 \ + crate://crates.io/errno/0.3.10 \ + crate://crates.io/fastrand/1.9.0 \ + crate://crates.io/getrandom/0.2.15 \ + crate://crates.io/glob/0.3.1 \ + crate://crates.io/heck/0.4.1 \ + crate://crates.io/hermit-abi/0.3.9 \ + crate://crates.io/hermit-abi/0.4.0 \ + crate://crates.io/humantime/2.1.0 \ + crate://crates.io/instant/0.1.12 \ + crate://crates.io/io-lifetimes/1.0.11 \ + crate://crates.io/is-terminal/0.4.13 \ + crate://crates.io/itertools/0.13.0 \ + crate://crates.io/libc/0.2.167 \ + crate://crates.io/libloading/0.8.6 \ + crate://crates.io/linux-raw-sys/0.3.8 \ + crate://crates.io/log/0.4.22 \ + crate://crates.io/malloc_buf/0.0.6 \ + crate://crates.io/memchr/2.7.4 \ + crate://crates.io/minimal-lexical/0.2.1 \ + crate://crates.io/nom/7.1.3 \ + crate://crates.io/objc/0.2.7 \ + crate://crates.io/once_cell/1.20.2 \ + crate://crates.io/os_str_bytes/6.4.1 \ + crate://crates.io/owo-colors/4.1.0 \ + crate://crates.io/prettyplease/0.2.25 \ + crate://crates.io/proc-macro-error-attr/1.0.4 \ + crate://crates.io/proc-macro-error/1.0.4 \ + crate://crates.io/proc-macro2/1.0.92 \ + crate://crates.io/quickcheck/1.0.3 \ + crate://crates.io/quote/1.0.37 \ + crate://crates.io/rand/0.8.5 \ + crate://crates.io/rand_core/0.6.4 \ + crate://crates.io/redox_syscall/0.3.5 \ + crate://crates.io/regex-automata/0.4.9 \ + crate://crates.io/regex-syntax/0.8.5 \ + crate://crates.io/regex/1.11.1 \ + crate://crates.io/rustc-hash/2.1.0 \ + crate://crates.io/rustix/0.37.27 \ + crate://crates.io/shlex/1.3.0 \ + crate://crates.io/similar/2.6.0 \ + crate://crates.io/strsim/0.10.0 \ + crate://crates.io/syn/1.0.109 \ + crate://crates.io/syn/2.0.90 \ + crate://crates.io/tempfile/3.6.0 \ + crate://crates.io/termcolor/1.2.0 \ + crate://crates.io/unicode-ident/1.0.14 \ + crate://crates.io/unicode-width/0.1.14 \ + crate://crates.io/version_check/0.9.4 \ + crate://crates.io/wasi/0.11.0+wasi-snapshot-preview1 \ + crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ + crate://crates.io/winapi-util/0.1.5 \ + crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ + crate://crates.io/winapi/0.3.9 \ + crate://crates.io/windows-sys/0.48.0 \ + crate://crates.io/windows-sys/0.52.0 \ + crate://crates.io/windows-targets/0.48.5 \ + crate://crates.io/windows-targets/0.52.6 \ + crate://crates.io/windows_aarch64_gnullvm/0.48.5 \ + crate://crates.io/windows_aarch64_gnullvm/0.52.6 \ + crate://crates.io/windows_aarch64_msvc/0.48.5 \ + crate://crates.io/windows_aarch64_msvc/0.52.6 \ + crate://crates.io/windows_i686_gnu/0.48.5 \ + crate://crates.io/windows_i686_gnu/0.52.6 \ + crate://crates.io/windows_i686_gnullvm/0.52.6 \ + crate://crates.io/windows_i686_msvc/0.48.5 \ + crate://crates.io/windows_i686_msvc/0.52.6 \ + crate://crates.io/windows_x86_64_gnu/0.48.5 \ + crate://crates.io/windows_x86_64_gnu/0.52.6 \ + crate://crates.io/windows_x86_64_gnullvm/0.48.5 \ + crate://crates.io/windows_x86_64_gnullvm/0.52.6 \ + crate://crates.io/windows_x86_64_msvc/0.48.5 \ + crate://crates.io/windows_x86_64_msvc/0.52.6 \ +" + +SRC_URI[aho-corasick-1.1.3.sha256sum] = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +SRC_URI[annotate-snippets-0.11.4.sha256sum] = "24e35ed54e5ea7997c14ed4c70ba043478db1112e98263b3b035907aa197d991" +SRC_URI[anstyle-1.0.10.sha256sum] = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +SRC_URI[autocfg-1.4.0.sha256sum] = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +SRC_URI[bitflags-1.3.2.sha256sum] = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +SRC_URI[bitflags-2.2.1.sha256sum] = "24a6904aef64d73cf10ab17ebace7befb918b82164785cb89907993be7f83813" +SRC_URI[block-0.1.6.sha256sum] = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" +SRC_URI[cc-1.2.2.sha256sum] = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" +SRC_URI[cexpr-0.6.0.sha256sum] = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +SRC_URI[clang-sys-1.8.1.sha256sum] = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +SRC_URI[clap-4.1.4.sha256sum] = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76" +SRC_URI[clap_complete-4.2.0.sha256sum] = "01c22dcfb410883764b29953103d9ef7bb8fe21b3fa1158bc99986c2067294bd" +SRC_URI[clap_derive-4.1.0.sha256sum] = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8" +SRC_URI[clap_lex-0.3.1.sha256sum] = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade" +SRC_URI[either-1.13.0.sha256sum] = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +SRC_URI[env_logger-0.10.0.sha256sum] = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +SRC_URI[env_logger-0.8.4.sha256sum] = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" +SRC_URI[errno-0.3.10.sha256sum] = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +SRC_URI[fastrand-1.9.0.sha256sum] = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +SRC_URI[getrandom-0.2.15.sha256sum] = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +SRC_URI[glob-0.3.1.sha256sum] = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +SRC_URI[heck-0.4.1.sha256sum] = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +SRC_URI[hermit-abi-0.3.9.sha256sum] = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +SRC_URI[hermit-abi-0.4.0.sha256sum] = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" +SRC_URI[humantime-2.1.0.sha256sum] = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +SRC_URI[instant-0.1.12.sha256sum] = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +SRC_URI[io-lifetimes-1.0.11.sha256sum] = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +SRC_URI[is-terminal-0.4.13.sha256sum] = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" +SRC_URI[itertools-0.13.0.sha256sum] = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +SRC_URI[libc-0.2.167.sha256sum] = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" +SRC_URI[libloading-0.8.6.sha256sum] = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +SRC_URI[linux-raw-sys-0.3.8.sha256sum] = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +SRC_URI[log-0.4.22.sha256sum] = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +SRC_URI[malloc_buf-0.0.6.sha256sum] = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +SRC_URI[memchr-2.7.4.sha256sum] = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +SRC_URI[minimal-lexical-0.2.1.sha256sum] = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +SRC_URI[nom-7.1.3.sha256sum] = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +SRC_URI[objc-0.2.7.sha256sum] = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +SRC_URI[once_cell-1.20.2.sha256sum] = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +SRC_URI[os_str_bytes-6.4.1.sha256sum] = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" +SRC_URI[owo-colors-4.1.0.sha256sum] = "fb37767f6569cd834a413442455e0f066d0d522de8630436e2a1761d9726ba56" +SRC_URI[prettyplease-0.2.25.sha256sum] = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +SRC_URI[proc-macro-error-attr-1.0.4.sha256sum] = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +SRC_URI[proc-macro-error-1.0.4.sha256sum] = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +SRC_URI[proc-macro2-1.0.92.sha256sum] = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +SRC_URI[quickcheck-1.0.3.sha256sum] = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6" +SRC_URI[quote-1.0.37.sha256sum] = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +SRC_URI[rand-0.8.5.sha256sum] = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +SRC_URI[rand_core-0.6.4.sha256sum] = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +SRC_URI[redox_syscall-0.3.5.sha256sum] = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +SRC_URI[regex-automata-0.4.9.sha256sum] = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +SRC_URI[regex-syntax-0.8.5.sha256sum] = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +SRC_URI[regex-1.11.1.sha256sum] = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +SRC_URI[rustc-hash-2.1.0.sha256sum] = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" +SRC_URI[rustix-0.37.27.sha256sum] = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +SRC_URI[shlex-1.3.0.sha256sum] = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +SRC_URI[similar-2.6.0.sha256sum] = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" +SRC_URI[strsim-0.10.0.sha256sum] = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +SRC_URI[syn-1.0.109.sha256sum] = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +SRC_URI[syn-2.0.90.sha256sum] = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +SRC_URI[tempfile-3.6.0.sha256sum] = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +SRC_URI[termcolor-1.2.0.sha256sum] = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +SRC_URI[unicode-ident-1.0.14.sha256sum] = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" +SRC_URI[unicode-width-0.1.14.sha256sum] = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +SRC_URI[version_check-0.9.4.sha256sum] = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +SRC_URI[wasi-0.11.0+wasi-snapshot-preview1.sha256sum] = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +SRC_URI[winapi-i686-pc-windows-gnu-0.4.0.sha256sum] = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +SRC_URI[winapi-util-0.1.5.sha256sum] = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +SRC_URI[winapi-x86_64-pc-windows-gnu-0.4.0.sha256sum] = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +SRC_URI[winapi-0.3.9.sha256sum] = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +SRC_URI[windows-sys-0.48.0.sha256sum] = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +SRC_URI[windows-sys-0.52.0.sha256sum] = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +SRC_URI[windows-targets-0.48.5.sha256sum] = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +SRC_URI[windows-targets-0.52.6.sha256sum] = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +SRC_URI[windows_aarch64_gnullvm-0.48.5.sha256sum] = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +SRC_URI[windows_aarch64_gnullvm-0.52.6.sha256sum] = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +SRC_URI[windows_aarch64_msvc-0.48.5.sha256sum] = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +SRC_URI[windows_aarch64_msvc-0.52.6.sha256sum] = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +SRC_URI[windows_i686_gnu-0.48.5.sha256sum] = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +SRC_URI[windows_i686_gnu-0.52.6.sha256sum] = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +SRC_URI[windows_i686_gnullvm-0.52.6.sha256sum] = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +SRC_URI[windows_i686_msvc-0.48.5.sha256sum] = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +SRC_URI[windows_i686_msvc-0.52.6.sha256sum] = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +SRC_URI[windows_x86_64_gnu-0.48.5.sha256sum] = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +SRC_URI[windows_x86_64_gnu-0.52.6.sha256sum] = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +SRC_URI[windows_x86_64_gnullvm-0.48.5.sha256sum] = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +SRC_URI[windows_x86_64_gnullvm-0.52.6.sha256sum] = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +SRC_URI[windows_x86_64_msvc-0.48.5.sha256sum] = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +SRC_URI[windows_x86_64_msvc-0.52.6.sha256sum] = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" \ No newline at end of file diff --git a/meta/recipes-devtools/bindgen-cli/bindgen-cli_0.71.1.bb b/meta/recipes-devtools/bindgen-cli/bindgen-cli_0.71.1.bb new file mode 100644 index 000000000000..5578fb3d18bf --- /dev/null +++ b/meta/recipes-devtools/bindgen-cli/bindgen-cli_0.71.1.bb @@ -0,0 +1,19 @@ +SUMMARY = "Automatically generates Rust FFI bindings to C and C++ libraries." +HOMEPAGE = "https://rust-lang.github.io/rust-bindgen/" +LICENSE = "BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=0b9a98cb3dcdefcceb145324693fda9b" + +inherit rust cargo cargo-update-recipe-crates + +SRC_URI += "git://github.com/rust-lang/rust-bindgen.git;protocol=https;branch=main" +SRCREV = "af7fd38d5e80514406fb6a8bba2d407d252c30b9" +S = "${WORKDIR}/git" + +require ${BPN}-crates.inc + +do_install:append:class-native() { + create_wrapper ${D}/${bindir}/bindgen LIBCLANG_PATH="${STAGING_LIBDIR_NATIVE}" +} + +BBCLASSEXTEND = "native" From patchwork Thu Mar 27 13:55:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 60084 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D77B4C3600B for ; Thu, 27 Mar 2025 13:55:59 +0000 (UTC) Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.web11.50405.1743083751058324049 for ; Thu, 27 Mar 2025 06:55:51 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@qualcomm.com header.s=qcppdkim1 header.b=V0uAkwa+; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: oss.qualcomm.com, ip: 205.220.180.131, mailfrom: dmitry.baryshkov@oss.qualcomm.com) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 52R5jGq8022921 for ; Thu, 27 Mar 2025 13:55:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= R408BpbNP8yU6VNZxLumx3rlFUhr7aYowf+OKNehUzA=; b=V0uAkwa+xsOr0sGK lsx7cSfa8kgI+2CHYO2OhFfz4gv+SWsd+CRuOvMMTcn5ylyPNBuOuDmKfuVmQCTP CillsLj+D1+Zgt3FMwOvkwCKQEtz1Zt6Hjq1IIoKxo/59KYG702zO3V4A70sRzzD JSvopYIiODEtNNIrQBViFeueqVlybJ+cM2kAtaVI9fI5FZ/3tb88h2xlxz2/SG79 bJifoUfA9Cdn6G4UDVBfPhc3n3p1OZntMfb1I34WHUknYX/eiR71WB/K9Gmyklr5 PO0bHL/l8rcOh4NUAKP2aiYNJ+3kxE3p/PSZOsY+a1clslrykjHiPT4cxrhaFohh /yK9UQ== Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45mb9mvygc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 27 Mar 2025 13:55:50 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-4768488f4d7so15867531cf.0 for ; Thu, 27 Mar 2025 06:55:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743083734; x=1743688534; 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=R408BpbNP8yU6VNZxLumx3rlFUhr7aYowf+OKNehUzA=; b=a/xdHXaHEI6XKPYjyqYwJCv+O835PRNXl4h0fyYRX255pxYCK3sHL2D/qkL33zFwfY YdhbSH8LOJOMHKy5bdKNi/ppEnuH9M6RKDR+weIL92u+o+bV0O8esVpQK4vuJKN+2YQe KcnIYFMfhS9JmmkVpUKpWQIm6MopM7cmUF16oaLJlJ94f7PmGbU32iuS5tT7JMr8YCtI egU71NdGdzlw01XYQi9/50opeRWJ+t7yFTTbAM9DO/YaOzT/H7ewUoPQDs4JTAEcJTAv YCGVNqlw4rMkUuGwHJp0+xaZ7Qnl++6kCBwQaVhrz9vYHCtpAu345g9AW4GcRsT/O1Qt mgGg== X-Gm-Message-State: AOJu0Yy0WQ/tum97hk32nm4LjOVv6GTqQzMkkKPydamB7D5Ea0Z+My9Z 4CCzr/1zXo6sFdnKFnQyX259d+p7asF6qxZgn/JbYGj0AcU99pMrTPRKnSbK0b77/9iJOtyq4LB DWf5UpwV1leegEeGeupO/kiUohdE+ozhGKpKs1wrs2aSs9wfj2RNcGfPNNJyzl8y8EdLh9UF/Al x67ThYOufyq08= X-Gm-Gg: ASbGnctzrIf1TVxpcWY7ZepIz4wBxdlV455Bw4NXcqB2JstAybAgffl+TLudd2Ikx/i cM7D/OmXQrEzVOSIbLxGA2+btT8bfkWfukNqK0JkoyRApqO65CCAgLMa1DsvrgjsWDAQsHMor5a ZfGvRXdZWFpfiQ58w49LmOhx9kFFllTjLdJR1GEBfWAPxjBmf5OIDTDN0N5DpIvZzT7/OQ94ued 84evB+RkfNEdqsx7s6wwNTj/ZfEtT5Cxqh14IpalzKno2KGj1cygDr2mj6kL0PYFPfkGwSy8+i+ /q9c9skxXe7OCY7blugbqh8hIrjeubwE3XPEeGz/oJgrcgA/jc0yOhQQ9uSu02ULeU/Idxxemii OUc4+cM26Rtf6rDnknvzHaQ7mUSv4 X-Received: by 2002:a05:622a:480f:b0:475:287:12fb with SMTP id d75a77b69052e-4776e18e8ebmr63693761cf.36.1743083734146; Thu, 27 Mar 2025 06:55:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGJbgMdQG1PAsdlKCokpc/rF5hRctUAz2/go1gbJiICdtvDNiL6i47TyveNDtmNlVC1F9OjGw== X-Received: by 2002:a05:622a:480f:b0:475:287:12fb with SMTP id d75a77b69052e-4776e18e8ebmr63693251cf.36.1743083733617; Thu, 27 Mar 2025 06:55:33 -0700 (PDT) Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30d7d910e70sm24288271fa.105.2025.03.27.06.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Mar 2025 06:55:30 -0700 (PDT) From: Dmitry Baryshkov To: openembedded-core@lists.openembedded.org Cc: Khem Raj , =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55?= =?utf-8?b?aQ==?= Subject: [PATCH 8/8] mesa: add support for RustiCL under PACKAGECONFIG "opencl" Date: Thu, 27 Mar 2025 15:55:20 +0200 Message-Id: <20250327135520.3920189-9-dmitry.baryshkov@oss.qualcomm.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com> References: <20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com> MIME-Version: 1.0 X-Authority-Analysis: v=2.4 cv=cs+bk04i c=1 sm=1 tr=0 ts=67e558e6 cx=c_pps a=EVbN6Ke/fEF3bsl7X48z0g==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=Vs1iUdzkB0EA:10 a=ZpVaWaFtAAAA:8 a=pGLkceISAAAA:8 a=EUspDBNiAAAA:8 a=dgon86aGx0aU30rBFdEA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=a_PwQJl-kcHnX1M80qC6:22 a=5tn4MO8azEBWFjlAA-rn:22 X-Proofpoint-GUID: 5knx2XOVnFbOSHFnsqyQzpvM5PKE2eDt X-Proofpoint-ORIG-GUID: 5knx2XOVnFbOSHFnsqyQzpvM5PKE2eDt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-27_01,2025-03-26_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 priorityscore=1501 phishscore=0 suspectscore=0 mlxscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2503270096 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-0031df01.pphosted.com id 52R5jGq8022921 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 27 Mar 2025 13:55:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/213739 From: Zoltán Böszörményi Mesa now has two OpenCL implementations: Clover (older one) and RustiCL (newer one). Extend the "opencl" package config to include both implementations into the libopencl-mesa (-dev) packages. As the Clover implementation is in maintenance mode and is expected to be removed at Mesa 25.2, it doesn't make sense to split the packages or to provide two config options. Signed-off-by: Zoltán Böszörményi [DB: merged "rusticl" and "clover" back to "opencl", reworked rust inheritance] Signed-off-by: Dmitry Baryshkov --- ...son-use-target-path-for-Clang-libdir.patch | 18 +++++- ...cross-compilation-arguments-to-LLVM-.patch | 64 +++++++++++++++++++ meta/recipes-graphics/mesa/mesa.inc | 21 ++++-- 3 files changed, 96 insertions(+), 7 deletions(-) create mode 100644 meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch diff --git a/meta/recipes-graphics/mesa/files/0001-meson-use-target-path-for-Clang-libdir.patch b/meta/recipes-graphics/mesa/files/0001-meson-use-target-path-for-Clang-libdir.patch index ef7ae8942e33..e2f9562ea64e 100644 --- a/meta/recipes-graphics/mesa/files/0001-meson-use-target-path-for-Clang-libdir.patch +++ b/meta/recipes-graphics/mesa/files/0001-meson-use-target-path-for-Clang-libdir.patch @@ -1,4 +1,4 @@ -From ecea6fe0d250c3026c22a60ac5420528cc3632d8 Mon Sep 17 00:00:00 2001 +From 11b93f72936ce367306ae299549c39fc21ef21c3 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Wed, 26 Mar 2025 12:19:10 +0200 Subject: [PATCH] meson: use target path for Clang libdir @@ -10,9 +10,23 @@ options. Clang is known to use the same libdir in OE build environment. Upstream-Status: Inappropriate [OE-Specific] Signed-off-by: Dmitry Baryshkov --- + src/compiler/clc/meson.build | 2 +- src/gallium/frontends/clover/meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + 2 files changed, 2 insertions(+), 2 deletions(-) +diff --git a/src/compiler/clc/meson.build b/src/compiler/clc/meson.build +index 743cd236bb5c..af36dae3dde9 100644 +--- a/src/compiler/clc/meson.build ++++ b/src/compiler/clc/meson.build +@@ -8,7 +8,7 @@ files_libmesaclc = files( + ) + + _libmesaclc_c_args = [] +-_libmesaclc_cpp_args = ['-DLLVM_LIB_DIR="@0@"'.format(llvm_libdir)] ++_libmesaclc_cpp_args = ['-DLLVM_LIB_DIR="@0@"'.format(get_option('libdir'))] + _libmesaclc_sources = [] + + if not _shared_llvm diff --git a/src/gallium/frontends/clover/meson.build b/src/gallium/frontends/clover/meson.build index e569b86a1bea..2fc30ffe1ac2 100644 --- a/src/gallium/frontends/clover/meson.build diff --git a/meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch b/meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch new file mode 100644 index 000000000000..c9213fbe4eec --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch @@ -0,0 +1,64 @@ +From b9cf34f39ca7e7546508ce2ab1f053edef5fc201 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov +Date: Wed, 26 Mar 2025 17:47:09 +0200 +Subject: [PATCH] rusticl: provide cross-compilation arguments to LLVM bindgen + invocation + +Correctly generating LLVM bindings requires several croos-compilation +arguments. Provide them to rust.bindgen(). + +Upstream-Status: Inappropriate [OE-Specific] +Signed-off-by: Dmitry Baryshkov +--- + meson_options.txt | 14 ++++++++++++++ + src/gallium/frontends/rusticl/meson.build | 8 ++++++++ + 2 files changed, 22 insertions(+) + +diff --git a/meson_options.txt b/meson_options.txt +index 0147cafcb146..f73e83fded18 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -796,3 +796,17 @@ option( + value : false, + description : 'Install the drivers internal shader compilers (if needed for cross builds).' + ) ++ ++option( ++ 'bindgen-includedir', ++ type : 'string', ++ value : '', ++ description : 'system-wide include directory for cross-generating LLVM bindings' ++ ) ++ ++option( ++ 'bindgen-target', ++ type : 'string', ++ value : '', ++ description : 'Clang target for cross-generating LLVM bindings' ++ ) +diff --git a/src/gallium/frontends/rusticl/meson.build b/src/gallium/frontends/rusticl/meson.build +index a5d1dcf3abb9..480c220b7f5f 100644 +--- a/src/gallium/frontends/rusticl/meson.build ++++ b/src/gallium/frontends/rusticl/meson.build +@@ -180,13 +180,21 @@ rusticl_opencl_gen = static_library( + ], + ) + ++bindgen_c_args = [] ++bindgen_target = get_option('bindgen-target') ++if bindgen_target != '' ++ bindgen_c_args += [ '-target', bindgen_target ] ++endif ++ + rusticl_llvm_bindings_rs = rust.bindgen( + input : 'rusticl_llvm_bindings.hpp', + output : 'rusticl_llvm_bindings.rs', + c_args : [ + rusticl_bindgen_c_args, + pre_args, ++ bindgen_c_args, + ], ++ include_directories : get_option('bindgen-includedir'), + dependencies : [ + dep_clang, + dep_llvm, diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 9d71cd7917e2..105df1eaf347 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -18,6 +18,7 @@ SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \ file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ file://0001-freedreno-don-t-encode-build-path-into-binaries.patch\ file://0001-meson-use-target-path-for-Clang-libdir.patch \ + file://0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch \ " SRC_URI[sha256sum] = "adf904d083b308df95898600ffed435f4b5c600d95fb6ec6d4c45638627fdc97" @@ -46,7 +47,7 @@ PROVIDES = " \ virtual/mesa \ " -inherit meson pkgconfig python3native gettext features_check +inherit meson pkgconfig python3native gettext features_check rust BBCLASSEXTEND = "native nativesdk" @@ -85,6 +86,9 @@ PACKAGECONFIG = " \ ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'zink', '', d)} \ " +# skip all Rust dependencies if we are not building OpenCL" +INHIBIT_DEFAULT_RUST_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}" + PACKAGECONFIG:append:x86 = " libclc gallium-llvm" PACKAGECONFIG:append:x86-64 = " libclc gallium-llvm" PACKAGECONFIG:append:class-native = " libclc gallium-llvm r600" @@ -147,9 +151,16 @@ INSTALL_MESA_CLC:class-native = "true" MESA_NATIVE = "mesa-native" MESA_NATIVE:class-native = "" +BINDGEN_TARGET = "${TARGET_ARCH}-${TARGET_OS}${LIBCEXTENSION}${@['-gnu', ''][d.getVar('LIBCEXTENSION') != '']}" + # "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG! # Be sure to enable them both for the target and for the native build. -PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dmesa-clc=${MESA_CLC} -Dinstall-mesa-clc=${INSTALL_MESA_CLC},-Dgallium-opencl=disabled,${MESA_NATIVE}" +PACKAGECONFIG[opencl] = " \ + -Dgallium-opencl=icd -Dmesa-clc=${MESA_CLC} -Dinstall-mesa-clc=${INSTALL_MESA_CLC} \ + -Dgallium-rusticl=true -Dbindgen-includedir=${STAGING_INCDIR} -Dbindgen-target=${BINDGEN_TARGET},\ + -Dgallium-opencl=disabled -Dgallium-rusticl=false, \ + ${MESA_NATIVE} bindgen-cli-native \ +" PACKAGECONFIG[broadcom] = "" PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native" @@ -242,7 +253,7 @@ RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev" RDEPENDS:libgles2-mesa += "libgles3-mesa" ALLOW_EMPTY:libgles3-mesa = "1" -RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools', '', d)}" +RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools spirv-llvm-translator', '', d)}" PACKAGES =+ "libegl-mesa libegl-mesa-dev \ libosmesa libosmesa-dev \ @@ -348,7 +359,7 @@ FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*" FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*" FILES:libgl-mesa = "${libdir}/libGL.so.*" FILES:libglx-mesa = "${libdir}/libGLX*.so.*" -FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd" +FILES:libopencl-mesa = "${libdir}/lib*OpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/*.icd" FILES:libglapi = "${libdir}/libglapi.so.*" FILES:libosmesa = "${libdir}/libOSMesa.so.*" FILES:libxatracker = "${libdir}/libxatracker.so.*" @@ -362,7 +373,7 @@ FILES:libglapi-dev = "${libdir}/libglapi.*" FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc" FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc" FILES:libgles3-mesa-dev = "${includedir}/GLES3" -FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so" +FILES:libopencl-mesa-dev = "${libdir}/lib*OpenCL.so" FILES:libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc" FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \ ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \