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 F29733835806 for ; Wed, 7 Jul 2021 22:05:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F29733835806 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47128) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1Fg0-0002E7-JC; Wed, 07 Jul 2021 18:05:52 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42816 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1Fg0-00063s-6q; Wed, 07 Jul 2021 18:05:52 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Florian Weimer Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= via Libc-alpha Subject: Re: [PATCH powerpc64le] Use the target 'objcopy' when cross-compiling. References: <20210707155547.15277-1-ludo@gnu.org> <875yxm3y8h.fsf@oldenburg.str.redhat.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 19 Messidor an 229 de la =?utf-8?Q?R=C3=A9volution?= 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: Thu, 08 Jul 2021 00:05:50 +0200 In-Reply-To: <875yxm3y8h.fsf@oldenburg.str.redhat.com> (Florian Weimer's message of "Wed, 07 Jul 2021 18:06:06 +0200") Message-ID: <875yxlok3l.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Wed, 07 Jul 2021 22:05:55 -0000 Hi, Florian Weimer skribis: > * Ludovic Court=C3=A8s via Libc-alpha: > >> When cross-compiling to powerpc64le-linux-gnu, >> sysdeps/powerpc/powerpc64/le/Makefile would use "objcopy", leading to >> errors like: >> >> objcopy: Unable to recognise the format of the input file `=E2=80=A6/n= o_ldbl_gnu_attribute.o' >> >> This patch changes 'configure.ac' to use AC_CHECK_TOOL rather than >> '$CC -print-prog-name=3Dobjcopy' to determine the value of the OBJCOPY >> variable. That way, OBJCOPY is set to TRIPLET-objcopy when >> cross-compiling for TRIPLET. > > Hmm. Why doesn't '$CC -print-prog-name=3Dobjcopy' result in the right > command name? Is it supposed to? Looking at gcc/gcc.c:find_a_file, I=E2=80=99m not sure. For me it prints =E2=80=98objcopy=E2=80=99, and when I run: strace aarch64-linux-gnu-gcc -print-prog-name=3Dobjcopy =E2=80=A6 I only see it look for =E2=80=98objcopy=E2=80=99, not =E2=80=98aa= rch64-linux-gnu-objcopy=E2=80=99. Could it be a packaging issue? Thanks, Ludo=E2=80=99.