summary refs log tree commit diff
path: root/pkgs/build-support/cc-wrapper
Commit message (Collapse)AuthorAge
* treewide: Depend on stdenv.cc.bintools instead of binutils directlyJohn Ericson2017-11-05
| | | | | One should do this when needed executables at build time. It is more honest and cross-friendly than refering to binutils directly.
* Get rid of most @rpath nonsense on DarwinDan Peebles2017-10-08
| | | | | | This requires some small changes in the stdenv, then working around the weird choice LLVM made to hardcode @rpath in its install name, and then lets us remove a ton of annoying workaround hacks in many of our Go packages. With any luck this will mean less hackery going forward.
* cc-wrapper: Clean up dynamic linking with x86 multilibJohn Ericson2017-09-28
| | | | | It's better layering to do everything in ld-wrapper. Also, use numeric comparisons for `relocatable`.
* cc-wrapper: Use stdenvNoCC to buildJohn Ericson2017-09-26
| | | | | | | | | | cc-wrapper may wrap a cc-compiler, but it doesn't need one to build itself. (c.f. expand-response-params is a separate derivation.) This helps avoid cycles on the cross stuff, in addition to removing a useless dependency edge. I could have been super careful with overrides in the stdenv to avoid the mass rebuild, but I don't think it's worth it.
* cc-wrapper: Add `set -x` tracing for NIX_DEBUG >= 7John Ericson2017-09-26
|
* treewide: Use `(( "${NIX_DEBUG:-0}" >= 1) ))` consistentlyJohn Ericson2017-09-26
|
* cc-wrapper, cc-wrapper-old: Simplify shell logicJohn Ericson2017-09-19
| | | | | | | | | | | | 1. `crossDrv` is now the default so we don't need to worry about that in build != host builds. 2. shell is the build time shell, so `wrapCCCross` doesn't need to worry, as build == host. 3. `shell.shellPath` will always be appended where useful. 4. Complicated `shell == ""` logic served no purpose.
* cc-wrapper: Use same dynamic loader on all Darwin, not just x86_64John Ericson2017-09-18
| | | | | In practice, this is correct because iOS is on ARM and puts the loader there.
* cc-wrapper: Remove obsolete assertionJohn Ericson2017-09-18
| | | | This was just causing evaluation problems on cross.
* Revert "Merge pull request #28557 from obsidiansystems/binutils-wrapper"Eelco Dolstra2017-09-07
| | | | | | | | | | This reverts commit 0a944b345e89ca0096974d168f49e1c6830c3fc2, reversing changes made to 61733ed6ccde3427016720f2e0cd191d3d95152c. I dislike these massive stdenv changes with unclear motivation, especially when they involve gratuitous mass renames like NIX_CC -> NIX_BINUTILS. The previous such rename (NIX_GCC -> NIX_CC) caused months of pain, so let's not do that again.
* binutils-wrapper: Import separately from cc-wrapperJohn Ericson2017-09-01
|
* binutils-wrapper: InitJohn Ericson2017-09-01
| | | | | | Factor a binutils wrapper out of cc-wrapper. While only LD is wrapped, the setup hook defines environment variables on behalf of other utilites.
* cc-wrapper: Use separate mangler for "bool" variablesJohn Ericson2017-09-01
| | | | This avoids any `NIX_FOOBAR=1 1` not triggering conditions.
* cc-wrapper: Pull variable mangler into utils.shJohn Ericson2017-09-01
| | | | In preparation for splitting out binutils-wrapper
* cc-wrapper: Clean up dynamic linking with x86 multilibJohn Ericson2017-09-01
| | | | It's better layering to do everything in ld-wrapper.
* cc-wrapper: Remove support for NIX_LDFLAGS_HARDENJohn Ericson2017-08-31
| | | | It has long been deprecated
* cc-wrapper: Remove {START,EXEC}_HOOKJohn Ericson2017-08-31
| | | | These are no longer used by anything
* mkDerivation, cc-wrapper: Check hardening flag validity in NixJohn Ericson2017-08-30
| | | | | | | | | This becomes necessary if more wrappers besides cc-wrapper start supporting hardening flags. Also good to make the warning into an error. Also ensure interface is being used right: Not as a string, not just in bash.
* cc-wrapper: Remove redundant hardeningJohn Ericson2017-08-30
| | | | | | GCC just passes `-z ...` flags to ld unaltered, and they are already passed to LD anyways. On the other hand, `-pie` affects gcc behavior too.
* darwin-CF: use @rpath for library id and add an rpath entry for CF based on ↵Daiderd Jordan2017-08-28
| | | | NIX_COREFOUNDATION_RPATH
* cc-wrapper: Leverage the setup script instead of `buildCommand`John Ericson2017-08-25
|
* cc-wrapper: Use `set -u` for better maintainabilityJohn Ericson2017-08-25
|
* expand-response-params: Build more normallyJohn Ericson2017-08-25
|
* expand-response-params: Pull out of cc-wrapperJohn Ericson2017-08-25
| | | | No hashes were changed
* Merge pull request #28521 from obsidiansystems/cc-wrapper-dead-codeDaniel Peebles2017-08-24
|\ | | | | cc-wrapper: Remove dead code
| * cc-wrapper: Remove dead codeJohn Ericson2017-08-23
| | | | | | | | | | | | | | ccPath is only defined below, so this condition would never be true. Worse, that's not quite true: what if somebody happend to have `/clang` and no sandboxing. Boy, wouldn't that be annoying to debug!
* | treewide: Consistently call ARM 'arm'Tuomas Tynkkynen2017-08-24
|/ | | | No need for silly differences.
* Merge remote-tracking branch 'upstream/master' into stagingJohn Ericson2017-08-21
|\ | | | | | | That way the tarball job succeeds
| * cc-wrapper: Remove unused paramsJohn Ericson2017-08-21
| | | | | | | | Ensured hashes unchanged and eval succeeds in tarball job
* | set +u workaround for empty arraysBojan Nikolic2017-08-21
|/ | | | | | libDirs can be empty, which in combination with "set -u" of 9f1e009975dc2d58541de435c74a26afe011542a will cause a variable unbound error on old bash versions
* cc-wrapper: don't export CPPDaiderd Jordan2017-08-16
| | | | | | | CPP defaults to $(CC) -E and setting it explicitly seems to cause issues in a number of packages like gcc and gdb. https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
* cc-wrapper: Improve `set -u` complianceJohn Ericson2017-08-14
|
* Merge branch 'master' into gcc-6Vladimír Čunát2017-08-12
|\
| * cc-wrapper: fix LD_DYLD_PATH on darwinDaiderd Jordan2017-08-10
| | | | | | | | | | | | | | Having multiple compilers in the build environment would result in an invalid LD_DYLD_PATH like /usr/lib/dyld/usr/lib/dyld. Since the path is hardcoded in XNU it can't be anything but /usr/lib/dyld anyway.
| * cc-wrapper: Fix support for qtbase-setup-hookOrivej Desh2017-08-09
| | | | | | | | | | Revert https://github.com/NixOS/nixpkgs/pull/27657#issuecomment-318161946 due to https://github.com/NixOS/nixpkgs/pull/28021#issuecomment-321045542
| * cc-wrapper: Fix standalone ldOrivej Desh2017-08-08
| |
| * cc-wrapper: Fix standalone gccOrivej Desh2017-08-08
| | | | | | | | | | This ensures that all salted variables are defined even if the wrapped program is invoked outside nix-build environment.
| * cc-wrapper: Fix adding directories to rpathOrivej Desh2017-08-08
| | | | | | | | | | | | This fixes a bug introduced in #27831: `for path in "$dir"/lib*.so` assumed that all libs match `lib*.so`, but 07674788d6932fe702117649b4cd16512d2da8a9 started adding libs that match `*.so` and `*.so.*`.
| * Revert "cc-wrapper: fix set -u errors"Robin Gloster2017-08-08
| | | | | | | | | | | | This reverts commit 67a41eafe9c92269c9f6788f5f54a4b0d282cb96. see #28021 for discussion
| * cc-wrapper: fix set -u errorsRobin Gloster2017-08-08
| | | | | | | | cc @Ericson2314
| * cc-wrapper: Don't slurp `NIX_DONT_SET_RPATH` twiceJohn Ericson2017-08-07
| | | | | | | | | | Otherwise we end with a definition like `1 1`, which doesn't trigger the right conditional.
| * cc-wrapper: Use `set -u` throughoutJohn Ericson2017-08-07
| | | | | | | | | | | | Now is an opportune time to do this, as the infixSalt conversion in `add-flags.sh` ensures that all the relevant `NIX_*` vars will be defined even if empty.
| * cc-wrapper: Make hygienicJohn Ericson2017-08-07
| | | | | | | | See the added comments for what exactly has been done.
| * cc-wrapper: Unconditionally use @infixSalt@ accross the boardJohn Ericson2017-08-07
| | | | | | | | | | | | | | | | | | This is basically a sed job, in preparation of the next commit. The rules are more or less: - s"NIX_(.._WRAPPER_)?([a-zA-Z0-9@]*)"NIX_\1@infixSalt@_\2"g - except for non-cc-wrapper-specific vars like `NIX_DEBUG`
| * cc-wrapper: Stop preWrappingJohn Ericson2017-08-07
| | | | | | | | | | | | This is an ugly temp hack for cross compilation, but now we have something better on the way. Bind `infixSalt` as an environment variable as it will be used in it.
| * Merge branch 'master' into stagingVladimír Čunát2017-08-06
| |\ | | | | | | | | | Let's drop i686-linux here as well.
| | * Merge PR #27536John Ericson2017-08-03
| | |\
| | | * cc-wrapper: Don't hardcode MacOS min version for delegatesJohn Ericson2017-08-03
| | | |
| | | * cc-wrapper: Handle more -l.... gotchasJohn Ericson2017-08-03
| | | |
| | | * cc-wrapper: Make sure symbol tables of child delegators is not emptyJohn Ericson2017-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described in https://github.com/NixOS/nixpkgs/issues/18461, MacOS no longer accepts dylibs which only reexport other dylibs, because their symbol tables are empty. To get around this, we define an object file with a single "private extern" symbol, which hopefully won't clobber anything.