1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00
nixpkgs/pkgs/build-support
Randy Eckenrode 6f2b3ba027 cc-wrapper: use a temporary file for reponse file
The Darwin stdenv rework conditionally sets `NIX_CC_USE_RESPONSE_FILE`
depending on the `ARG_MAX` of the build system. If it is at least 1 MiB,
the stdenv passes the arguments on the command-line (like Linux).
Otherwise, it falls back to the response file. This was done to prevent
intermitent failures with clang 16 being unable to read the response
file. Unfortunately, this breaks `gccStdenv` on older Darwin platforms.

Note: While the stdenv logic will also be reverted, this change is
needed for compatibility with clang 16.

GCC is capable of using a response file, but it does not work correctly
when the response file is a file descriptor. This can be reproduced
using the following sequence of commands:

    $ nix shell nixpkgs#gcc; NIX_CC_USE_RESPONSE_FILE=1 gcc
    # Linux
    /nix/store/9n9gjvzci75gp2sh1c4rh626dhizqynl-binutils-2.39/bin/ld: unrecognized option '-B/nix/store/vnwdak3n1w2jjil119j65k8mw1z23p84-glibc-2.35-224/lib/'
    /nix/store/9n9gjvzci75gp2sh1c4rh626dhizqynl-binutils-2.39/bin/ld: use the --help option for usage information
    collect2: error: ld returned 1 exit status
    # Darwin
    ld: unknown option: -mmacosx-version-min=11.0
    collect2: error: ld returned 1 exit status

Instead of using process substitution, create a temporary file and
remove it in a trap. This should also prevent the intermitent build
failures with clang 16 on older Darwin systems.

