diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-03-12 09:45:14 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-03-12 09:45:14 +0000 |
commit | adcc6d41026c31423879d720ce0b909c4dc13e6c (patch) | |
tree | 60d599f9f49c54d952a5dd46f8f825c3791f8e9e /pkgs/build-support/gcc-cross-wrapper | |
parent | 9d125d64bf6246f9525d8ffd1f5019f59d4abaa3 (diff) |
gcc-cross-wrapper-libs: Gracefully deal with non-existent /TRIPLET/lib dir.
This fixes the cross-MinGW environment. svn path=/nixpkgs/trunk/; revision=33010
Diffstat (limited to 'pkgs/build-support/gcc-cross-wrapper')
-rw-r--r-- | pkgs/build-support/gcc-cross-wrapper/default.nix | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/pkgs/build-support/gcc-cross-wrapper/default.nix b/pkgs/build-support/gcc-cross-wrapper/default.nix index ab879c1841fc0..be071607d8bd6 100644 --- a/pkgs/build-support/gcc-cross-wrapper/default.nix +++ b/pkgs/build-support/gcc-cross-wrapper/default.nix @@ -20,13 +20,20 @@ let phases = [ "installPhase" ]; installPhase = '' echo $out - mkdir -p $out - 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 + 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 |