Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3343687ioa; Tue, 26 Apr 2022 01:38:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeMay0W8p/+wLSAZKdi871EOUPEuK3mncmvHJ77WQdpfAyXPCcdEoQwqtomghWNgb9kAaP X-Received: by 2002:a05:6402:3551:b0:423:f051:a9b5 with SMTP id f17-20020a056402355100b00423f051a9b5mr23828468edd.375.1650962290423; Tue, 26 Apr 2022 01:38:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650962290; cv=none; d=google.com; s=arc-20160816; b=kyxTkreleMIhLhFMreVwnXacUpkqoYmqcDBBb3vB9PguW4E6mItMFSvKDUyVrofvbp +LgFKFqH6PXHmlNLRhgpl5F/xXu0Us03NzRiheu3dkMvLH3kAd3DO0MmnpOjEQUJCJiQ OUCJgmn7VFRejJpxlQTHxsyX5kZCkckQAramam/+7Mqaogv3KFy4ygBfOMokQZhynJGi s6WBP3ITFZIVWoldlnHU0oz14WNBqHHcfb+UdMuVTSvYswnOGzkgCaAzTGEJrDw4d+rS NZM57oZWPbxY8KQHZ/MeKxFZurVPPEvuzctqK5O6UERNMMvBHfeJmfHFcTcDM0DSZ17O gw8g== 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:dkim-signature; bh=emr/eZ9O5nqIe1U2cNBS+25IfmVTCGZ2HAu0n0lsDAk=; b=b5Tqt6WQa1sOH//lziu0bRZwQCEJDDCyaPAcVfY5wcMQZC44qOvdnUpSqz13qSkHg/ ZUA+3G+QGmJxY+jwYJK1MJ6fXcjBWuOv5XyzyTnwv6BlGfuOx9gHwUjZzQEMeRN/MASt DaZPcJHaD6n+k5Y0jvxQBQd/SsOgkdEwRnH6Ysu0wgSm9w1WFmt5UYpZzyefrm8x5YVc ilohPerZcrzoaDJxZZMaMd3GxzDfZgm38gvuTjbOCSi+9NSfu+DHdSRejev76UjbdrRj /E0pzudUe2ycXPMh8mFyqvRzDCWew/NYAGtskm5QF3+rYA3ZdqPCcSRuxs5FTmNzhSfc 0EwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=Np40sjFI; 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 d14-20020a50fe8e000000b00425b3996d7fsi11243223edt.260.2022.04.26.01.37.46; Tue, 26 Apr 2022 01:38:10 -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=Np40sjFI; 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 S243981AbiDYRp5 (ORCPT + 99 others); Mon, 25 Apr 2022 13:45:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237036AbiDYRp4 (ORCPT ); Mon, 25 Apr 2022 13:45:56 -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 5F0EAD3ACD for ; Mon, 25 Apr 2022 10:42:51 -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 1BB20B81907 for ; Mon, 25 Apr 2022 17:42:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71FD4C385A7 for ; Mon, 25 Apr 2022 17:42:48 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="Np40sjFI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1650908566; 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=emr/eZ9O5nqIe1U2cNBS+25IfmVTCGZ2HAu0n0lsDAk=; b=Np40sjFIC35jcIRAZGUbROu+xW+TSnqD/4SxjmrXe8eeAZy8uqGYyJ6Q9fI+nVtUSqQ/Fd wh7rrnLpqb5/i3si5nZkHipG6EppEVMTExcVcleJ2AWYRQm3Jp5Q/+HN593rZsfGRW1y7w c9BX/CHZc6Xjh2QvF++mJMZwOK2jeFE= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 43df90a4 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Mon, 25 Apr 2022 17:42:46 +0000 (UTC) Received: by mail-yb1-f173.google.com with SMTP id i38so9393268ybj.13 for ; Mon, 25 Apr 2022 10:42:46 -0700 (PDT) X-Gm-Message-State: AOAM533mFSzSE2DPtev+B3fq6tXPwr6uUPHTobqXwcG7j/Clkl9ZHvSJ oU1N60NyjCHKZvV+OM8czkdxwbrDw68GDp0PVIg= X-Received: by 2002:a25:bd8e:0:b0:644:d8dc:1198 with SMTP id f14-20020a25bd8e000000b00644d8dc1198mr17577856ybh.398.1650908565448; Mon, 25 Apr 2022 10:42:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Jason A. Donenfeld" Date: Mon, 25 Apr 2022 19:42:34 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: odd endianness toolchains for crosstool To: Arnd Bergmann Cc: Linux Kernel Mailing List , Nick Desaulniers Content-Type: text/plain; charset="UTF-8" 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 Hi Arnd, On Mon, Apr 25, 2022 at 7:40 PM Arnd Bergmann wrote: > > For ppc64, I see the same. I'll try to look into it more though. > > > > > Regarding the the ELF ABI, I'm not sure how to check, but I think it > > > only does ELFv1, which is the default for big-endian glibc. > > > > Yes, it only is doing ELFv1 right now. musl checks this in > > with this: > > > > trycppif "_CALL_ELF == 2" "$t" || fail "$0: error: unsupported powerpc64 ABI" > > Does it work if you pass -mabi=elfv2? This seems to be ignored here as well: > > $ powerpc-linux-gcc -mlittle-endian -mabi=elfv2 -xc -c /dev/null -o /tmp/a.o > $ file /tmp/a.o > /tmp/a.o: ELF 32-bit LSB relocatable, PowerPC or cisco 4500, version 1 > (SYSV), not stripped You're mixing things up I think. -mabi=elfv2 is what powerpc64 needs, but I don't think powerpc32 has it. If you try to add -mabi=elfv2 to your existing powerpc64 compiler, it gets upset when linking to libgcc. Jason