diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-05-21 19:50:12 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-05-23 09:22:19 -0400 |
commit | 266adab32d55f1272e95e9aae8c6ee2bab3f0570 (patch) | |
tree | 7fcf1e5b853d464fbee472cbfd3980c0f8eb0eb4 /pkgs/os-specific/darwin/cctools | |
parent | 5f1ec8e6d91483c9360de1ce341c09946417f317 (diff) | |
download | nixpkgs-266adab32d55f1272e95e9aae8c6ee2bab3f0570.tar nixpkgs-266adab32d55f1272e95e9aae8c6ee2bab3f0570.tar.gz nixpkgs-266adab32d55f1272e95e9aae8c6ee2bab3f0570.tar.bz2 nixpkgs-266adab32d55f1272e95e9aae8c6ee2bab3f0570.tar.lz nixpkgs-266adab32d55f1272e95e9aae8c6ee2bab3f0570.tar.xz nixpkgs-266adab32d55f1272e95e9aae8c6ee2bab3f0570.tar.zst nixpkgs-266adab32d55f1272e95e9aae8c6ee2bab3f0570.zip |
cctools: Remove a bunch of stuff no longer needed for Linux
Diffstat (limited to 'pkgs/os-specific/darwin/cctools')
-rw-r--r-- | pkgs/os-specific/darwin/cctools/port.nix | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index d8abdc2c6f8..dbe8bda5e1e 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub, makeWrapper, autoconf, automake, libtool_2, autoreconfHook -, llvm, libcxx, libcxxabi, clang, libuuid -, libobjc ? null, maloader ? null, xctoolchain ? null +, libcxx, libcxxabi, libuuid +, libobjc ? null, maloader ? null , hostPlatform, targetPlatform , enableDumpNormalizedLibArgs ? false }: @@ -22,7 +22,7 @@ let in # Non-Darwin alternatives -assert (!hostPlatform.isDarwin) -> (maloader != null && xctoolchain != null); +assert (!hostPlatform.isDarwin) -> maloader != null; assert enableDumpNormalizedLibArgs -> (!useOld); @@ -57,8 +57,6 @@ let autoreconfHook ]; buildInputs = [ libuuid ] ++ - # Only need llvm and clang if the stdenv isn't already clang-based (TODO: just make a stdenv.cc.isClang) - stdenv.lib.optionals (!stdenv.isDarwin) [ llvm clang ] ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ]; patches = [ @@ -80,9 +78,6 @@ let # TODO(@Ericson2314): Always pass "--target" and always targetPrefix. configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; - configureFlags = stdenv.lib.optionals (!stdenv.isDarwin) [ - "CXXFLAGS=-I${libcxx}/include/c++/v1" - ]; postPatch = '' sed -i -e 's/addStandardLibraryDirectories = true/addStandardLibraryDirectories = false/' cctools/ld64/src/ld/Options.cpp @@ -108,8 +103,6 @@ let # include_next "unistd.h" #endif EOF - '' + stdenv.lib.optionalString (!stdenv.isDarwin) '' - sed -i -e 's|clang++|& -I${libcxx}/include/c++/v1|' cctools/autogen.sh '' + stdenv.lib.optionalString useOld '' cd cctools ''; @@ -128,21 +121,12 @@ let popd ''; - postInstall = - if hostPlatform.isDarwin - then '' - cat >$out/bin/dsymutil << EOF - #!${stdenv.shell} - EOF - chmod +x $out/bin/dsymutil - '' - else '' - for tool in dyldinfo dwarfdump dsymutil; do - ${makeWrapper}/bin/makeWrapper "${maloader}/bin/ld-mac" "$out/bin/${targetPlatform.config}-$tool" \ - --add-flags "${xctoolchain}/bin/$tool" - ln -s "$out/bin/${targetPlatform.config}-$tool" "$out/bin/$tool" - done - ''; + postInstall = '' + cat >$out/bin/dsymutil << EOF + #!${stdenv.shell} + EOF + chmod +x $out/bin/dsymutil + ''; passthru = { inherit targetPrefix; |