From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,URIBL_BLACK shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 8E98F1F910 for ; Sat, 26 Nov 2022 14:58:09 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="uZR8tkZu"; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DCAD7382FCA2 for ; Sat, 26 Nov 2022 14:58:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCAD7382FCA2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669474687; bh=2BHfT18YpWbdaOAl4queLe35Axf9b+1AmtTcMfHPETM=; h=To:Cc:Subject:References:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=uZR8tkZuxLAfaEB0hoURXZgYZo2yk+a91pWiuXAipMSVghACxhxwmoKPrh/fVgSlk 8UcLwBqjbfGZXSnOrVj8MGXegFlY0fDOBydZzEcsN7/ZBleeg+QulWEVGk1P86g+Kf R7ygl6eYSLCQrP1ifCGE7f5TpdjWHjyfvjGLP81A= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 84DD738518AB for ; Sat, 26 Nov 2022 14:57:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 84DD738518AB Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oywcj-0001Zi-EY; Sat, 26 Nov 2022 09:57:45 -0500 Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oywci-0007VC-UC; Sat, 26 Nov 2022 09:57:45 -0500 To: Vineet Gupta Cc: libc-alpha@sourceware.org, Carlos O'Donell , Fangrui Song , nelson Chu , palmer@rivosinc.com, gnu-toolchain@rivosinc.com Subject: Re: [PATCH] Revert "Correctly determine libc.so 'OUTPUT_FORMAT' when cross-compiling." References: <20221123025932.473655-1-vineetg@rivosinc.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Sextidi 6 Frimaire an 231 de la =?utf-8?Q?R=C3=A9vol?= =?utf-8?Q?ution=2C?= jour de la =?utf-8?Q?M=C3=A2che?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 26 Nov 2022 15:57:42 +0100 In-Reply-To: <20221123025932.473655-1-vineetg@rivosinc.com> (Vineet Gupta's message of "Tue, 22 Nov 2022 18:59:32 -0800") Message-ID: <87lenx9315.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: =?utf-8?q?Ludovic_Court=C3=A8s_via_Libc-alpha?= Reply-To: =?utf-8?Q?Ludovic_Court=C3=A8s?= Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" Hi, Vineet Gupta skribis: > This reverts commit 361d6454c034a920f2c96517c277990d390b9652. > > This trips up riscv gnu toolchain builds [1] > > riscv ld segfaults when linking libgcc because libc.so linker script > contains `OUTPUT_FORMAT(elf32-little)` vs. `OUTPUT_FORMAT(elf32-littleris= cv)`. > > This patch causes builds to lookup riscv32* prefixed objdump and failing > to find it falls back to host objdump which is the root of the issue. > The host objdump in turn generates `OUTPUT_FORMAT(elf32-little)` > > riscv glibc multilib builds lack riscv32 prefix binaries. They have a > single set of "riscv64" prefixed binaries supporting both 32 and 64-bit > abis: ilp32/ilp32d/lp64/lp64d using -march/-mabi. > > FWIW I'm not sure how this patch fixed a real problem to begin with. The rationale was described in the context of cross-compilation to aarch64-linux-gnu: https://sourceware.org/pipermail/libc-alpha/2021-July/128333.html We observed a similar issue with objcopy when cross-compiling to powerpc64le-linux-gnu: https://issues.guix.gnu.org/49417 Maybe we should see, in your case, why =E2=80=9Criscv32-linux-gnu-objdump -= f=E2=80=9D reports =E2=80=9Celf32-little=E2=80=9D instead of =E2=80=9Celf32-littlerisc= v=E2=80=9D? HTH, Ludo=E2=80=99.