summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-03-16 00:09:35 +0000
committerAlyssa Ross <hi@alyssa.is>2023-03-16 02:29:46 +0000
commit470e6130b347c5aabc63cd6600ba78fa909e8e2a (patch)
tree7e7738a23264ec2e81b7a266c196f5a0ca40082e /pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch
parent8de41b370fc8fe12a8ac0f605ea460254a217bb7 (diff)
rust: fix overriding rust flags on musl
If RUSTFLAGS is set in the environment, Cargo will ignore rustflags settings in its TOML configuration. So setting RUSTFLAGS=-g (like separateDebugInfo does) to generate debug info breaks dynamically-linked Rust packages on musl. This breakage is visible for any packages that call into C dynamic libraries. If the binary is linked directly to a C dynamic library, it will fail to build, and if it depends on a Rust library which links a C dynamic library, it will segfault at runtime when it tries to call a function from the C library. I noticed this because pkgsMusl.crosvm is broken for this reason, since it sets separateDebugInfo = true. It shouldn't be possible to end up with broken binaries just by using RUSTFLAGS to do something innocuous like enable debug info, so I think that, even though we liked the approach of modiyfing .cargo/config better at the time, it's become clear that it's too brittle, and we should bite the bullet and patch the compiler instead when targetting musl. It does not appear to be necessary to modify the compiler at all when cross-compiling /from/ dynamically-linked Musl to another target, so I'm only checking whether the target system is dynamically-linked Musl when deciding whether to make the modification to the compiler. This reverts commit c2eaaae50d66a933e38256bdf5a3ae43430592a3 ("cargoSetupHook: pass host config flags"), and implements the compiler patching approach instead.
Diffstat (limited to 'pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch')
0 files changed, 0 insertions, 0 deletions