Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp586284pxb; Mon, 25 Apr 2022 17:22:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzitwOMRf5xSl3c7qQgtfFsyN6Tc+wcczgVswISmHgWoSA/dGcDlU9jKcVmvq0+ZrZ1Z/58 X-Received: by 2002:a17:902:be18:b0:153:2444:9c1a with SMTP id r24-20020a170902be1800b0015324449c1amr20991425pls.152.1650932533827; Mon, 25 Apr 2022 17:22:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650932533; cv=none; d=google.com; s=arc-20160816; b=MC/JDkGftQTNUeIYu5aOkxKYoWTliaU5ZjSaAsMbhSqEEriYS3kI0jaAoVk8mr/Cpg tic6uURmKjDIvDhEYtW5hF7hmM/e5ecfccKsmJZPdqsmFFtSqwp7IVVhuyPu/+Jk90FG nuY5I6UEaBi9kkX4BpuIZC6NTcjEeUgwBV6IFSmSX45Is29z5ih/SEnJN8TtiW7dGsP8 aoCN3GspHFcIxIDaqs1b+WHQcZpf/2hR9XvVibvzYbDTyj+gQgmXhW0Oin/qAvhbgF7d Kg1w4WqgE5M1jvSbg77eyBRYH/m+9SWbMvNsgdyXMh4H6z7QKVbLAJbfqNc8ONdiMXsC HkGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=4LfVdulB76lLtMX091N5AWGb0dBTI5luzoFhN+PB0ts=; b=qmlR3VNTRiGNRPMbFlFECcJuw0BBqtrFu0GoDvI+7aQ3mFy9Lt/zdHZ9K9rGJfxIuv DH/fLLZ0z8lpsjoJ7G3AtM+p7IXwIfhZabTO0jDTuLUZq4Pzu6uIrwaE9uLkoPqmD0nb 2qOpNYoEn1bNM2uBLWBPQmS/A7DClDwv26i2QDZBsoT1wK5BSGIpQqN3teM2B5Cr5Dzm yHYxbR0iwjYo1TaNzPMgRjT5mEh51zKrYgVDelRdeuAc9hDodkSgM3UKstC53ekcrEd5 31ZD/mDAv6GU80b8Rqi5blYXlWbatR+VcQWzuOXzmSxn5VHWq73RGH7YNPoKb0H9qUTp 6qRA== 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 o3-20020a170902d4c300b0015874d582f1si2243741plg.326.2022.04.25.17.21.57; Mon, 25 Apr 2022 17:22:13 -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 S235554AbiDYIuL convert rfc822-to-8bit (ORCPT + 99 others); Mon, 25 Apr 2022 04:50:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229717AbiDYIuI (ORCPT ); Mon, 25 Apr 2022 04:50:08 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8AD8FD01 for ; Mon, 25 Apr 2022 01:47:03 -0700 (PDT) Received: from mail-wr1-f53.google.com ([209.85.221.53]) by mrelayeu.kundenserver.de (mreue012 [213.165.67.97]) with ESMTPSA (Nemesis) id 1N45th-1ns1F10VMH-0103T5 for ; Mon, 25 Apr 2022 10:47:02 +0200 Received: by mail-wr1-f53.google.com with SMTP id x18so19813877wrc.0 for ; Mon, 25 Apr 2022 01:47:02 -0700 (PDT) X-Gm-Message-State: AOAM531EPNo/wRYjcYcH4DaLfChOHkzLtlsOHLojhY5CNRqAL8hMOZ8D +aQetBk01phSR+RL6W9r8SKEPQNH8sfljoaaees= X-Received: by 2002:a5d:6da5:0:b0:20a:8805:6988 with SMTP id u5-20020a5d6da5000000b0020a88056988mr12725077wrs.317.1650876421763; Mon, 25 Apr 2022 01:47:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Arnd Bergmann Date: Mon, 25 Apr 2022 10:46:45 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: odd endianness toolchains for crosstool To: "Jason A. Donenfeld" Cc: Arnd Bergmann , Linux Kernel Mailing List , Nick Desaulniers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Provags-ID: V03:K1:ydqJJOb4VjUv1w7q9Z/2VUmNq/v+w0zr880hKvg6q4LL3QTnqZP IEElHVVivHHlbbVgrGWZjMYFT29dnU6eEl2X+Szsn6cXtiRkMK9brU1CTuslvEzIlWXdKlc yKQ8I8TijJmaP4NYio0Ok5cfq523KDdIUqC1JOE9xVXmw/Q2Mwqou8ThdpW/m0khRLGywz5 6xxFacfXMDOC6+QOtAeWQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:QDhG2jecTcs=:ZJL+ENtu8xENYjVeGpRDi7 eUSWlar7ZcCt2u5JTv8PFMLwVmOtuKHGf7iXlAgkZDNjzsZDWOboj7IL+M2no2Dsk0yVKKB6t ZA84VDvHK1hSsz7ZDKUpVjIjer7jr3nW+EB46VuWxdXQxXDB/HCstq7+UQnUSABnH5PSMv75u Hd+0bZQG8uMnWOt6aQUTLyrj0OQtDcUp07aRwNaSyA5mZGh+fv3qjOWlAkju6C7/f097TWbxa l6KjekOD+E+qIfTmrMqW+T4TEiayThhpsOlNhIq/mf1K0ZNcGGdMCZtnKnxMxfVbwa5azSHmr l3p91EJBeUwHzBu9ouGeaSZDmNZHOQOz/5NCv5YxgQOkBxkiuODGXHMp4tXxnT0Pq8894+UV8 5hrPPr8EqxQvXzyVwyzEBwGqUF9vUUkENf2TGm77vwdaVWUtjFOcfBvaWOOg7/lkhfSOwlXoK ALgXgsDk6DBZUMAcdJL2gmWHVOdDdAa2w5oPxHRpTyGeuEVwNC5Vhr9rZZTYDQss21qtZ+GwO ggPHFj3eIucu5464ltXYlpKUeJ0tWYbEh7j7B2dzDtWPy7fVWBiFi6BO6HFU7E+NjU+3oUe/Q gFDzhojUajWRg9QsXsKRRyHKuHcREsuJHcKBPlP1ydsGTKUdR2jY8vW34wgQ0d+M8xiLlha3v 1FmsOMmC3oTt+4THeGgGhPXzE/W91QdS17hIMe9xCaQKJpEpifXmpwsx0FajCxHiQeTklnYUa lwxFA1/DGUbt7ycu0HCtudEfSTt2eXs2sCsWeg== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE 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 Mon, Apr 25, 2022 at 3:39 AM Jason A. Donenfeld wrote: > > Hey Arnd, > > I'm again experimenting with switching to your crosstool toolchains for > WireGuard's CI. I've hit a few snags in the process: > > - For powerpc, gcc needs to be built with `--enable-secureplt > --with-long-double-64` in order for musl to run. > - Need powerpc64le compiler (-mabi=elfv2). > - Need mipsel compiler. > - Need aarch64_be compiler. > - Need armeb compiler. > - Need mips64el compiler. > > While the existing compilers can all produce code for the wrong endian, > they hit trouble when trying to link against libgcc. So generally a > separate full toolchain is supplied for the less common endians. Hi Jason, I'm definitely interested in improving the user space testing, and I agree we need the powerpc64le and mipsel targets at the minimum for that. The situation on my end is that I'm planning to migrate my main workstation (which I'm building the compilers on) to an arm64 machine soon, and will then need to set it all up again. I don't really want to change much before then to avoid changing things twice. I've added Nick to Cc, as he's experimenting with a clang based toolchain that we can put on kernel.org along with the gcc toolchains, and that would probably include a musl based sysroot roughly the same set of architectures that you are testing on already. Possibly we could reuse the same user space between clang and gcc. > I have had success with arm, arm64, mips, x86_64, i386, m68k. If you're > up for adding the above compilers to the collection, I'd be able to > complete the transition, and then look into adding a few more > architectures. I've also looked at other projects that do qemu based testing, everyone seems to be missing one or two architectures out of a common set, https://tinyurl.com/linux-architectures is where I keep my data. The most common subset of architectures that get tested as far as I can tell is x86, arm64, powerpc, arm, riscv, mips, s390: those are the ones that support all the important pieces (gcc, clang, musl, glibc, qemu, debian and buildroot) and that have the most users. The exceptions to this are I think: * your wireguard tests are missing riscv and s390 tests, those should be easy to add. You do support m68k, which the others are missing * kunit is missing mips tests, but has alpha and sparc * tuxrun[1] adds sparc64, sh4 and armv5 (softfp), could add rv32 * Günter's linux-build-test[2] has all the above, plus microblaze, nios2, parisc, shbe, and xtensa What I'd really like to see is to have the necessary information for building and running the most common subset of these in one place in the kernel tree where at least wireguard, kunit and tuxrun can share the setup for qemu. One idea I had was to encode the platform specific qemu command line options using Kconfig dependencies in a way that "make O=obj ARCH=foo defconfig zImage; obj/run-qemu" results in a booting kernel on a lot of the typical defconfigs for supported architectures. Arnd [1] https://gitlab.com/Linaro/tuxrun/-/blob/master/tuxrun/devices/qemu.py [2] https://github.com/groeck/linux-build-test/tree/master/rootfs