From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id 0F3773858404 for ; Thu, 13 Oct 2022 20:56:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0F3773858404 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=google.com Received: by mail-pg1-x52a.google.com with SMTP id 129so2579362pgc.5 for ; Thu, 13 Oct 2022 13:56:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=deckf/h7k/Ig0MUJXpBnWB+H98CGinb4hBYK85kUnv8=; b=e682Y+yfN73I0o5aec2k/YhZimoNm2e8td2enzyp9OHJydb/Oyb8JQHguQE/7C0ki9 1BM8iHwsj92HOYFWysAgCRq3STeRckUybfsupeq6dZ+NmSTwlByipkXIsvnAJk474h45 CX/uayezDjpJSx+hI0XlsYKflnFgG+Pl7utQZctm6GL1F1IZI2mq4wA5iVFvZxFhdoKO A6si6hrpJllnD1Pk0id2M2Hhr9UxcAlPcI9a5Gl5sHnu/16mAvV7ICG7z8Oo8im6AKpF 9dV+4qXd2Goub1v7UxNsSnNr4C0md+kgF1SsoMoFbQJTAXrj05TnrApwb5hwxeIL8qaM XCRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=deckf/h7k/Ig0MUJXpBnWB+H98CGinb4hBYK85kUnv8=; b=UnBDvbSPlLgPb1RtgWUVRP66mtjVnN32mA8cqjl6VOz5cgo08/uPcHkzjYFBLWNULN 222wtjhbAK3F4HUY4XXh937/6gCV39gLesYla6MRW/0VusZMV0EmCEpAShTkLfR6Pp/p utLgGMaEGFrQIUE3iH4Xzs4J9PhZ7Oh+q1hWe6JWHoJh31yfbedAirkvINHo8zzq4e4h pLKyCsWFgdDQ4FkYuzrHUzSbsS3/SmmLh6/tSnvj/J9GZRqZds98pjYgzwbcHz0I09Vi fGkRkzWPrHUYScgwOr/xmIHgLsD7QqmYhxi9FqsoRWrINzVAwjYSHe/h9U7jaLvNj7GE w5QA== X-Gm-Message-State: ACrzQf0dHJAWOSgMLTJw3iquyfKvn70pJ5uAzp2TvvwPtNYk9xgr/7FC u0R2yiqgtBuFyxV0U2GbpreuUQ== X-Google-Smtp-Source: AMsMyM59tt/NIPsfl+EF5544SG+gphFzPbAt4FCIYX3YrtB8oXLRqwoCUFt2AuTk1jCXxfURABv+rA== X-Received: by 2002:a62:144b:0:b0:562:38de:9a0e with SMTP id 72-20020a62144b000000b0056238de9a0emr1420402pfu.78.1665694586990; Thu, 13 Oct 2022 13:56:26 -0700 (PDT) Received: from google.com ([2620:15c:2ce:200:9ffc:cb04:293c:acec]) by smtp.gmail.com with ESMTPSA id z22-20020a62d116000000b0055f209690c0sm142339pfg.50.2022.10.13.13.56.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 13:56:25 -0700 (PDT) Date: Thu, 13 Oct 2022 13:56:21 -0700 From: Fangrui Song To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: Carlos O'Donell , libc-alpha@sourceware.org Subject: Re: [PATCH] Correctly determine libc.so 'OUTPUT_FORMAT' when cross-compiling. Message-ID: <20221013205621.upcf2c2oo5diyxfx@google.com> References: <20210701210019.5594-1-ludo@gnu.org> <87sfk0c6oi.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87sfk0c6oi.fsf@gnu.org> X-Spam-Status: No, score=-19.0 required=5.0 tests=BAYES_00,DKIMWL_WL_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,URIBL_BLACK,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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: On 2022-10-07, Ludovic Courtès via Libc-alpha wrote: >Hi Carlos, > >Carlos O'Donell skribis: > >> On Thu, Jul 01, 2021 at 11:00:19PM +0200, Ludovic Courtès via Libc-alpha wrote: >>> Commit 87d583c6e8cd0e49f64da76636ebeec033298b4d replaces the sed script >>> with an "objdump -f" invocation to determine the 'OUTPUT_FORMAT' bit of >>> the libc.so linker script. >>> >>> 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. >>> >>> This patch changes 'configure.ac' to use AC_CHECK_TOOL rather than >>> '$CC -print-prog-name=objdump' 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’t have commit access AFAIK so I’ll happily defer to you. :-) > >Thanks for taking the time to look at the backlog! > >Ludo’. Thanks. This looks good.