On 04.06.2022 10:32, Jakub Jelinek wrote:
> On Thu, Jun 02, 2022 at 05:32:10PM +0200, Jan Beulich via Gcc-patches wrote:
>> 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.
> 
> This regressed
> Executing on host: /home/jakub/src/gcc/obj44/gcc/xgcc 
> -B/home/jakub/src/gcc/obj44/gcc/     -fdiagnostics-plain-output   -flto -g 
> -gsplit-dwarf   -c -o c_lto_pr83719_0.o 
> /home/jakub/src/gcc/gcc/testsuite/gcc.dg/lto/pr83719_0.c    (timeout = 300)
> spawn -ignore SIGHUP /home/jakub/src/gcc/obj44/gcc/xgcc 
> -B/home/jakub/src/gcc/obj44/gcc/ -fdiagnostics-plain-output -flto -g 
> -gsplit-dwarf -c -o c_lto_pr83719_0.o 
> /home/jakub/src/gcc/gcc/testsuite/gcc.dg/lto/pr83719_0.c
> cc1: note: '-gsplit-dwarf' is not supported with LTO, disabling
> /home/jakub/src/gcc/obj44/gcc/objcopy: line 120: exec: --: invalid option
> exec: usage: exec [-cl] [-a name] [command [argument ...]] [redirection ...]
> compiler exited with status 1
> FAIL: gcc.dg/lto/pr83719 c_lto_pr83719_0.o assemble,  -flto -g -gsplit-dwarf 
> for me, both on x86_64-linux and i686-linux.

Hmm, it surely worked for me for both, with and without in-tree binutils
(you don't say which variant you saw the failure with).

> For some reason, I have
> grep OBJCOPY *gcc/Makefile
> gcc/Makefile:ORIGINAL_OBJCOPY_FOR_TARGET = 
> prev-gcc/Makefile:ORIGINAL_OBJCOPY_FOR_TARGET = 
> stage1-gcc/Makefile:ORIGINAL_OBJCOPY_FOR_TARGET = 

What about the corresponding ORIGINAL_NM_FOR_TARGET? And could you provide
one of the config.log instances? 

Jan

Reply via email to