Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Fix compilation of GCC 4.9 on SmartOS. Fix ld-solaris-wrapper never calling ld (since gcc->cc-wrapper refactor).

+4 -4
+1 -1
pkgs/build-support/cc-wrapper/default.nix
··· 145 145 + optionalString (stdenv.isSunOS && nativePrefix != "") '' 146 146 # Solaris needs an additional ld wrapper. 147 147 ldPath="${nativePrefix}/bin" 148 - ld="$out/bin/ld-solaris" 148 + exec="$ldPath/ld" 149 149 wrap ld-solaris ${./ld-solaris-wrapper.sh} 150 150 '') 151 151
+1 -1
pkgs/build-support/cc-wrapper/ld-solaris-wrapper.sh
··· 6 6 # I've also tried adding -z direct and -z lazyload, but it gave too many problems with C++ exceptions :'( 7 7 # Also made sure libgcc would not be lazy-loaded, as suggested here: https://www.illumos.org/issues/2534#note-3 8 8 # but still no success. 9 - cmd="@prog@ -z ignore" 9 + cmd="@ld@ -z ignore" 10 10 11 11 args=("$@"); 12 12
+2 -2
pkgs/development/compilers/gcc/4.9/default.nix
··· 293 293 ++ (optional stdenv.isDarwin gnused) 294 294 ; 295 295 296 - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl"; 297 - 298 296 preConfigure = stdenv.lib.optionalString (stdenv.isSunOS && stdenv.is64bit) '' 297 + sed -i -e "s/-lrt//g" libstdc++-v3/configure 299 298 export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g` 300 299 export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" 301 300 export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" ··· 518 517 platforms = 519 518 stdenv.lib.platforms.linux ++ 520 519 stdenv.lib.platforms.freebsd ++ 520 + stdenv.lib.platforms.illumos ++ 521 521 optionals (langAda == false) stdenv.lib.platforms.darwin; 522 522 }; 523 523 }