From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06CCCC433FE for ; Sat, 12 Feb 2022 18:57:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230346AbiBLS5T (ORCPT ); Sat, 12 Feb 2022 13:57:19 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230023AbiBLS5T (ORCPT ); Sat, 12 Feb 2022 13:57:19 -0500 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24F0F6007A; Sat, 12 Feb 2022 10:57:15 -0800 (PST) Received: by mail-io1-xd30.google.com with SMTP id y84so15462593iof.0; Sat, 12 Feb 2022 10:57:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PW5bHK7lbz8mAfQVLbpabS9JQmvxuuP5i13vS9JUmWQ=; b=n5D8bwCKZRUGpl68+OwDfJK+AQroTXijhLf+Ev2Dbodadyb6WRz6/fX9TzoLv5JY44 vKXzGhsqvNG0b1NNUEa1R2yJntFRgZVvW8w2wrpRBfSWda7h6ZxvPtJrBrf7yYHVOrwG vAfadKq2gwnHNR05HepbxldrYBHyblxQyutjIhO/hkKuz8jVpizo184RCyuaFwUdEEMB gDMdiJYy6LOQ+V5N1zvv/KQitEvAl4D/B6TT8xoaot76ok9JaRjP2+PcQoyjgjVx3f6a lXTyQk2kypAbwHMmpvW3hdXfwbXpl8GXVhdG++7HxqqIr3Iu7+Tp6uJUOhRFTYsDQXUJ gPwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PW5bHK7lbz8mAfQVLbpabS9JQmvxuuP5i13vS9JUmWQ=; b=ifwJDKTuDW61XfQ4Zj/fUYTgvSwgDFYp8LdRjp2HkMr3YKISmpmqUKnqnpTpMLuCez tn/11jwSk/upfauLB53HtS3WH870IeH8KVRk5yu67uOhcS8zjUDKOQcfWGJhdzNH0MU2 cdT+x5HT4NGKxfS1s+TxhzYd44CLBKgouq7dzAfpRRUCwPo7JKtb7KcA5xB1yU7kd2nd XUnrvSHQTkELu3eNtR6WOgcYL12l0lOH8QcIMqcG00kgIc/xiJoJI8ubavwcHAskPZnr uIvyo2tPxl2OLASHokVSkunCpn5kYKBmGV3mEa9ZU4eonY5SoYS1S2Or4binrNCkmLQe uz9g== X-Gm-Message-State: AOAM531monzUkjtiQqsqJkSuJyqkLrXAuPqQ10lUtj5riqQXkBiUBOEv ro0b/Bntkhj+jrPh8G9xM0yDOkBYIB5p/jhsb0g= X-Google-Smtp-Source: ABdhPJzk7Y0eW6BAf4q+QY2CyD1I+LhA8kHRLDkHhRJc6kXcI3wPehj/4lCy3W2LRh5ctFx5JYUIvMk52bxjHJ2CH2Q= X-Received: by 2002:a5d:941a:: with SMTP id v26mr3564701ion.64.1644692234068; Sat, 12 Feb 2022 10:57:14 -0800 (PST) MIME-Version: 1.0 References: <20220212130410.6901-17-ojeda@kernel.org> <0396e38b-f681-a035-b6ea-21127fdf5615@physik.fu-berlin.de> In-Reply-To: <0396e38b-f681-a035-b6ea-21127fdf5615@physik.fu-berlin.de> From: Miguel Ojeda Date: Sat, 12 Feb 2022 19:57:02 +0100 Message-ID: Subject: Re: [PATCH v4 16/20] Kbuild: add Rust support To: John Paul Adrian Glaubitz Cc: Miguel Ojeda , Alex Gaynor , Antonio Terceiro , Albert Ou , Adam Bratschi-Kaye , Benjamin Herrenschmidt , Boris-Chengbiao Zhou , Boqun Feng , Borislav Petkov , Catalin Marinas , Douglas Su , Dave Hansen , Dariusz Sosnowski , Daniel Xu , Gary Guo , Greg KH , "H. Peter Anvin" , Linux ARM , Linux Kbuild mailing list , linux-kernel , linux-riscv , Russell King - ARM Linux admin , linuxppc-dev , =?UTF-8?B?TWlndWVsIENhw7Fv?= , Masahiro Yamada , Finn Behrens , Michal Marek , Ingo Molnar , Michael Ellerman , Nick Desaulniers , Palmer Dabbelt , Paul Walmsley , Paul Mackerras , rust-for-linux , Thomas Gleixner , Sven Van Asbroeck , Linus Torvalds , Wedson Almeida Filho , Will Deacon , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: rust-for-linux@vger.kernel.org Hi John Paul, On Sat, Feb 12, 2022 at 7:27 PM John Paul Adrian Glaubitz wrote: > > Is there any particular reason why this list excludes MIPS*, i386, big-endian > PowerPC and SPARC targets which are already supported by the Rust programming > language? The variations we have so far were intended to showcase the Rust support in several major architectures, rather than cover everything. But as long as LLVM (& the kernel, i.e. ClangBuiltLinux) supports the target (and as long there are no compiler/toolchain issues), you should be able to try it. > Are the arch/$ARCH/rust/target.json files everything that's needed for supporting > the other targets? Mostly -- there is also `rust/kernel/c_types.rs` and you may need to tweak `rust/compiler_builtins.rs`, but not much more. Note that for the target spec files, the short-term plan is to generate dynamically the target spec file according to what the architecture requests, instead of using these static files. Longer term, we need a Rust-stable way to setup custom targets from upstream `rustc` (though it is not clear yet how it will look, e.g. it could be via command-line flags). Cheers, Miguel