This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH/TopLevel] Fix compiling libgo with a combined sources
- From: "Bin.Cheng" <amker dot cheng at gmail dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: Jeff Law <law at redhat dot com>, binutils <binutils at sourceware dot org>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Ian Lance Taylor <ian at airs dot com>
- Date: Sun, 4 Jan 2015 17:35:28 +0800
- Subject: Re: [PATCH/TopLevel] Fix compiling libgo with a combined sources
- Authentication-results: sourceware.org; auth=none
- References: <CA+=Sn1nMV44+3jMMZ0WJQbX=KTaETk7ZC5ZzOv3K-wYdQiCPkw at mail dot gmail dot com> <5473A3D3 dot 901 at redhat dot com> <CA+=Sn1kLwMubQ_9b7sPsu2JhEgnAmcg3M61DQkyMOf_zNXoR7g at mail dot gmail dot com>
On Sun, Jan 4, 2015 at 6:55 AM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Mon, Nov 24, 2014 at 1:32 PM, Jeff Law <law@redhat.com> wrote:
>> On 11/22/14 21:20, Andrew Pinski wrote:
>>>
>>> Hi,
>>> The problem here is here is that OBJCOPY is not being set to the
>>> newly built objcopy when compiling libgo. This patch adds
>>> OBJCOPY_FOR_TARGET to the toplevel configure/Makefile so that when
>>> libgo is compiled OBJCOPY is set to OBJCOPY_FOR_TARGET.
>>>
>>> I noticed this issue when building an aarch64 cross compile on an
>>> older system where objcopy did not understand aarch64.
>>>
>>> OK? Bootstrapped and tested on x86_64 with no regressions. Also
>>> tested with a combined build for a cross compiler to
>>> aarch64-linux-gnu.
>>>
>>> Thanks,
>>> Andrew Pinski
>>>
>>>
>>> * Makefile.def (flags_to_pass): Pass OBJCOPY_FOR_TARGET also.
>>> * Makefile.tpl (HOST_EXPORTS): Add OBJCOPY_FOR_TARGET.
>>> (BASE_TARGET_EXPORTS): Add OBJCOPY.
>>> (OBJCOPY_FOR_TARGET): New variable.
>>> (EXTRA_TARGET_FLAGS): Add OBJCOPY.
>>> * Makefile.in: Regenerate.
>>> * configure.ac: Check for already installed target objcopy.
>>> Also GCC_TARGET_TOOL on objcopy.
>>> * configure: Regenerate.
>>
>> OK
>
>
> Committed to GCC and gdb/binutils repos now.
>
> Thanks,
> Andrew
Hi Andrew,
> + elif test "x$target" = "x$host"; then
> + # We can use an host tool
> + OBJCOPY_FOR_TARGET='$(OBJDUMP)'
Is it a typo for '$(OBJCOPY)' ?
Thanks,
bin