Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp447648rdb; Thu, 18 Jan 2024 08:10:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvvtnJTR5kkXDQZfHOSmr13TmjQlZRI3FGZESrsWNvPaqo66GvIJ8WN/eZenjaFIfNnONz X-Received: by 2002:a4a:a707:0:b0:599:4be8:3994 with SMTP id g7-20020a4aa707000000b005994be83994mr345390oom.7.1705594231663; Thu, 18 Jan 2024 08:10:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705594231; cv=pass; d=google.com; s=arc-20160816; b=lJJ0bntXvhFAIwvdkkd0HS8vVsyyjbnvyvvhGbi7+/YPt2dkuh38WzZOlGuaXSNLMJ mNW4q13NdSH3EyABdI/kZFAmLen0ekmUowIsLIjEMfSJRPNFg5rICWQH04Cb0oZa/bYa +iGHYnzZh+Ma7m24uzlricRSsZ0fAPPVmS5jlFrLdH7heH1qyDVvRNj+QSH+f+dpj06O OJPe4gBXN/BnSx4jBix5AowsPR7O1sVxPE1Epx3TV/QbANMivOdxqSSS6081WUCDIJY0 3b7YxMwiykp9lr03fyt8DRjIei2Q6AzbpbwF6gY15T0+4tAxkD2HxgTUi2nwTuCFvGBO 9HRA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=sat5XVJBaEElPICy/YsSs9yFT4hHkFR3P2GPDCmg8WA=; fh=qc/enxjEOfmHoGdnGlKbsIZqti3IOp5++cVn6VMhXX0=; b=pX2nNl+zZVT9Otsp9sAIh2cQ5a7t9FNVMka3RzH3wzS+Mriw8d9otMZ5MuUmLhwF0a NJSjKNfP9WrW2FjzaXFzNJ8XMdAcjWe3iRZmcOqZ3M9Ei+dgrhb3xKnnmVyqVjkAqMjX 9Lq/ZiKy8IJLceDzAjyB0Uaw3FLos4hANu9gNXbtnFRzqatWW0LltLJOu3uINJ6CWZkf aatevQPh+P/mB4+LOpK+DUwWyjuf3bUC4+3n5JZoB0a0qj8eUtYC42oownJ9tZKL7GAs 2Drzob78ImhBUWnuCYYRtvaTri19/9/nrUiDUXXFzxZNp+Gx3YaFhKGxoyn8cpesBNUh rklQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nmNLol1R; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-30334-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30334-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g21-20020ab072d5000000b007d2b12dfb58si373150uap.142.2024.01.18.08.10.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 08:10:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30334-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nmNLol1R; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-30334-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30334-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6B7AF1C2349C for ; Thu, 18 Jan 2024 16:10:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2F982C1A3; Thu, 18 Jan 2024 16:09:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nmNLol1R" Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AF632C18D; Thu, 18 Jan 2024 16:09:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705594194; cv=none; b=idD7omE58vf/SwKGKveQMQvnhLc2QHv5yMz5y5KJ2PfXKgLghrYFvtpx8SeB6f0RlQWWPDkG99GMD+AnloU9MnBPqY4m2K85fskjQ5ZAEC14z7NjQlAssBf+m90nTchHEXfEiPaWOAF+8C6Y/8fFkwrRfC+2xyd5JhOa6+8YKck= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705594194; c=relaxed/simple; bh=sat5XVJBaEElPICy/YsSs9yFT4hHkFR3P2GPDCmg8WA=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:MIME-Version: References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc: Content-Type:Content-Transfer-Encoding; b=Yq7ML1POWOiC8wJKYDSkF7UsCLLEPJ8WRMIvnZfJjHqGFc9qVjxzoOB/UV2zpMFUtp+zIJM0kTTye/R/PYFFzmStFZmk+yuDQbW+83aGxerWL6rPRojraNYoLdYbgLEWfOSms8FHpDN3aE3bsaBi0u+bM1FgF+o2m/A/HigPlCs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nmNLol1R; arc=none smtp.client-ip=209.85.210.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ot1-f50.google.com with SMTP id 46e09a7af769-6dc36e501e1so8956259a34.1; Thu, 18 Jan 2024 08:09:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705594192; x=1706198992; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=sat5XVJBaEElPICy/YsSs9yFT4hHkFR3P2GPDCmg8WA=; b=nmNLol1RMxQK9iu5sy4g7PWZVTWXUNfv2wQZq04p/uzW+0u3Vc8Jl57wa2bM57oLMP mOxk7u+kCEezhmaKLGfe6+dpE8ptM/m4OUbbhK+Rg1K4xaj9R1dLtkeLeulKZsLzfKX2 ZpgwQUl5NyBajcX1SsoKGLzlkz7hP5FDBcwkoZqJZhcoWQlLZKu581jzv6xVdzwmxBUi kdbwQSweWbt47SYdZYmJGkiL+hCQlyovRYorZ60iOMHXAVENyLU1pWeEqLafHaSllBCC i2KsObBw+C76IOnwOdNzxuN3M2nUBnFT0mU/Nq9w9lNjx7dS/d6Vw9toe9X2TekfyBsZ C5GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705594192; x=1706198992; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sat5XVJBaEElPICy/YsSs9yFT4hHkFR3P2GPDCmg8WA=; b=kwM7UxB54QU+j1BZG+qKUjrh+iZhtxNZkYkYvqs3LLrJ61dZS70lczQoHQiSdlfQc+ 43n6OMx9WDordfLDevraY7kDsLWvuQblEzRuB5wuj46VUVpkoxo6+L7Xj2y+3sY3wbVd qZeAb6jWAhwISy5SkbFt4x7+helPlrDTjYFOGho0veuGohxqOFDyDxt8zyGMJx1rCHrH XqcUGSxmBEOGmR07g2Gw2gIkAu9rKz+YiZWYM04SA+IbNfZzfV9XoTFq6gnGN0aBn+Ms YwIZegSgnMmoJKMP+HIiDDP8kXKrcBnZrCsLsnS5viE7kFiz50QWx83yYlWqTmkKpDQQ xF1A== X-Gm-Message-State: AOJu0Yy/DQ4Rzf1qzTReXD4W+DFpC00WRLbvEqwPh3cptcm0CEBkjX6H R5Bke7y68lMEE0kmXVknAB0OyZRhu+9wzI7RZTgJFHawAvsH32XDIzfumGlo3Wfxjhl3R3lVl8/ cIi/9jgSIaoIgtCLZi9m6A9BNxbg= X-Received: by 2002:a05:6830:1e38:b0:6dd:eb6c:8c7 with SMTP id t24-20020a0568301e3800b006ddeb6c08c7mr1066678otr.40.1705594192185; Thu, 18 Jan 2024 08:09:52 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20230307102441.94417-1-conor.dooley@microchip.com> <20230608-dispatch-sneer-aa09bd7b2eb8@wendy> <20230608-spiritism-gonad-5f5aff4c3a24@wendy> <20240117-swiftly-parasail-618d62972d6e@spud> <20240118-implode-delirium-eefdd86e170e@spud> In-Reply-To: <20240118-implode-delirium-eefdd86e170e@spud> From: Miguel Ojeda Date: Thu, 18 Jan 2024 17:09:40 +0100 Message-ID: Subject: Re: [PATCH v1 0/2] RISC-V: enable rust To: Conor Dooley Cc: Conor Dooley , linux-riscv@lists.infradead.org, Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Nathan Chancellor , Nick Desaulniers , Tom Rix , rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jan 18, 2024 at 4:49=E2=80=AFPM Conor Dooley wro= te: > > The bit that worries me most is bindgen, and in particular detecting the > version of libclang used. I mentioned to Nathan or Nick about needing a > buildtime test for the version of LIBCLANG being used. > I'm less worried about this for LLVM=3D1 builds, since while I think it i= s > possible to provide a LIBCLANG path to the build system, I suspect that > for LLVM=3D1 builds it's almost always going to match the LLVM toolchain > in use. `scripts/rust_is_available.sh` tests whether `libclang` is at least the minimum LLVM supported version; and under `LLVM=3D1` builds, it also tests whether the `bindgen` found one matches the C compiler. Do you mean something like that? For `bindgen` under GCC builds, we will eventually want a "proper" way to use GCC instead (or possibly other approaches like querying the information): https://github.com/rust-lang/rust-bindgen/issues/1949. Recently, there has been a thread in our Zulip and a couple people are experimenting: https://rust-for-linux.zulipchat.com/#narrow/stream/288089-G= eneral/topic/Bindgen.20--.20GCC.20backend.20port > I'll do another rebase and resend after the merge window closes I > suppose :) Thanks! Cheers, Miguel