Fixes #245167
2023-08-01 10:32:56 +02:00
..
add-opengl-runpath
agda
alternatives lapack: force a rebuild on x86_64-darwin 2023-03-24 08:57:05 +01:00
appimage tree-wide: buildFHSUserEnv -> buildFHSEnv 2023-04-16 10:15:13 +02:00
binary-cache binary-cache: use lib.makeBinPath 2023-06-30 00:42:14 +02:00
bintools-wrapper Merge pull request #239624 from Stunkymonkey/use-optionalString-then 2023-07-22 13:02:47 +02:00
build-bazel-package bazel_5: 5.4.0->5.4.1 2023-05-10 16:09:19 +02:00
build-fhsenv-bubblewrap buildFHSEnv: disable multiArch by default 2023-07-07 21:33:04 +02:00
build-fhsenv-chroot buildFHSEnv: use default values as fallback for XDG_DATA_DIRS 2023-05-08 18:56:51 -03:00
build-graalvm-native-image buildGraalvmNativeImage: allow overwriting {build,install}Phase/nativeBuildInputs 2023-03-17 16:50:52 +00:00
build-setupcfg
buildenv buildenv: Limit exclusion of info/dir 2023-07-09 22:06:26 -04:00
cc-wrapper cc-wrapper: use a temporary file for reponse file 2023-08-01 10:32:56 +02:00
coq treewide: deprecate isNull 2023-03-06 22:40:04 +01:00
dart buildDartApplication: add sigtool on darwin 2023-06-14 22:29:01 +03:00
deterministic-uname
dhall
docker treewide: use optionalString instead of 'then ""' 2023-06-24 20:19:19 +02:00
dotnet nuget-to-nix: set nullglob 2023-06-24 19:13:16 -03:00
emacs treewide: use optionalAttrs instead of 'else {}' 2023-06-25 11:01:34 -03:00
expand-response-params
fake-nss
fetchbitbucket treewide: Make some fetchers overridable 2023-04-22 22:29:23 +02:00
fetchbower
fetchbzr fetchbzr: set cache directory to tmpdir 2023-03-01 04:20:00 +00:00
fetchcvs treewide: Make some fetchers overridable 2023-04-22 22:29:23 +02:00
fetchdarcs fetchdarcs: clean up md5 references 2023-07-20 21:24:13 -07:00
fetchdocker treewide: don't hardcode /nix/store (no rebuilds changes) 2023-03-24 20:11:33 +02:00
fetchfirefoxaddon fetchfirefoxaddon: make reproducible 2023-06-10 01:05:20 -04:00
fetchfossil
fetchgit Merge master into staging-next 2023-07-21 06:01:05 +00:00
fetchgitea treewide: Make some fetchers overridable 2023-04-22 22:29:23 +02:00
fetchgithub treewide: use optionalString instead of 'then ""' 2023-06-24 20:19:19 +02:00
fetchgitiles treewide: Make some fetchers overridable 2023-04-22 22:29:23 +02:00
fetchgitlab treewide: Make some fetchers overridable 2023-04-22 22:29:23 +02:00
fetchgitlocal treewide: Make some fetchers overridable 2023-04-22 22:29:23 +02:00
fetchgx
fetchhg fetchhg: clean up md5 references 2023-07-20 21:24:13 -07:00
fetchipfs
fetchmavenartifact fetchMavenArtifact: deprecate phases & use pname+version 2023-03-26 18:44:55 +02:00
fetchmtn
fetchnextcloudapp
fetchpatch fetchpatch: add decode test 2023-03-11 21:39:29 +00:00
fetchpijul build-support: Add fetchpijul function. 2023-07-17 18:44:06 +02:00
fetchpypi
fetchrepoorcz
fetchrepoproject
fetchs3
fetchsavannah treewide: Make some fetchers overridable 2023-04-22 22:29:23 +02:00
fetchsourcehut fetchFromSourcehut: expose gitRepoUrl to consumers 2023-06-11 09:02:34 +01:00
fetchsvn fetchsvn: clean up md5 references 2023-07-20 21:24:07 -07:00
fetchsvnrevision
fetchsvnssh fetchsvnssh: clean up md5 references 2023-07-20 21:24:13 -07:00
fetchurl fetchurl: clean up md5 references 2023-07-20 21:23:04 -07:00
fetchzip
flutter flutter: build-support: allow customizing wrapProgram args 2023-05-14 17:10:49 +02:00
go treewide .goModules: revert renaming the derivation 2023-07-24 08:15:48 +02:00
icon-conv-tools
install-shell-files
java
kernel Merge pull request #239624 from Stunkymonkey/use-optionalString-then 2023-07-22 13:02:47 +02:00
libredirect
make-darwin-bundle
make-desktopitem treewide: deprecate isNull 2023-03-06 22:40:04 +01:00
make-hardcode-gsettings-patch
make-pkgconfigitem
make-startupitem
mkshell mkShell: set preferLocalBuild by default 2023-02-22 11:53:51 +01:00
mono-dll-fixer
nix-gitignore Merge pull request #239624 from Stunkymonkey/use-optionalString-then 2023-07-22 13:02:47 +02:00
node Merge pull request #223457 from lilyinstarlight/fix/fetch-yarn-deps-pulsar 2023-07-16 20:24:16 -04:00
nuke-references
ocaml ocamlPackages: default to version 3 of Dune 2023-05-12 05:50:40 +02:00
oci-tools
pkg-config-wrapper treewide: use optionalAttrs instead of 'else {}' 2023-06-25 11:01:34 -03:00
portable-service
prefer-remote-fetch
references-by-popularity
release treewide: use optionalAttrs instead of 'else {}' 2023-06-25 11:01:34 -03:00
remove-references-to Merge pull request #162447 from thefloweringash/remove-references-to-region 2023-05-17 12:34:28 +03:00
replace-secret
rust Merge pull request #239624 from Stunkymonkey/use-optionalString-then 2023-07-22 13:02:47 +02:00
setup-hooks makeWrapper: fix flag handling 2023-06-11 23:14:54 +03:00
singularity-tools
snap
src-only nixos/tests: Test that Remote SSH can patch Node 2023-06-09 18:21:41 +10:00
substitute
substitute-files
templaterpm
testers runNixOSTest: adds support for lib.extend 2023-06-29 09:13:44 -07:00
trivial-builders runCommand: don't set meta.position if meta is given 2023-07-07 19:12:35 +02:00
vm Merge pull request #239624 from Stunkymonkey/use-optionalString-then 2023-07-22 13:02:47 +02:00
wrapper-common wrapBintoolsWith: support LINK.EXE-style args in purity checks 2023-04-29 01:37:00 +00:00
writers writers.makePythonWriter: fix interpreter executable 2023-06-17 22:58:14 +03:00
build-maven.nix
build-pecl.nix
closure-info.nix
make-impure-test.nix
plugins.nix
replace-dependency.nix replaceDependency: use runCommandLocal 2023-03-01 14:36:49 +02:00
setup-systemd-units.nix
source-from-head-fun.nix