Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4903616rwb; Wed, 17 Aug 2022 07:55:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR4yQe0Dslsx7AjdS6ts3lOtC++ZCmnqmkyaVwyfNmo4bH7LNLdltik8adeJJBMUJvYXBQYL X-Received: by 2002:a17:907:9625:b0:730:ad62:9c86 with SMTP id gb37-20020a170907962500b00730ad629c86mr16907293ejc.281.1660748130795; Wed, 17 Aug 2022 07:55:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660748130; cv=none; d=google.com; s=arc-20160816; b=0s/MUJKTDiK4Db/tvb/v+HM3G6EUG3VSLauK4s5yOAzzJFihPGzkRgnf2YdpeJ/SCH W42vzHxACUMHWvKZhQ7a8Q6e0c4uxDnRdXryPzRB5ABtjDJ2n2MTpGFxEDIkWw8DKSUK 8lBEoL7q80yaqE8e07KA5PvMkyvzFO++9IBL5zJbKsc8S9SKl0UQavY2ask7eI32+/n4 gG8CwaagBMqnR3QgrfdwKlhszgLaBaDTMRCBEVWAmy6yoHqmUU9YVcHTOX+nopD0uTtg AmaxtoQlcgzqmE09+Q8sy3I+MCzoMSrLYI7jjJcFf3f9t70NQsU5PtAm7778Szck4HIf 3fYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=yfd/lytFiprAz1DxkLmdu3pj+a7GZORPp0bIxRPJIlw=; b=blC1xm2SwXDgXfHcaflmChHyDZsdZtwchlmAcyRvzHnd1kqpcfN5vmMvX7D8qXlcbT 2OkH46BEQtV3Ge8H4UIznqGMNEMHW1yBl7oxmH+r91pJ9xz9cZ5VgiZ4pV+IBJS1GYCF ygMLfibE0aE7TofXrE8xQ61OkD/YI/zumgUM3cKgMMkBRzsmL0OEikfZ0tAPDHvus+DV WWiZU6ysLrkkcvmVsHapAE6xuf9kLvBhCyeNdT2i+Dr88Gk6wcs+TWR2qUi6J5tkftxz CBQCmdFYfYMpsjBosT62nwpC0+3exozjQGRAmT4vmAjzMXc7iON2K5n4ZhRmBqILiPj6 BUbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc23-20020a1709071c1700b0073133773ecasi15277363ejc.297.2022.08.17.07.55.00; Wed, 17 Aug 2022 07:55:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240253AbiHQOlD (ORCPT + 99 others); Wed, 17 Aug 2022 10:41:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240486AbiHQOkj (ORCPT ); Wed, 17 Aug 2022 10:40:39 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2D085FF68; Wed, 17 Aug 2022 07:40:15 -0700 (PDT) Received: from mail-ej1-f47.google.com ([209.85.218.47]) by mrelayeu.kundenserver.de (mreue012 [213.165.67.97]) with ESMTPSA (Nemesis) id 1N14xe-1nMpbb34jC-012VSC; Wed, 17 Aug 2022 16:40:13 +0200 Received: by mail-ej1-f47.google.com with SMTP id j8so24887380ejx.9; Wed, 17 Aug 2022 07:40:13 -0700 (PDT) X-Gm-Message-State: ACgBeo2gepU2aWElGKEdBcM0SZdXdmyYsWY+oqu1nmrwoclIrH8jdyL/ Uz8GkDdQaBuYHR87akMjfPLkwQmwsn2edCKzvAI= X-Received: by 2002:a17:907:6da8:b0:730:8ed5:2df8 with SMTP id sb40-20020a1709076da800b007308ed52df8mr16850681ejc.75.1660747213344; Wed, 17 Aug 2022 07:40:13 -0700 (PDT) MIME-Version: 1.0 References: <20220802015052.10452-1-ojeda@kernel.org> <20220802015052.10452-28-ojeda@kernel.org> In-Reply-To: <20220802015052.10452-28-ojeda@kernel.org> From: Arnd Bergmann Date: Wed, 17 Aug 2022 16:39:57 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 27/31] Kbuild: add Rust support To: Miguel Ojeda Cc: Linus Torvalds , Greg Kroah-Hartman , Sven Van Asbroeck , Catalin Marinas , Dave Hansen , Miguel Cano , Paul Mackerras , Gary Guo , Douglas Su , Borislav Petkov , linux-riscv@lists.infradead.org, Will Deacon , Martin Rodriguez Reboredo , Anton Ivanov , "H. Peter Anvin" , Masahiro Yamada , x86@kernel.org, Russell King , Ingo Molnar , Wedson Almeida Filho , Alex Gaynor , Antonio Terceiro , Adam Bratschi-Kaye , Albert Ou , rust-for-linux@vger.kernel.org, linux-kbuild@vger.kernel.org, Boqun Feng , linux-um@lists.infradead.org, =?UTF-8?Q?Bj=C3=83B_6rn_Roy_Baron?= , Michal Marek , Daniel Xu , David Gow , Paul Walmsley , Dariusz Sosnowski , linux-arm-kernel@lists.infradead.org, Tiago Lam , Thomas Gleixner , Nick Desaulniers , linux-kernel@vger.kernel.org, Boris-Chengbiao Zhou , Jarkko Sakkinen , Palmer Dabbelt , Richard Weinberger , Finn Behrens , Johannes Berg , linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:tVzw5+z9RodDD21jtXQCFgO607eyohyIMOrWmsXL/aDjp4s+CRv l24azQbCM+GbjsQ0bt0M1q2TGktvETxpOKTJX8zIhUKMgmX6VjnNNvSMA+hLMZy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score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 2, 2022 at 3:50 AM Miguel Ojeda wrote: > > +# These flags apply to all Rust code in the tree, including the kernel and > +# host programs. > +export rust_common_flags := --edition=2021 \ > + -Zbinary_dep_depinfo=y \ > + -Dunsafe_op_in_unsafe_fn -Drust_2018_idioms \ > + -Dunreachable_pub -Dnon_ascii_idents \ > + -Wmissing_docs \ > + -Drustdoc::missing_crate_level_docs \ > + -Dclippy::correctness -Dclippy::style \ > + -Dclippy::suspicious -Dclippy::complexity \ > + -Dclippy::perf \ > + -Dclippy::let_unit_value -Dclippy::mut_mut \ > + -Dclippy::needless_bitwise_bool \ > + -Dclippy::needless_continue \ > + -Wclippy::dbg_macro Hi Miguel, I tried enabling rust support in the gcc builds I provide at https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/arm64/12.1.0/ to make this more accessible, but it appears that the command line options here are not portable: /home/arnd/cross/x86_64/gcc-12.1.0+rust-nolibc/x86_64-linux/bin/x86_64-linux-gccrs --edition=2021 -Zbinary_dep_depinfo=y -Dunsafe_op_in_unsafe_fn -Drust_2018_idioms -Dunreachable_pub -Dnon_ascii_idents -Wmissing_docs -Drustdoc::missing_crate_level_docs -Dclippy::correctness -Dclippy::style -Dclippy::suspicious -Dclippy::complexity -Dclippy::perf -Dclippy::let_unit_value -Dclippy::mut_mut -Dclippy::needless_bitwise_bool -Dclippy::needless_continue -Wclippy::dbg_macro -O -Cstrip=debuginfo -Zallow-features= --emit=dep-info,link --out-dir=scripts/ /git/arm-soc/scripts/generate_rust_target.rs; mv scripts/generate_rust_target.d scripts/.generate_rust_target.d; sed -i '/^#/d' scripts/.generate_rust_target.d x86_64-linux-gccrs: error: unrecognized command-line option '--edition=2021'; did you mean '-frust-edition=2021'? x86_64-linux-gccrs: error: unrecognized command-line option '-Zbinary_dep_depinfo=y' x86_64-linux-gccrs: error: unrecognized command-line option '-Wmissing_docs'; did you mean '-Wmissing-braces'? x86_64-linux-gccrs: error: unrecognized command-line option '-Wclippy::dbg_macro' x86_64-linux-gccrs: error: unrecognized command-line option '-Cstrip=debuginfo' x86_64-linux-gccrs: error: unrecognized command-line option '-Zallow-features=' x86_64-linux-gccrs: error: unrecognized command-line option '--emit=dep-info,link' x86_64-linux-gccrs: error: unrecognized command-line option '--out-dir=scripts/' make[3]: *** [/git/arm-soc/scripts/Makefile.host:157: scripts/generate_rust_target] Error 1 I guess nobody has tried this so far. Would you think that fixing this is only a matter for fixing the build system to pass the correct flags depending on the compiler, or is this broken in a more fundamental way? Arnd