GNU sed's man page has this to say about "-i":
Because -i takes an optional argument, it should not be followed by
other short options:
[..]
sed -iE '...' FILE
This is equivalent to --in-place=E, creating FILEE as backup of FILE
This means all "-iX" did not have the intended effect X, so we can
instead remove them.
Remove a patch to decrease the divergence from upstream.
Motivation is a continuation of trying to reduce the number of clang
builds floating around. Wrapper builds are cheap, compiler builds are
not.
It's expected that this patch can be removed at some point and replaced
with some other cc-wrapper logic. This will be a little bit easier with
the logic already in the cc-wrapper.
Ongoing discussion in #191152. It would be nice to drop this but we
think it's probably needed at least on systems where /usr/include may be
available to prevent the possibility of picking up unwanted includes.
One potential method for eliminating nostdlibinc in the future is by
providing a non-existent -sysroot but that was reverted in #213185, and
remains a can of worms.
Signed-off-by: Peter Waller <p@pwaller.net>
Currently the target triple leaks into the clang build via llvm using
libbfd, whose build varies according to the target triple.
LLVM only uses libbfd to enable LTO via the linker plugin (called
LLVMgold.so, though multiple linkers can use the same plugin).
Drop the dependency on the libbfd build, and consume the only needed
source instead. (This would be a good use of CA-derivations FWIW).
The result of this commit is that these match:
* nix eval --raw nixpkgs#clang.cc
* nix eval --raw nixpkgs#pkgsStatic.pkgsLLVM.stdenv.cc.cc
* nix eval --raw nixpkgs#pkgsCross.aarch64-multiplatform.pkgsLLVM.stdenv.cc.cc
This means fewer clang builds will be needed to support cross
configurations, and users wanting to target an exotic cross
configuration should be able to do so without a rebuild of clang.
Also drops libbfd.hasPluginAPI which no longer has any users.
Signed-off-by: Peter Waller <p@pwaller.net>