[llvm-3.8.1] /usr/bin/objcopy: unrecognized option '--extract-dwo'

Hi,

I am still struggling with my optimized/speedup build of llvm-toolchain v3.8.1.
Here: Enable LTO, PGO, optimized-TableGen, split-DWARF and build with
GNU/gold and LLVMgold-plugin.

The objcopy (binutils v2.22) here on Ubuntu/precise AMD64 does not
support '--extract-dwo'.

My build fails with... /usr/bin/objcopy: unrecognized option '--extract-dwo'.

Now, I did a full build of binutils v2.26.1 and using its binaries.

Is it possible to embed a test if objcopy is able to perform '--extract-dwo'?
( I cannot say which of the speedup options require this option. )

Thanks.

Regards,
- Sedat -

build_llvm-toolchain.sh (6.73 KB)

Hi,

I am still struggling with my optimized/speedup build of llvm-toolchain v3.8.1.
Here: Enable LTO, PGO, optimized-TableGen, split-DWARF and build with
GNU/gold and LLVMgold-plugin.

The objcopy (binutils v2.22) here on Ubuntu/precise AMD64 does not
support '--extract-dwo'.

binuils v2.22 was released 2011-11-21 (see [1])

[2] says about --extract-dwo options...

* doc/binutils.texi (objcopy): Add --strip-dwo, --extract-dwo options.
(strip): Add --strip-dwo option.
* objcopy.c (enum strip_action): Add STRIP_DWO, STRIP_NONDWO.
(enum command_line_switch): Add OPTION_EXTRACT_DWO, OPTION_STRIP_DWO.
(strip_options): Add --strip-dwo option.
(copy_options): Add --extract-dwo, --strip-dwo options.
(copy_usage): Likewise.
(strip_usage): Add --strip-dwo option.
(is_dwo_section): New function.
(is_strip_section_1): Check for DWO sections.
(copy_object): Check for --strip-dwo, --extract-dwo options.
(copy_relocations_in_section): Discard relocations for DWO sections.
Discard entire relocation section when no relocations.
(strip_main): Add --strip-dwo option.
(copy_main): Add --strip-dwo, --extract-dwo options.

Hmm, Ubuntu/precise seems to be a bit outdated :-(.

- Sedat -

[1] https://ftp.gnu.org/gnu/binutils/
[2] https://github.com/bennoleslie/binutils/blob/master/binutils/ChangeLog#L259

Hi,

I am still struggling with my optimized/speedup build of llvm-toolchain v3.8.1.
Here: Enable LTO, PGO, optimized-TableGen, split-DWARF and build with
GNU/gold and LLVMgold-plugin.

The objcopy (binutils v2.22) here on Ubuntu/precise AMD64 does not
support ‘–extract-dwo’.

My build fails with… /usr/bin/objcopy: unrecognized option ‘–extract-dwo’.

Now, I did a full build of binutils v2.26.1 and using its binaries.

Is it possible to embed a test if objcopy is able to perform ‘–extract-dwo’?
( I cannot say which of the speedup options require this option. )

split-DWARF requires objcopy’s --extract-dwo. If your tools don’t support it, turn off split DWARF & you should be fine.

  • Dave

[ CC Chris ]

Dave, Thanks for the explanations.
I have filed a bug, see [1].

- Sedat -

[1] https://llvm.org/bugs/show_bug.cgi?id=28737