[PATCH powerpc64le] Use the target 'objcopy' when cross-compiling.

Ludovic Courtès ludo@gnu.org
Wed Jul 7 22:05:50 GMT 2021


Hi,

Florian Weimer <fweimer@redhat.com> skribis:

> * Ludovic Courtès 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 `…/no_ldbl_gnu_attribute.o'
>>
>> This patch changes 'configure.ac' to use AC_CHECK_TOOL rather than
>> '$CC -print-prog-name=objcopy' 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=objcopy' result in the right
> command name?

Is it supposed to?  Looking at gcc/gcc.c:find_a_file, I’m not sure.
For me it prints ‘objcopy’, and when I run:

  strace aarch64-linux-gnu-gcc -print-prog-name=objcopy

… I only see it look for ‘objcopy’, not ‘aarch64-linux-gnu-objcopy’.

Could it be a packaging issue?

Thanks,
Ludo’.


More information about the Libc-alpha mailing list