summaryrefslogtreecommitdiff
path: root/pkgs/build-support/wrapper-common (follow)
Commit message (Expand)AuthorAgeFilesLines
* wrapBintoolsWith: support LINK.EXE-style args in purity checks•••LLD supports Windows-style linker arguments, but these previously triggered purity check false positives, because it saw that they started with a '/' and assumed they were paths. This tweaks the path detection to allow through certain values that could be paths, but are much more likely to be LINK.EXE-style flags. The risk of false negatives here is low — the only things we'd now fail to catch would be attempts to link with libraries in the root directory, which doesn't happen in practice. We also teach the wrapper how to apply its purity checks to library paths specified with the /LIBPATH: option. Tested that paths we expect to be rejected (like /lib/libfoo.so) still are. Alyssa Ross2023-04-291-1/+6
* build-support: Quote expansions inside `${…}`•••As per ShellCheck: > SC2295 (info): Expansions inside ${..} need to be quoted separately, > otherwise they match as patterns. Victor Engmark2022-12-021-7/+7
* Quote variable references (#144838)•••* pkgs/build-support: Quote variable name * pkgs/build-support: Quote variable reference * pkgs/build-support: Quote variable references Leads to a minor behavior change: there's no trailing space in the output when `[[ "$linkType" == "static-pie" ]]` is true.Victor Engmark2021-11-091-7/+7
* pkgs/build-support: Remove unused local variableVictor Engmark2021-11-091-1/+1
* Merge pull request #123989 from Mic92/static-pie•••glibc: allow to build position-independent static executableJörg Thalheim2021-05-251-0/+35
|\
| * cc-wrapper: don't set rpath on static-pie executablesJörg Thalheim2021-05-231-0/+35
* | pkg-config-wrapper: mangle PKG_CONFIG_PATH{,_FOR_BUILD} correctly•••Previously, mangleVarList would be used which would concatenate the variables using a space as a separator. Paths are however separated by `:` in PKG_CONFIG_PATH leading to entries being broken. This is fixed by introducing mangleVarListGeneric which allows us to specify the desired separator. Reproducer for the issue prior to this change: $ nix-shell -A pkgsLLVM.wayland [nix-shell] $ pkg-config --libs expat Package expat was not found in the pkg-config search path. Perhaps you should add the directory containing `expat.pc' to the PKG_CONFIG_PATH environment variable No package 'expat' found $ printf 'Host: %s\nBuild: %s' $PKG_CONFIG_PATH $PKG_CONFIG_PATH_FOR_BUILD Host: /nix/store/5h308a4ab8w7prcp8iflh5pnl78mayi2-expat-2.2.10-x86_64-unknown-linux-gnu-dev/lib/pkgconfig:/nix/store/z3y9ska2h4l1map25m195iq577g7g3gz-libxml2-x86_64-unknown-linux-gnu-2.9.12-dev/lib/pkgconfig:/nix/store/lbz5m1s0r7zn0cxvl21czfspli6ribzb-zlib-1.2.11-x86_64-unknown-linux-gnu-dev/lib/pkgconfig:/nix/store/rfhvp8r8n3ygpzh8j0l34lk8hwwi3z0h-libffi-3.3-x86_64-unknown-linux-gnu-dev/lib/pkgconfig Build: /nix/store/dw11ywy7qwfz53qisz0dggbgix88jah2-wayland-1.19.0-bin/lib/pkgconfig strace reveals the issue: stat("/nix/store/dw11ywy7qwfz53qisz0dggbgix88jah2-wayland-1.19.0-bin/lib/pkgconfig /nix/store/5h308a4ab8w7prcp8iflh5pnl78mayi2-expat-2.2.10-x86_64-unknown-linux-gnu-dev/lib/pkgconfig/expat-uninstalled.pc", 0x7fff49829fa0) = -1 ENOENT (No such file or directory) In the pkg-config wrapper $PKG_CONFIG_PATH_FOR_BUILD and $PKG_CONFIG_PATH are concatenated with a space which leads to two paths being messed up. This issue likely only affects native cross compilation. sternenseemann2021-05-181-2/+8
|/
* cc-wrapper, bintools-wrapper: support MACOSX_DEPLOYMENT_TARGET with roles•••In a typical build environment the toolchain will use the value of the MACOSX_DEPLOYMENT_TARGET environment variable to determine the version of macOS to support. When cross compiling there are two distinct toolchains, but they will look at this single environment variable. To avoid contamination, we always set the equivalent command line flag which effectively disables the toolchain's internal handling. Prior to this change, the MACOSX_DEPLOYMENT_TARGET variable was ignored, and the toolchains always used the Nix platform definition (`darwinMinVersion`) unless overridden with command line arguments. This change restores support for MACOSX_DEPLOYMENT_TARGET, and adds nix-specific MACOSX_DEPLOYMENT_TARGET_FOR_BUILD and MACOSX_DEPLOYMENT_TARGET_FOR_TARGET for cross compilation. Andrew Childs2021-04-111-0/+29
* Merge #97597: stdenv wrappers: improve purity checkingVladimír Čunát2020-09-241-3/+7
|\
| * Accept $TMP, $TMPDIR, $TEMP, and $TEMPDIR paths in purity checkTyson Whitehead2020-09-101-3/+7
* | Revert "utils.bash: revert #93560 for darwin, unblocks channels"•••Revert the hack and the original faulty commit. This reverts commit 48264ee506105a2f5e61e5d327599e9f301bd77f. Revert "Purity checking should accept $TMP and not just /tmp" This reverts commit fb777be7d2925ec0e97783ce5e3a0136361dc0a8. Frederik Rietdijk2020-09-062-95/+3
|/
* utils.bash: revert #93560 for darwin, unblocks channels•••Temporary fix. We definitely do not want to have two separate implementations. Frederik Rietdijk2020-09-061-0/+92
* Purity checking should accept $TMP and not just /tmpTyson Whitehead2020-09-041-3/+3
* *-wrapper; Switch from `infixSalt` to `suffixSalt`•••I hate the thing too even though I made it, and rather just get rid of it. But we can't do that yet. In the meantime, this brings us more inline with autoconf and will make it slightly easier for me to write a pkg-config wrapper, which we need. John Ericson2020-05-121-16/+16
* utils.bash: allow response files in bootstrapping•••llvm uses response files in bootstrapping. It’s okay for them to happen even though we don’t use expandResponseParams here right now. Matthew Bauer2019-04-201-3/+0
* {bintools,cc}-wrapper: Factor out role accumulation logicJohn Ericson2018-05-071-0/+95