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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EEAE5C6FD18 for ; Tue, 18 Apr 2023 15:07:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=s+onrjweSDF5eyTP+7cauWNJbcKdZSU06AedVm5d9vE=; b=Te2XBVDK+X7mTN rvg9OKgG/e9ho9Lkby/61Aff8HD9fLNhfpZZgx6FO/q1N3lEmHGlB/HAEY4pBO0LHpuJkXJPEU7Gk 9Je0K0DoOBVpUk0NnYLKjnTRcV3c5oHWUe5U5+siZQJVb/nsyhLNfgdnl+CbKSsFlIb9KDxGTPvMY LUTpmwbXyICioq76rVk7CYh5ljdxI3b9vuCEuFB8UIjk22iKHCyyTBWDHANPyk8JmYBpqmbbPlpjQ dmwACD6EdFiMQaUy7vEsrOs5IijMxTV8nOJgFKHwlr9JZqo8C6eRVfH7CeTSiv4Cym5mkQiMhgFnY wPVzRaXGyL9tqtnJ1FxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pomv6-002Wze-39; Tue, 18 Apr 2023 15:07:01 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pomv3-002Wya-16 for linux-arm-kernel@lists.infradead.org; Tue, 18 Apr 2023 15:06:59 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E263D168F; Tue, 18 Apr 2023 08:07:35 -0700 (PDT) Received: from capper-ampere.manchester.arm.com (capper-ampere.manchester.arm.com [10.32.100.23]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 015C53F5A1; Tue, 18 Apr 2023 08:06:50 -0700 (PDT) From: Jamie Cunliffe To: miguel.ojeda.sandonis@gmail.com Cc: Jamie.Cunliffe@arm.com, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, ojeda@kernel.org, rust-for-linux@vger.kernel.org, steve.capper@arm.com, will@kernel.org Subject: Re: [PATCH 1/3] arm64: rust: Enable Rust support for AArch64 Date: Tue, 18 Apr 2023 16:06:16 +0100 Message-Id: <20230418150616.2247298-1-Jamie.Cunliffe@arm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230418_080657_450257_5AE86499 X-CRM114-Status: GOOD ( 25.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jan 31, 2023 at 5:19 PM Will Deacon wrote: > On Thu, Jan 26, 2023 at 06:56:01PM +0100, Miguel Ojeda wrote: > > On Thu, Jan 26, 2023 at 5:35 PM Will Deacon wrote: > > > > > > Why do we need to specify this stuff here? LLVM already knows about AArch64 > > > and can compute the data-layout string in computeDataLayout(). Can we have > > > the tools figure this out for us instead, please? > > > > I agree -- the reason we have this for the moment is to provide full > > control of the target spec, in particular for cases where `rustc` may > > not provide enough flags to customize exiting builtin target specs > > and/or may emit warnings for unknown target features etc. > > > > If it is already enough for arm64 to use e.g. the > > `aarch64-unknown-none` target spec plus flags on top, then we should > > go for that, because that is the end goal: these target spec files are > > unstable in the Rust compiler (and not intended to become stable). > > Please confirm that this is the case, but I really think we should be > aiming for that rather than starting off my specifying this stuff manually. The json that we generate looks to be almost equivalent (that's why patch 3 exists, to answer your question on that patch). The only difference is the `aarch64-unknown-none` rustc target sets the LLVM target to also be `aarch64-unknown-none`, whereas the current target.json uses the `aarch64-linux-gnu` LLVM target as does Makefile.clang for C code. As you have been talking about the unknown-none target throughout this thread, I just wanted to double check that's your intention? Happy to switch over to using the rustc definition though. I just did it this way to keep it consistent with the other architectures and not add any more complexity into the build. On a quick test it does seem to be OK, but I'll prepare a patch and do some proper testing that it's actually fine to use the rustc definition though. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel