diff options
author | John Ericson <Ericson2314@Yahoo.com> | 2017-04-26 00:06:11 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-06-22 17:52:28 -0400 |
commit | 121e7d9335187fa742abba7994e03b495b8f2a6c (patch) | |
tree | b01d37c11a9efaea9d0931a736bde002edb1fdbc /pkgs/build-support/gcc-cross-wrapper/default.nix | |
parent | 8a7433fca4d08ee6654df498e0f238f0dfab01be (diff) |
gcc-cross-wrapper: Remove in favor of newly-cross-supporting `cc-wrapper`
Diffstat (limited to 'pkgs/build-support/gcc-cross-wrapper/default.nix')
-rw-r--r-- | pkgs/build-support/gcc-cross-wrapper/default.nix | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/pkgs/build-support/gcc-cross-wrapper/default.nix b/pkgs/build-support/gcc-cross-wrapper/default.nix deleted file mode 100644 index 505d80a6b2acc..0000000000000 --- a/pkgs/build-support/gcc-cross-wrapper/default.nix +++ /dev/null @@ -1,65 +0,0 @@ -# The Nix `gcc' stdenv.mkDerivation is not directly usable, since it doesn't -# know where the C library and standard header files are. Therefore -# the compiler produced by that package cannot be installed directly -# in a user environment and used from the command line. This -# stdenv.mkDerivation provides a wrapper that sets up the right environment -# variables so that the compiler and the linker just "work". - -{ name ? "", stdenv, nativeTools, nativeLibc, noLibc ? false, nativePrefix ? "" -, gcc ? null, libc ? null, binutils ? null, shell ? "", cross -}: - -assert nativeTools -> nativePrefix != ""; -assert !nativeTools -> gcc != null && binutils != null; -assert !noLibc -> (!nativeLibc -> libc != null); - -let - chosenName = if name == "" then gcc.name else name; - gccLibs = stdenv.mkDerivation { - name = chosenName + "-libs"; - phases = [ "installPhase" ]; - installPhase = '' - echo $out - mkdir -p "$out" - - if [ -d "${gcc}/${cross.config}/lib" ] - then - cp -Rd "${gcc}/${cross.config}/lib" "$out/lib" - chmod -R +w "$out/lib" - for a in "$out/lib/"*.la; do - sed -i -e "s,${gcc}/${cross.config}/lib,$out/lib,g" $a - done - rm -f "$out/lib/"*.py - else - # The MinGW cross-compiler falls into this category. - mkdir "$out/lib" - fi - ''; - }; -in -stdenv.mkDerivation { - builder = ./builder.sh; - setupHook = ./setup-hook.sh; - gccWrapper = ./gcc-wrapper.sh; - ldWrapper = ./ld-wrapper.sh; - utils = ./utils.sh; - addFlags = ./add-flags; - inherit nativeTools nativeLibc nativePrefix gcc binutils; - libc = if libc ? out then libc.out else libc; - libc_dev = if libc ? dev then libc.dev else libc; - crossConfig = if cross != null then cross.config else null; - osxMinVersion = cross.osxMinVersion or null; - gccLibs = if gcc != null then gccLibs else null; - name = chosenName; - langC = if nativeTools then true else gcc.langC; - langCC = if nativeTools then true else gcc.langCC; - langF77 = if nativeTools then false else gcc ? langFortran; - shell = if shell == "" then stdenv.shell else shell; - meta = if gcc != null then gcc.meta else - { description = "System C compiler wrapper"; - }; - - passthru = { - target = cross; - }; -} |