Commit Graph

149 Commits

Author SHA1 Message Date
Dan Peebles
0a23d430bf stdenv-darwin: fix to work with multiple outputs 2016-02-13 15:48:22 -05:00
Vladimír Čunát
ae74c356d9 Merge recent 'staging' into closure-size
Let's get rid of those merge conflicts.
2016-02-03 16:57:19 +01:00
Anthony Cowley
d96893647d cc-wrapper: fix on darwin
The ld-wrapper.sh script calls `readlink` in some circumstances. We need
to ensure that this is the `readlink` from the `coreutils` package so
that flag support is as expected.

This is accomplished by explicitly setting PATH at the top of each shell
script.

Without doing this, the following happens with a trivial `main.c`:

```
nix-env -f "<nixpkgs>" -iA pkgs.clang
$ clang main.c -L /nix/../nix/store/2ankvagznq062x1gifpxwkk7fp3xwy63-xnu-2422.115.4/Library -o a.out
readlink: illegal option -- f
usage: readlink [-n] [file ...]
```

The key element is the `..` in the path supplied to the linker via a
`-L` flag. With this patch, the above invocation works correctly on
darwin, whose native `/usr/bin/readlink` does not support the `-f` flag.

The explicit path also ensures that the `grep` called by `cc-wrapper.sh`
is the one from Nix.

Fixes #6447
2016-01-19 17:47:11 -05:00
Vladimír Čunát
716aac2519 Merge branch 'staging' into closure-size 2016-01-19 09:55:31 +01:00
Dan Peebles
edaf46fb64 stdenv-darwin: add parent attribute to bootstrap
This makes it far easier than before to hit/test early stages of the
stdenv bootstrap.
2016-01-16 14:54:11 -05:00
Dan Peebles
0313b2e09c stdenv-darwin: allow easier testing of bootstrap tools
This un-hardcodes the bootstrap tools passed into the Darwin stdenv and
thus allows us to quickly iterate on improving the design of the full
bootstrap process. We can easily change the contents of the bootstrap
tools and evaluate an entire bootstrap all the way up to real packages.
2016-01-03 21:47:09 -05:00
Dan Peebles
88c41e1f95 stdenv-darwin: rename folder and associated attribute
No point in calling it pure-darwin anymore. It's the only stdenv we have
2016-01-03 21:08:40 -05:00
Dan Peebles
01b0b3cec0 stdenv-darwin: kill old impure Darwin stdenv
I'll be moving the other one over it next commit (I split it into two to
improve git's rename detection)
2016-01-03 21:06:24 -05:00
Vladimír Čunát
99e4371526 curl: split into multiple outputs
Also use pkgconfig to be safer and fix (some) referrers.
2015-10-13 20:18:48 +02:00
Vladimír Čunát
17a3f6a6fa icu: split into multiple outputs 2015-10-13 20:18:44 +02:00
Drew Hess
3c8b92f4b3 Workaround for getcwd configure test on 10.11.
See https://openradar.appspot.com/22671534 for a description of the
problem.
2015-09-23 14:41:41 -07:00
Jude Taylor
14d83e9565 add gnused to impure darwin stdenv 2015-06-19 22:08:01 -07:00
Eelco Dolstra
d72538be8d Don't include /no-such-path in buildInputs 2015-06-15 19:26:52 +02:00
Eric Seidel
395829686d add is{GNU,Clang} attrs to cc-wrapper.
These will be more pleasant to use than the existing

    (cc.cc.isClang or false)

nonsense we currently do.
2015-05-11 14:39:36 -07:00
William A. Kennington III
767c179a94 Merge branch 'master' into staging 2015-03-26 14:44:05 -07:00
Eric Seidel
7f5367c69d darwin: add apple cli-tools to initialPath so we can handle overrideCC
fixes #6934
2015-03-24 17:33:27 -07:00
Thomas Tuegel
8fd5dd89ac Merge branch 'master' into staging 2015-03-24 17:49:30 -05:00
Eelco Dolstra
d3756e162c stdenv-darwin: Auto-detect the "right" SDK version 2015-03-23 16:46:41 +01:00
Eelco Dolstra
ead7762573 stdenv-darwin: Use --sdk macosx10.9
Otherwise builds fail on Mac OS X 10.9 with Xcode 6.1. This is because
"xcrun --show-sdk-version" returns 10.10, which doesn't work.
2015-03-23 16:04:37 +01:00
Eelco Dolstra
a89c14dc3c No camelCase in filenames 2015-03-23 12:03:01 +01:00
Eelco Dolstra
8470b03db2 Remove unused file 2015-03-23 12:02:13 +01:00
Eric Seidel
3ea2aa4136 stdenv/darwin: choose sdkroot based xcrun default 2015-03-04 21:36:09 -08:00
Joel Taylor
ec019485d6 Revert "Fix building on Xcode"
This reverts commit dad86b4f54.
2015-03-01 20:19:36 -08:00
Eelco Dolstra
dad86b4f54 Fix building on Xcode
92188d9d17 broke the case where the user
has Xcode but not the command-line tools. So this commit restores
using xcrun to get the path to the SDK (falling back to / for the
non-Xcode case).

