Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3376643ioa; Tue, 26 Apr 2022 02:18:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze+J9/Es+3c0rph+O9HrB6ze/Buf05wZgssZsvXj0YIw8kuAXsJSFNWYuBYt4XvF+UXNza X-Received: by 2002:a05:6402:1d51:b0:41f:cf6c:35a5 with SMTP id dz17-20020a0564021d5100b0041fcf6c35a5mr23615128edb.25.1650964709049; Tue, 26 Apr 2022 02:18:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650964709; cv=none; d=google.com; s=arc-20160816; b=cPo4Tr8aH4e2pL1zSuZzYS55goZEdTzN2N7gDiTP7dk+i9zetOjABFkz9Wc8rAMoSh 2isre/Fnwzy1Y98jfu+/QQBk6qFLfqAE80lOSS7SsOU96Rv38c1UhQocQ5WHEJDbzHW/ dA6nIVzpB+QlC2e0CVX7TgxfQYobD2W+RPkR1IizFyWI2eqCDoLx3leHorFsNpdwdRER VBEetTTyfrI4DNiDs/ntvKTuwTZw5yApI+cODGUO7UwMjdWcVbFee1AlDraFN/X8NA3/ AMy44bTomu0oyoNKH5Dpz3JodiOhWY4hQQm6GfJmEz/kqhnFzZc1ZEdNQlI/qS39rWWh CRvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AtXYxoxurgVSo3CaX68xSK3Nxjuk3GGkga1qWcCUL/s=; b=HakUHw1+zyR7F74MOkCHX/y+2QlNlnhASwHCwzyseHv8zK9M76Zd9mXps+OsIts7Mu Aa6GymHPp9EppN1OO/EchVlJKfoeTDxT4KmeLGeQR9Xp3MdaRh3GE8QxWRM3DsQQCIvC nGn1xMDFXoDonwMg6QUAtFgODPAqObRAEu+aPi1GTl8XXreIQ3rCgNHsNAS9OsNdosCi jcc15Zpa21gOC9nShqh9Z/VWpW+t7Oah4emD4P2Lf2RErCPUT+YDHNfdLu8PkuyrlB7g Vs1crwRXQFw1AilpOeszOMc00Ra9/7N/rjhUrtiD8jS/URM5ilZESBcXR7fTJ0nYGWJ6 CN0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=JnGRaUGf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb7-20020a0564020d0700b00423d384ad20si17607080edb.570.2022.04.26.02.18.05; Tue, 26 Apr 2022 02:18:29 -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; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=JnGRaUGf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235777AbiDYPXk (ORCPT + 99 others); Mon, 25 Apr 2022 11:23:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229557AbiDYPXj (ORCPT ); Mon, 25 Apr 2022 11:23:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C402B822E for ; Mon, 25 Apr 2022 08:20:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F227DB815E2 for ; Mon, 25 Apr 2022 15:20:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29B81C385A4; Mon, 25 Apr 2022 15:20:31 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="JnGRaUGf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1650900029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AtXYxoxurgVSo3CaX68xSK3Nxjuk3GGkga1qWcCUL/s=; b=JnGRaUGf3h9PnJvj9whZD4f73bceBwzAN0b0BV7mLe4f3zrZY7mb911HhA+tq+sS9KctSg OjyQdhH9GQYu46IDnRPsUaLxJ0EV65ZOsfxqvf2slRDGfLebFQZ4a0HQ+sizF7/zaNOHyt 5EGv2T2wAmi0m/5Ik3U59+85r74kDrs= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 9eae9dd0 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Mon, 25 Apr 2022 15:20:29 +0000 (UTC) Date: Mon, 25 Apr 2022 17:20:25 +0200 From: "Jason A. Donenfeld" To: Arnd Bergmann Cc: Linux Kernel Mailing List , Nick Desaulniers Subject: Re: odd endianness toolchains for crosstool Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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 Hey Arnd, On Mon, Apr 25, 2022 at 04:55:20PM +0200, Arnd Bergmann wrote: > I suppose the only thing you are missing is libgcc (or libcompiler-rt) > for those platforms. I had a closer look into what is or can be included > here, and I see that my builds include multiple versions on some of > the architectures, but not on others: > > aarch64-linux/lib/gcc/aarch64-linux/11.1.0/libgcc.a > alpha-linux/lib/gcc/alpha-linux/11.1.0/libgcc.a > arc-linux/lib/gcc/arc-linux/11.1.0/libgcc.a > arc-linux/lib/gcc/arc-linux/11.1.0/hs/libgcc.a > arc-linux/lib/gcc/arc-linux/11.1.0/archs/libgcc.a > arc-linux/lib/gcc/arc-linux/11.1.0/hs38/libgcc.a > arc-linux/lib/gcc/arc-linux/11.1.0/hs38_linux/libgcc.a > arc-linux/lib/gcc/arc-linux/11.1.0/arc700/libgcc.a > arc-linux/lib/gcc/arc-linux/11.1.0/nps400/libgcc.a > arm-linux-gnueabi/lib/gcc/arm-linux-gnueabi/11.1.0/libgcc.a > ... > powerpc-linux/lib/gcc/powerpc-linux/11.1.0/libgcc.a > powerpc-linux/lib/gcc/powerpc-linux/11.1.0/64/libgcc.a > powerpc-linux/lib/gcc/powerpc-linux/11.1.0/64/le/libgcc.a > powerpc-linux/lib/gcc/powerpc-linux/11.1.0/le/libgcc.a > powerpc-linux/lib/gcc/powerpc-linux/11.1.0/32/le/libgcc.a > powerpc64-linux/lib/gcc/powerpc64-linux/11.1.0/libgcc.a > powerpc64-linux/lib/gcc/powerpc64-linux/11.1.0/32/libgcc.a > powerpc64-linux/lib/gcc/powerpc64-linux/11.1.0/32/le/libgcc.a > powerpc64-linux/lib/gcc/powerpc64-linux/11.1.0/le/libgcc.a > powerpc64-linux/lib/gcc/powerpc64-linux/11.1.0/64/le/libgcc.a > mips-linux/lib/gcc/mips-linux/11.1.0/libgcc.a > mips-linux/lib/gcc/mips-linux/11.1.0/n32/libgcc.a > mips-linux/lib/gcc/mips-linux/11.1.0/64/libgcc.a > mips64-linux/lib/gcc/mips64-linux/11.1.0/libgcc.a > mips64-linux/lib/gcc/mips64-linux/11.1.0/32/libgcc.a > mips64-linux/lib/gcc/mips64-linux/11.1.0/64/libgcc.a > > So on powerpc, there are already both big-endian and > little-endian binaries, but arm and mips only have one of the > two. I asked our local compiler experts, and they suggested > that one can add further multiarch-configs like the one > in gcc/config/arm/t-aprofile to allow building for a different > subset of the hundreds of possible configurations. > > the t-aprofile builds libgcc for a couple of combinations of > cpu architecture level and FPU ABIs, but they are all the > same endianess. gcc/config/rs6000/t-linux64lebe is the > corresponding file for powerpc that enables all combinations > of 32/64 and be/le. Right, exactly. So if you simply add little endian libgcc to ppc64, ppc, mips, and mips64, and add big endian libgcc to arm and arm64, then we'd be set. (And also, build ppc32 with --enable-secureplt --with-long-double-64.) Jason