[llvm] [CMake] Check objcopy support for LLVM_SPLIT_DWARF (PR #80500)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 3 20:49:36 PST 2024


MaskRay wrote:

> > GCC 8 is usually shipped with binutils 2.30+
> 
> "usually"? When is it not? Also our supported toolchain includes gcc 7.4.

There is a package devtoolset-7-binutils-2.28-7.el7.x86_64.rpm. I assume that GCC 7 is often used with 2.28, nearly 5 years newer than 2.23. Of course you can claim that there are systems out there that use GCC 7 but much older binutils. I think proponents of the change should show evidence.

> > This change will cause trouble if a system does not provide objcopy. Clang -gsplit-dwarf doesn't need objcopy. I changed it a few years ago to use the internal ELF writer for non-Linux OSes.
> 
> But that applies only to clang and not gcc? What tool from binutils is involved in building LLVM with GCC? Also what about BFD support?

The objcopy requirement is only for GCC. Clang doesn't use objcopy for -gsplit-dwarf.

BFD is part of binutils.

I understand the desire to add some check to prevent any inconvenience, but I strongly believe the objcopy check is not only busy work here but also harmful (for systems not using binutils, etc).


https://github.com/llvm/llvm-project/pull/80500


More information about the llvm-commits mailing list