diff options
author | Jan Beulich <jbeulich@suse.com> | 2022-06-03 10:22:25 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2022-06-03 10:22:25 +0200 |
commit | 6124f4248888484f419671f4f7bd40d253d3de06 (patch) | |
tree | 7cc681c73410c6031e7a800bc82886c596311c73 /gcc/exec-tool.in | |
parent | d4630b65d12046ecc477d382f5a2094b8250b21b (diff) | |
download | gcc-6124f4248888484f419671f4f7bd40d253d3de06.zip gcc-6124f4248888484f419671f4f7bd40d253d3de06.tar.gz gcc-6124f4248888484f419671f4f7bd40d253d3de06.tar.bz2 |
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.
Diffstat (limited to 'gcc/exec-tool.in')
-rw-r--r-- | gcc/exec-tool.in | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/exec-tool.in b/gcc/exec-tool.in index cf72227..3a0fefa 100644 --- a/gcc/exec-tool.in +++ b/gcc/exec-tool.in @@ -17,7 +17,7 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -# Invoke as, ld or nm from the build tree. +# Invoke as, ld, nm, or objcopy from the build tree. ORIGINAL_AS_FOR_TARGET="@ORIGINAL_AS_FOR_TARGET@" ORIGINAL_LD_FOR_TARGET="@ORIGINAL_LD_FOR_TARGET@" @@ -25,6 +25,7 @@ ORIGINAL_LD_BFD_FOR_TARGET="@ORIGINAL_LD_BFD_FOR_TARGET@" ORIGINAL_LD_GOLD_FOR_TARGET="@ORIGINAL_LD_GOLD_FOR_TARGET@" ORIGINAL_PLUGIN_LD_FOR_TARGET="@ORIGINAL_PLUGIN_LD_FOR_TARGET@" ORIGINAL_NM_FOR_TARGET="@ORIGINAL_NM_FOR_TARGET@" +ORIGINAL_OBJCOPY_FOR_TARGET="@ORIGINAL_OBJCOPY_FOR_TARGET@" ORIGINAL_DSYMUTIL_FOR_TARGET="@ORIGINAL_DSYMUTIL_FOR_TARGET@" exeext=@host_exeext@ fast_install=@enable_fast_install@ @@ -72,6 +73,11 @@ case "$invoked" in prog=nm-new$exeext dir=binutils ;; + objcopy) + original=$ORIGINAL_OBJCOPY_FOR_TARGET + prog=objcopy$exeext + dir=binutils + ;; dsymutil) original=$ORIGINAL_DSYMUTIL_FOR_TARGET # We do not build this in tree - but still want to be able to execute |