From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id B84733858D3C for ; Fri, 7 Oct 2022 09:41:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B84733858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]:53010) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogjqq-0001fE-I2; Fri, 07 Oct 2022 05:41:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=3Qd63nh0yfb39KciD6z9qT3GASZvqjq8AF6WGMzIKHc=; b=sbZVL2rPquZIY5sQb7DP tjH5kqNtwbWyUmdE269zFj3eENYcU80tUFsRyIk3uJcY+mR5o+Cj7xJj8mEvi2HlLi73gxedbYoom ez9F7DDQxtAuLSxMwboVGLU+uqUhl9MA1mLbhn0m4533e+3phq4zibshVcBR7tYwHCTYtjY4Y07HR GGqUAKVPdxgqLrY9AB31vIcZ7auFjOIR5LXD4hzV6fL+eoBWC2cWud4TduH+XW/Mt79jkZCKg5QdF YUXwQIZ8tXHi5T5Ytt9e/yakp3nDioovHmMRrAxcFkBGPYOFBCXgchzJ8sd9yCC4SpLHYvvph7wsx g5qk+l82FKf9+w==; Received: from [193.50.110.253] (port=49244 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogjqq-0007b7-0S; Fri, 07 Oct 2022 05:41:04 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Carlos O'Donell Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] Correctly determine libc.so 'OUTPUT_FORMAT' when cross-compiling. References: <20210701210019.5594-1-ludo@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Sextidi 16 =?utf-8?Q?Vend=C3=A9miaire?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour de la Belle de nuit 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: Fri, 07 Oct 2022 11:41:01 +0200 In-Reply-To: (Carlos O'Donell's message of "Thu, 6 Oct 2022 10:55:49 -0400") Message-ID: <87sfk0c6oi.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP,URIBL_BLACK autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Carlos, Carlos O'Donell skribis: > On Thu, Jul 01, 2021 at 11:00:19PM +0200, Ludovic Court=C3=A8s via Libc-a= lpha wrote: >> Commit 87d583c6e8cd0e49f64da76636ebeec033298b4d replaces the sed script >> with an "objdump -f" invocation to determine the 'OUTPUT_FORMAT' bit of >> the libc.so linker script. >>=20 >> However, when cross-compiling, for example from x86_64-linux-gnu to >> aarch64-linux-gnu, "objdump -f" would report the wrong >> format ("elf64-little"). Conversely, "aarch64-linux-gnu-objdump -f" >> reports "elf64-littleaarch64" as expected. >>=20 >> This patch changes 'configure.ac' to use AC_CHECK_TOOL rather than >> '$CC -print-prog-name=3Dobjdump' to determine the value of the OBJDUMP >> variable. That way, OBJDUMP is set to TRIPLET-objdump when >> cross-compiling for TRIPLET. > > I've been tackling a backlog of old glibc patches, and this one is up > next. Yes it's been over a year, but this patch still applies and the > idea is sound. I've tested this with build-many-glibcs (bmg) on x86_64 > and it has no impact because bmg always sets OBJDUMP. My opinion is that > bmg is the "base standard" for how we build native and cross tooling and > so it your changes work here, they should work in other instances. > > The change looks good to me. > > No regresions on x86_64. > > Would you like me to commit this? :-) I don=E2=80=99t have commit access AFAIK so I=E2=80=99ll happily defer to y= ou. :-) Thanks for taking the time to look at the backlog! Ludo=E2=80=99.