configure: arrange to use appropriate objcopy
authorJan Beulich <jbeulich@suse.com>
Fri, 3 Jun 2022 08:22:25 +0000 (10:22 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 3 Jun 2022 08:22:25 +0000 (10:22 +0200)
commit6124f4248888484f419671f4f7bd40d253d3de06
tree7cc681c73410c6031e7a800bc82886c596311c73
parentd4630b65d12046ecc477d382f5a2094b8250b21b
configure: arrange to use appropriate objcopy

Using the system objcopy is wrong when other configure checks have
probed a different set of binutils (I've noticed the problem on a system
where the base objcopy can't deal with compressed debug sections).
Arrange for the matching one to be picked up, first and foremost if an
"in tree" one is available, by mirroring respective logic already
present for nm.

gcc/

* Makefile.in (ORIGINAL_OBJCOPY_FOR_TARGET): New.
* configure.ac: Check for objcopy, producing
ORIGINAL_OBJCOPY_FOR_TARGET.
* configure: Update accordingly.
* exec-tool.in (ORIGINAL_OBJCOPY_FOR_TARGET): New.
Handle objcopy.
gcc/Makefile.in
gcc/configure
gcc/configure.ac
gcc/exec-tool.in