nixpkgs/pkgs/development/compilers
Alyssa Ross 470e6130b3
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 c2eaaae50d
("cargoSetupHook: pass host config flags"), and implements the
compiler patching approach instead.
2023-03-16 02:29:46 +00:00
..
4th
abcl
acme
adoptopenjdk-bin {temurin,adoptopenjdk}-bin: use alpine_linux os for musl libc 2022-10-12 20:28:59 +02:00
adoptopenjdk-icedtea-web
alan treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
algol68g
ante ante: init at unstable-2022-08-22 2022-09-14 13:48:46 +02:00
apache-flex-sdk
arachne-pnr
armips
as31
asl asl: 142-bld211 -> 142-bld232 2022-11-15 10:06:44 -03:00
asn1c asn1c: re-init at 0.9.28 2022-12-29 12:57:45 -08:00
aspectj aspectj: 1.9.9.1 -> 1.9.19 2023-02-04 02:30:58 +00:00
atasm
ats
ats2 ats-acc: fix build 2023-01-02 14:44:38 +01:00
avra
ballerina ballerina: 2201.2.1 -> 2201.2.2 2022-10-24 23:24:09 +08:00
bigloo bigloo: unbreak on x86_64-darwin 2023-01-15 13:59:12 +01:00
binaryen Merge pull request #209122 from willcohen/binaryen 2023-01-22 23:33:33 +01:00
blueprint treewide: switch to nativeCheckInputs 2023-01-21 12:00:00 +00:00
bluespec treewide: switch to nativeCheckInputs 2023-01-21 12:00:00 +00:00
bs-platform treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
bupc
c3c treewide: switch to nativeCheckInputs 2023-01-21 12:00:00 +00:00
cakelisp treewide: mark packages broken that never built on PLATFORM 2022-12-13 21:40:12 +01:00
carp carp: patch for GHC 9.2 and Stackage LTS-20 2022-12-29 13:35:15 +01:00
cc65
ccl ccl: remove tohl from meta.maintainers list 2022-10-23 01:09:17 -03:00
chez treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
chez-racket Merge remote-tracking branch 'origin/master' into staging-next 2023-02-23 13:51:34 +00:00
chicken treewide: remove usages of header and stopNest 2023-01-16 00:08:12 +02:00
ciao ciao: 1.21.0-m1 -> 1.22.0-m1 2022-09-29 10:58:30 +00:00
circt circt: 1.30.0 -> 1.34.0 2023-03-08 15:14:41 +00:00
clasp
clean
closure closurecompiler: 20221004 -> 20221102 2022-11-07 08:48:00 +00:00
cmdstan treewide: switch to nativeCheckInputs 2023-01-21 12:00:00 +00:00
cmucl cmucl_binary: 21b -> 21d 2022-10-23 12:06:33 -03:00
colm
computecpp
cone
copper copper: mark as broken 2022-11-16 02:38:00 +00:00
crystal crystal: 1.7.1 -> 1.7.2 2023-01-28 13:32:43 +01:00
crystal2nix
cudatoolkit cudaPackages.cudaFlags: drop unused capabilitiesAndForward 2023-03-04 03:14:37 +02:00
dale treewide: switch to nativeCheckInputs 2023-01-21 12:00:00 +00:00
dasm
dev86 dev86: 0.16.21 -> unstable-2022-07-19 2023-02-11 14:05:13 -03:00
dictu
dmd dmd: revert "set --sysroot=/ to avoid cc-wrapper value" 2023-01-29 07:49:37 +00:00
dotnet dotnet-sdk_7: 7.0.102 -> 7.0.201 2023-03-07 02:55:27 +01:00
dtc dtc: fix dylib name on darwin 2022-08-17 15:15:46 +08:00
ecl treewide: mark packages broken that never built on PLATFORM 2022-12-13 21:40:12 +01:00
edk2 treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
eli treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
elm Merge master into haskell-updates 2023-03-08 00:13:50 +00:00
emscripten emscripten: backport support for binaryen 111 2023-01-17 13:43:46 -05:00
eql treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
factor-lang
fasm
fasmg
fbc fbc: init at 1.09.0 & 1.06-darwin-wip20160505 2022-10-26 19:12:44 +02:00
firrtl
flasm treewide: replace http by https when https is a permanent redirection 2023-01-22 02:46:49 +01:00
flutter treewide: switch to nativeCheckInputs 2023-01-21 12:00:00 +00:00
flux
fpc treewide: source .attrs in builders 2022-12-08 21:09:02 +02:00
fsharp
fstar fstar: use proper z3 version and build .checked files 2023-02-07 14:47:17 +00:00
gambit gambit: reenable stackprotector on aarch64-darwin 2022-09-04 10:19:14 -07:00
gavrasm gavrasm: 5.1 -> 5.4 2022-09-19 14:41:24 +00:00
gcc Merge pull request #219811 from trofi/gcc-cross-no-sys-includes 2023-03-11 20:49:25 +00:00
gcc-arm-embedded gcc-arm-embedded-12: support aarch64-darwin 2023-02-11 14:27:07 +08:00
gcl treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
gerbil treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
gforth treewide: optional -> optionals where the argument is a list 2022-10-10 15:40:21 +03:00
ghc Merge remote-tracking branch 'origin/master' into staging-next 2023-03-13 17:14:19 +00:00
ghcjs haskell.compiler.ghcjs: allow building with transformers-compat-0.7 2022-12-30 12:47:20 +01:00
ghdl treewide: optional -> optionals where the argument is a list 2022-10-10 15:40:21 +03:00
gleam gleam: 0.26.2 -> 0.27.0 2023-03-03 11:24:21 -05:00
glslang glslang: revert AppleClang linker option 2023-02-03 09:23:30 -03:00
gmqcc
gnatboot gnatboot: Add x86_64-darwin packages 2023-01-07 18:32:12 +11:00
gnostic gnostic: init at 0.6.8 2022-11-30 16:51:56 +00:00
gnu-cim gnu-cim: init at 5.1 2023-02-12 02:46:42 +01:00
gnu-cobol
gnu-smalltalk
go Merge branch 'master' into staging-next 2023-03-07 21:35:26 -08:00
go-jsonnet treewide: use hash instead of sha256 2023-01-24 12:55:52 +00:00
gprolog
graalvm/community-edition graalvm19-ce: init at 22.3.1 2023-02-22 10:47:02 +01:00
gwt treewide: replace http by https when https is a permanent redirection 2023-01-22 02:46:49 +01:00
halide halide: 14.0.0 -> 15.0.0 2023-03-09 07:27:26 +00:00
hare harePackages.hare: mark as broken on ARM64 2023-02-11 14:07:52 -03:00
haxe ocamlPackages.sha: 1.15.1 → 1.15.2 2022-12-15 08:08:35 +01:00
heptagon heptagon: init at 1.05.00 2022-10-06 09:31:41 +02:00
hip hip: 5.4.2 -> 5.4.3 2023-02-07 21:48:36 +00:00
hip-common rocm-related: 5.4.1 → 5.4.2 2023-01-18 16:59:22 -06:00
hipcc rocm-related: 5.4.1 → 5.4.2 2023-01-18 16:59:22 -06:00
hipify rocm-related: 5.4.1 → 5.4.2 2023-01-18 16:59:22 -06:00
hop
hvm hvm: 0.1.89 -> 1.0.0 2023-01-14 11:19:13 -05:00
idris2 treewide: switch to nativeCheckInputs 2023-01-21 12:00:00 +00:00
inform6
inform7 treewide: mark packages broken that never built on PLATFORM 2022-12-13 21:40:12 +01:00
inklecate inklecate: 1.0.0 -> 1.1.1 2022-12-31 14:54:03 -08:00
intel-graphics-compiler intel-graphics-compiler: 1.0.12504.5 -> 1.0.12812.26 2023-02-28 17:44:18 +01:00
intercal treewide: remove global with lib; statements in pkgs/development 2023-01-26 18:31:02 +01:00
ios-cross-compile treewide: source .attrs in builders 2022-12-08 21:09:02 +02:00
ispc ispc: Add aarch64-linux and aarch64-darwin platforms 2023-01-03 09:35:25 +01:00
jasmin treewide: replace http by https when https is a permanent redirection 2023-01-22 02:46:49 +01:00
jasmin-compiler jasmin-compiler: 2022.04.0 → 2022.09.0 2022-10-10 09:46:08 +02:00
javacard-devkit
jetbrains-jdk jetbrains.jdk: 17.0.5-b653.25 → 17.0.6-b829.5 2023-03-10 16:05:24 -06:00
jrsonnet jrsonnet: unbreak on darwin, add figsoda as a maintainer 2022-12-17 16:44:17 -05:00
jsonnet jsonnet: 0.19.0 -> 0.19.1 2022-10-28 20:24:24 +00:00
julia julia_19: 1.9.0-beta4 -> 1.9.0-rc1 2023-03-09 23:41:38 +08:00
juniper
jwasm jwasm: 2.15 -> 2.16 2022-11-15 11:16:20 -03:00
kaitai-struct-compiler
kind2 kind2: 0.2.79 -> 0.3.7 2023-01-27 13:53:47 -05:00
koka
kotlin kotlin-native: 1.8.0 -> 1.8.10 2023-02-08 10:19:51 +05:30
ldc ldc: 1.27.1 -> 1.30.0, change hashes to SRI format 2022-10-23 16:10:49 +02:00
ligo ligo: 0.59.0 -> 0.60.0 2023-02-20 11:03:39 +01:00
lingua-franca lingua-franca: incorrect verion bump 2022-09-20 00:16:50 +02:00
llvm Merge pull request #205176 from lopsided98/compiler-rt-armv6 2023-03-13 16:46:04 +00:00
lobster
manticore treewide: *Flags convert to list from str 2022-10-10 15:30:59 +03:00
marst marst,libidn2,mdk: remove duplicate /gnu in the url 2023-03-11 20:09:21 +02:00
matter-compiler
mcpp mcpp: 2.7.2 -> 2.7.2.1 2022-09-01 09:00:40 -03:00
mercury
meta-environment/meta-build-env
mezzo ocamlPackages.mezzo: fix build 2023-03-03 06:08:25 +00:00
microscheme
minimacy minimacy: 0.6.2 -> 0.6.4 2023-03-09 13:17:53 +01:00
mint
miranda treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
mit-scheme treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
mkcl mkcl: remove tohl from meta.maintainers list 2022-10-23 01:16:37 -03:00
mlkit mlkit: 4.7.2 -> 4.7.3 2023-03-04 14:24:13 +00:00
mlton
mono mono: cleanup 2022-11-28 01:55:12 +01:00
mosml
mozart mozart: add h7x4 as maintainer 2022-11-12 20:17:30 +01:00
mruby mruby: 3.1.0 -> 3.2.0 2023-02-25 11:33:48 +01:00
mrustc mrustc-bootstrap: pin to openssl_1_1 2022-09-11 23:28:36 +02:00
muonlang
myrddin myrddin: cleanup, add -j$NIX_BUILD_CORES to make 2022-10-14 14:02:07 +02:00
nasm nasm: 2.15.05 -> 2.16.01 2022-12-22 17:47:23 +01:00
neko treewide: use mbedtls 3 where possible 2022-12-07 19:58:55 +00:00
nextpnr nextpnr: 0.4 -> 0.5 2023-01-06 16:32:25 +01:00
nim nim: make gdb optional to fix aarch64-darwin build 2023-01-30 11:39:00 +00:00
nqc nqc: init at 3.1.r6 2022-10-23 15:51:10 +02:00
nvidia-cg-toolkit
obliv-c obliv-c: migrate to OCaml 4.14 2023-03-05 01:40:37 +02:00
ocaml ocaml: add framePointer option 2023-03-13 15:42:21 +01:00
odin
opa opa: migrate to OCaml 4.14 2023-03-08 03:42:54 +02:00
open-watcom wrapWatcom: Handle ARM-based hostPlatform 2023-01-30 15:18:41 +01:00
opendylan treewide: makeWrapper buildInputs to nativeBuildInputs 2022-08-16 13:14:19 +03:00
openjdk openjdk11: revert back to gnumake-4.4 as gnumake-4.4.1 breaks the build 2023-03-04 21:55:09 +00:00
openspin
ophis
oraclejdk
orc orc: fix build with gcc12 on aarch64-linux 2023-02-27 23:47:08 +02:00
osl openimageio: default to openimageio2, rename 1.x to openimageio_1 2023-01-05 20:26:49 +00:00
owl-lisp owl-lisp: 0.2 -> 0.2.1 2023-01-14 16:19:21 +00:00
p4c p4c: 1.2.3.5 -> 1.2.3.6 2023-02-09 23:18:18 +00:00
paco paco: use buildGoModule 2023-01-25 11:51:59 +00:00
pakcs
passerine
pforth
picat picat: 3.0p4 -> 3.3p3 2023-02-09 16:21:11 -06:00
polyml treewide: mark packages broken that never built on PLATFORM 2022-12-13 21:40:12 +01:00
ponyc pony-corral: 0.6.1 -> unstable-2023-02-11 2023-03-07 20:02:30 -03:00
purescript purescript: 0.15.7 -> 0.15.8 2023-03-10 17:14:31 +00:00
qbe qbe: 1.0 -> 1.1 2023-02-09 21:12:31 +00:00
rasm
reason treewide: add strictDeps = true to most packages depending on ocaml 2023-02-03 08:59:34 +01:00
rgbds treewide: env.NIX_CFLAGS_COMPILE use optionalString instead of optional 2023-02-22 21:23:05 +02:00
rml rml: init at 1.09.07 2022-11-25 18:02:39 +01:00
roslyn roslyn: update dependencies 2023-01-10 21:10:45 -08:00
rust rust: fix overriding rust flags on musl 2023-03-16 02:29:46 +00:00
sagittarius-scheme sagittarius-scheme: 0.9.8 -> 0.9.9 2022-09-09 17:56:04 +05:30
sbcl treewide: env.NIX_CFLAGS_COMPILE use toString on result of optionals 2023-02-22 21:23:05 +02:00
scala scala: fix updatescript evaluation 2023-02-23 21:27:01 -08:00
scala-runners
scryer-prolog scryer-prolog: replace patch with environment variable, clean up 2023-02-25 23:41:51 -05:00
sdcc treewide: remove global with lib; statements in pkgs/development 2023-01-26 18:31:02 +01:00
seexpr seexpr: fix path in pkg-config file 2022-09-07 21:49:33 +03:00
semeru-bin temurin-bin, semeru-bin: init at 17.0.3, adoptopenjdk-bin: remove 13, 14, 17 2022-09-12 16:29:36 +09:00
serpent
shaderc shaderc: 2021.0 -> 2022.4 2022-12-31 15:41:58 -08:00
silice silice: init at unstable-2022-08-05 2022-08-28 01:39:01 +02:00
sjasmplus
smlnj treewide: mark packages broken that never built on PLATFORM 2022-12-13 21:40:12 +01:00
solc treewide: use optionalString 2023-02-13 21:52:34 +01:00
souffle souffle: add darwin support (#208373) 2023-01-19 23:21:13 +01:00
spasm-ng
spirv-llvm-translator treewide: switch to nativeCheckInputs 2023-01-21 12:00:00 +00:00
squeak treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
stalin
stanc ocamlPackages treewide: strictDeps all packages 2023-02-03 08:59:34 +01:00
swi-prolog swiProlog: fix build with libxcrypt 2022-10-09 18:10:37 +02:00
swift treewide: use optionalString 2023-02-13 21:52:34 +01:00
temurin-bin Merge pull request #209089 from amjoseph-nixpkgs/pr/temurin-bin/powerpc64le 2023-01-06 20:33:42 +02:00
terra treewide: mark packages broken that never built on PLATFORM 2022-12-13 21:40:12 +01:00
teyjus treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
tinycc treewide: remove -ldl linker flags 2023-01-23 15:34:53 +00:00
tinygo treewide: switch to nativeCheckInputs 2023-01-21 12:00:00 +00:00
tvm tvm: 0.10.0 -> 0.11.0 2023-03-05 05:49:11 +00:00
uasm uasm: 2.55 -> 2.56.2 2023-02-03 21:13:36 +00:00
unison unison: M4c -> M4h 2023-03-05 11:37:11 +01:00
urn
urweb treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
vala vala: 0.56.3 → 0.56.4 2023-02-22 20:56:40 +01:00
vlang
vyper vyper: pythonRelaxDeps += [asttokens] 2022-10-28 22:38:41 -07:00
wcc
wla-dx
x11basic treewide: replace http by https when https is a permanent redirection 2023-01-22 02:46:49 +01:00
xa xa: 2.3.13 -> 2.3.14 2023-02-21 10:17:03 -03:00
yap treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
yasm
yosys yosys: 0.26 -> 0.27 2023-03-12 18:10:19 -05:00
z88dk treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
zasm
zig zig: build offline documentation 2023-03-05 13:56:53 -05:00
zulu zulu: 11.52.13 -> 11.62.17 and 8.48.0.53 -> 8.68.0.19 2023-01-23 20:00:06 -06:00
zz