Without the change build fails on -fno-common toolchains like upstream
gcc-10:
$ nix build -L --impure --expr 'with import ./. {}; gtkdialog.overrideAttrs (oa: { NIX_CFLAGS_COMPILE = (oa.NIX_CFLAGS_COMPILE or []) ++ ["-fno-common"]; })'
...
ld: widget_window.o:/build/gtkdialog-0.8.3/src/gtkdialog.h:43:
multiple definition of `function_signals_block'; gtkdialog.o:/build/gtkdialog-0.8.3/src/gtkdialog.h:43: first defined here
Currently stlink build fails on macOS since version 1.7.0 didn't contain
468b1d2daa
commit from upstream. This commit adds dependency on Security framework
required for libusb.
Before the change 'postFixup' was breaking binaries as it deleted `libctf.so`'s
dependency without fixing the links (https://hydra.nixos.org/build/173957444):
objdump:
symbol lookup error: ...-binutils-2.38/lib/libctf.so.0: undefined symbol: htab_eq_string
Instead of tying binutils and libbfd together let's stop replacing the
libraries and use local copies. They are not mechanically interchangeable.
Ideally binutils' upstream build system should allow linking external
`libbfd`/`libopcodes`/`libctf` but we are not there yet.
The C++ compiler in our musl bootstrap for aarch64 is too old to build
the latest version of patchelf, so we need to use the latest version
that builds with that compiler to get a new bootstrap.
The C++ compiler in our musl bootstrap for aarch64 is too old to build
the latest version of patchelf, so introduce a package for the most
recent version it's capable of building that we can use to get a new
bootstrap.
Upstream binutils is missing sensible defaults for a few flags
(notably linker personality) when cross-compiling to
mips64el-*-*abi64.
Most of the time this isn't an issue because packages that invoke the
linker directly detect the flags from gcc's behavior (for example,
libtool does this) and gcc has good code for detecting the right
defaults. However some do not; notably nix, itself lacks this.
Presumably Debian is working on upstreaming this, and has more clout
than we do. I propose we carry their patch in the meantime. The
patch is conditioned on stdenv.targetPlatform.isMips64n64 in order to
avoid mass-rebuilds.
Closes#164835.