http://hydra.nixos.org/build/19953295
2015-02-24 17:07:44 +01:00
Dan Peebles
025f87f79a Bootstrap tools for the upcoming new darwin stdenv (not working yet in this stdenv, but will soon) 2015-02-18 00:24:34 -05:00
Dan Peebles
ecf662efc6 Flip cctools and cctools cross 2015-02-18 00:24:33 -05:00
Eric Seidel
4a467ec02b move libcxx[abi] into llvm tree 2015-02-03 14:58:10 -08:00
Eric Seidel
92188d9d17 new darwin stdenv 2015-02-03 14:05:22 -08:00
Eric Seidel
48f63c2f2e rename gcc-wrapper to cc-wrapper.
also makes cc-wrapper compatible with clang in the darwin fork.
2015-01-14 20:26:56 -08:00
Daniel Peebles
8df8943b92 I think this should fix the evaluation errors in hydra 2014-12-27 12:02:58 -05:00
Eelco Dolstra
e575d739da Set SDKROOT etc. in stdenvNative
Fixes a build failure in gawk with Xcode 6.1 on 10.9.
2014-11-04 16:35:13 +01:00
Eelco Dolstra
899d81b37b Set MACOSX_DEPLOYMENT_TARGET to 10.9
This makes stuff build with Xcode 6.1 on Mac OS X 10.9 (where we got
errors like "ld: file not found:
/usr/lib/system/libsystem_coreservices.dylib for architecture x86_64" due to the use of the 10.10 SDK).
2014-11-04 13:28:31 +01:00
Eelco Dolstra
9a979af1d3 stdenv-darwin: Revert to clang 3.3
In 3.3, a C++ class defined in a header will get a typeinfo symbol
like this (e.g. in Nix's src/libutil/util.o):

  (__DATA,__datacoal_nt) weak external typeinfo for nix::BaseError

But in 3.4, this has changed to:

  (__DATA,__datacoal_nt) weak external automatically hidden typeinfo for nix::BaseError

This causes the linker to change the symbol to:

  (__DATA,__data) non-external (was signed char private external) typeinfo for nix::BaseError

i.e. losing its weak linkage. But without weak linkage, dynamic_cast
and other RTTI-based mechanisms (such as catching an exception of a
certain type) don't work across shared libraries / executables.

The clang compiler in the SDK doesn't have this behaviour, but it's
not clear exactly which version it is (it just says "based on LLVM
3.4svn").
2014-10-15 01:15:31 +02:00
Eelco Dolstra
7aacca25df stdenv-darwin: Pass through libcxx/libcxxabi 2014-10-14 16:36:44 +02:00
Eelco Dolstra
79d0d7b437 Unify gcc-wrapper and clang-wrapper 2014-10-11 22:26:39 +02:00
Eelco Dolstra
250c7682e1 Remove broken libunwindNative package
Copying /usr/lib/system/libunwind.dylib at evaluation time doesn't
work (e.g. on Hydra). And copying binary system libraries is a bad
idea anyway for license reasons.
2014-09-29 19:58:09 +02:00
Eelco Dolstra
1e6dfdf29c clang-wrapper: Remove explicit dependency on libc++
Now libc++ is just another build input propagated from clang-wrapper.
2014-09-24 17:55:05 +02:00
Eelco Dolstra
84a586fa9e stdenvDarwin: Do not wrap clang twice 2014-09-24 16:54:43 +02:00
Joel Taylor
fa9b1f9cda build nix head successfully 2014-09-09 13:54:57 -07:00
Joel Taylor
2e26f7bef1 livcxx build 2014-09-09 13:54:25 -07:00
Joel Taylor
7da056233f wip libc++ 2014-09-09 13:54:25 -07:00
Joel Taylor
3e8344d334 suitable clang stdenv 2014-09-09 13:54:24 -07:00
Eelco Dolstra
1d49f0daff * Renamed the darwin stdenv to powerpc-darwin, since i686-darwin uses stdenv/nix.
svn path=/nixpkgs/branches/stdenv-updates-merge/; revision=10812
2008-02-21 17:25:10 +00:00
Eelco Dolstra
e7570bb9cf * Don't strip all symbols from $out/bin by default, since it makes
stack traces impossible.
* When stripping all symbols on Darwin, don't use the "-s" flag
  since it has a completely different meaning (it takes an argument 
  specifying a file containing a list of symbols).

svn path=/nixpkgs/branches/stdenv-updates-merge/; revision=10809
2008-02-21 16:20:51 +00:00
Eelco Dolstra
01fbf62a2c * nativeGlibc -> nativeLibc (gcc-cross-wrapper is probably broken
right now; should merge gcc-wrapper changes).

svn path=/nixpkgs/trunk/; revision=6876
2006-10-27 13:44:17 +00:00
Eelco Dolstra
03aef934d1 * Fix "infinite recursion" errors on FreeBSD and Darwin.
svn path=/nixpkgs/branches/usability/; revision=4997
2006-03-08 15:34:05 +00:00
Eelco Dolstra
5a00ba432c * Don't strip debug info on Darwin, otherwise links by libtool fail
("/usr/bin/ld: can't use -s with -r (resulting file would not be
  relocatable)").
* Since stdenv/generic had to be modified for this, I forked it in
  situ.  This should be merged later.

svn path=/nixpkgs/trunk/; revision=1121
2004-07-02 10:05:53 +00:00
Eelco Dolstra
770e57d27c * Don't apply the libtool fix in Darwin, since it's not a pure build
environment.

svn path=/nixpkgs/trunk/; revision=1119
2004-07-01 16:56:19 +00:00
Eelco Dolstra
1b47486557 * Darwin (Mac OS X) standard environment.
svn path=/nixpkgs/trunk/; revision=1031
2004-05-18 10:59:18 +00:00