From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id 91BAC384C002 for ; Sat, 6 Feb 2021 00:39:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 91BAC384C002 Received: by mail-ot1-x331.google.com with SMTP id 100so1986264otg.3 for ; Fri, 05 Feb 2021 16:39:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=hB901W2i+rWzEZDR8wBm+oNIMelU89M9zGNAPbTQx9w=; b=k4L5ZS7TOOj7ZQS1vfl+xlz7wbI+CU+jKDsj+IHftN8qELrt99/DTK3/fDM1DXAEdV PuHpR24SO8oKbwq6bDJrxZxyyy8gUIYJZVtXY4co0aWB2N++jPT0vYq+2Je9PiGnjzy+ tpWSJ5SUpbNDcSgp0378xbyV9fsQBkRDdm2EE7/hnt1mc1Brg0nRHn/MmY232NSARtVV Q0GL5g5l5TkvQyQlKF9xI5CHOmFLIov/N7Q2mKxjVwGd1UjQVyXq86muiqvF3p1K4UjC U/g0UhN6OSDYqhxRx9vCc6qRD+O+ne8PhCPj24yIS11DAe7O/G1OtUIA1u4ifFtW+Ks8 nJCA== X-Gm-Message-State: AOAM530kIrBxjuAA7zS2fsAMlA3TG726Bws0s/VOEWvCGeIl3ggAEoQl 3nLhFZFBZnx0SK6XywGyzaaFuFwkcF+wJvxCrh8= X-Google-Smtp-Source: ABdhPJxbp7GxqVzeF+01GwCa3s6Ooybl4/JrTnuZSUjN6QmYBIabkd1EEPIFVgFaCsr8mXimGbQPU/Wy6bHoB7MAk/Y= X-Received: by 2002:a05:6830:1e2a:: with SMTP id t10mr5324812otr.90.1612571984995; Fri, 05 Feb 2021 16:39:44 -0800 (PST) MIME-Version: 1.0 References: <8zYgCGLOYwM4QgJYHpcrbsF6DkO65RlDeRBJnrDbMymP-oZNm2DkmzE6rd87MdmiS6nRtZF_iKpLXw3Nr3OuvhnCNfZwNPoEzv6zk_yQtNA=@protonmail.com> In-Reply-To: From: "H.J. Lu" Date: Fri, 5 Feb 2021 16:39:08 -0800 Message-ID: Subject: Re: Unable to override OBJCOPY during configure To: Ryan Burns Cc: Adhemerval Zanella , GNU C Library Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3028.1 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Sat, 06 Feb 2021 00:39:47 -0000 On Fri, Feb 5, 2021 at 4:10 PM Ryan Burns via Libc-alpha wrote: > > Hmm, I tried providing OBJCOPY to configure, but it looks like it gets cl= obbered here: > https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dconfigure;h=3D1dc3= af60b4146ba5f9fd251a6820e21752c65444;hb=3DHEAD#l4494 > Perhaps I am misunderstanding the configure script, but I think it's over= riding the OBJCOPY I'm providing? > > I think you are correct that I should reconfigure my toolchain so that '-= print-prog-name' works correctly. > But if this is an acceptable use of an explicit OBJCOPY, I'd like to be a= ble > to get by with that for now so I don't have to recompile gcc. > > > =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original = Message =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 > On Friday, February 5, 2021 3:41 AM, Adhemerval Zanella wrote: > > > On 03/02/2021 23:01, Ryan Burns via Libc-help wrote: > > > > > Hi Libc-help, > > > I'm having trouble cross-compiling glibc to powerpc64le. Compiling to= powerpc64le requires a working objcopy, which I have available via powerpc= 64le-unknown-linux-gnu-objcopy, and I can provide that at build time using = "make OBJCOPY=3Dpowerpc64le-unknown-linux-gnu-objcopy". > > > But the toplevel ./configure does OBJCOPY=3D`$CC -print-prog-name=3Do= bjcopy` unconditionally, and is unable to find powerpc64le-unknown-linux-gn= u-objcopy, so the later version check (to enforce the objcopy 2.26 minimum = requirement) fails. > > > Is it possible to manually specify the objcopy binary at configure ti= me, or bypass the configure check for the objcopy version? > > > Thanks, > > > Ryan > > > > If you have a cross-toolchain correctly configured, the '-print-prog-na= me=3Dobjcopy' > > should give the full path to the objcopy. On my system: > > > > $ [...]/powerpc64le-glibc-linux-gnu-gcc -print-prog-name=3Dobjcopy > > [...]/compilers/powerpc64le-linux-gnu/bin/../lib/gcc/powerpc64le-glibc-= linux-gnu/8.3.1/../../../../powerpc64le-glibc-linux-gnu/bin/objcopy > > > > Otherwise you can explicit set OBJCOPY to the objcopy during configure: > > > > $ [...]/configure --prefix=3D/usr [...] OBJCOPY=3D/path/to/objcopy > > You can use scripts/build-many-glibcs.py to cross compile glibc. --=20 H.J.