diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2017-02-09 08:42:04 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2017-02-09 08:42:04 +0100 |
commit | 6bea415b5e3f4ab70afcea4c646ad76d9c073c89 (patch) | |
tree | 8f5e976cd8aecc6029b4019e16f0177e0a66a093 /pkgs/development/compilers | |
parent | b846a53d2a3cba3002a4d6fb064f579677eac52c (diff) | |
parent | 4bf9f8afc39e9d0c0629635652804b81fe3e3332 (diff) | |
download | nixlib-6bea415b5e3f4ab70afcea4c646ad76d9c073c89.tar nixlib-6bea415b5e3f4ab70afcea4c646ad76d9c073c89.tar.gz nixlib-6bea415b5e3f4ab70afcea4c646ad76d9c073c89.tar.bz2 nixlib-6bea415b5e3f4ab70afcea4c646ad76d9c073c89.tar.lz nixlib-6bea415b5e3f4ab70afcea4c646ad76d9c073c89.tar.xz nixlib-6bea415b5e3f4ab70afcea4c646ad76d9c073c89.tar.zst nixlib-6bea415b5e3f4ab70afcea4c646ad76d9c073c89.zip |
Merge branch 'master' into staging
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/julia/0.5.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/julia/0004-hardened-0.4.7.patch | 25 | ||||
-rw-r--r-- | pkgs/development/compilers/julia/0004-hardened.patch | 25 | ||||
-rw-r--r-- | pkgs/development/compilers/julia/default.nix | 7 | ||||
-rw-r--r-- | pkgs/development/compilers/julia/git.nix | 7 | ||||
-rw-r--r-- | pkgs/development/compilers/kotlin/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/compilers/ocaml/4.04.nix | 3 | ||||
-rw-r--r-- | pkgs/development/compilers/rust/bootstrap.nix | 12 | ||||
-rw-r--r-- | pkgs/development/compilers/rust/default.nix | 15 | ||||
-rw-r--r-- | pkgs/development/compilers/rust/patches/disable-lockfile-check-stable.patch | 26 | ||||
-rw-r--r-- | pkgs/development/compilers/rust/rustc.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/souper/default.nix | 56 |
12 files changed, 138 insertions, 50 deletions
diff --git a/pkgs/development/compilers/julia/0.5.nix b/pkgs/development/compilers/julia/0.5.nix index 04ef7b86c483..32d98b1ce135 100644 --- a/pkgs/development/compilers/julia/0.5.nix +++ b/pkgs/development/compilers/julia/0.5.nix @@ -2,6 +2,7 @@ # build tools , gfortran, m4, makeWrapper, patchelf, perl, which, python2 , runCommand +, paxctl # libjulia dependencies , libunwind, readline, utf8proc, zlib , llvm, libffi, ncurses @@ -71,7 +72,7 @@ stdenv.mkDerivation rec { patches = [ ./0001.1-use-system-utf8proc.patch ./0002-use-system-suitesparse.patch - ]; + ] ++ stdenv.lib.optional stdenv.needsPax ./0004-hardened.patch; postPatch = '' patchShebangs . contrib @@ -89,7 +90,8 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optionals stdenv.isDarwin [CoreServices ApplicationServices] ; - nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which ]; + nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which ] + ++ stdenv.lib.optional stdenv.needsPax paxctl; makeFlags = let diff --git a/pkgs/development/compilers/julia/0004-hardened-0.4.7.patch b/pkgs/development/compilers/julia/0004-hardened-0.4.7.patch new file mode 100644 index 000000000000..1950cd7836a2 --- /dev/null +++ b/pkgs/development/compilers/julia/0004-hardened-0.4.7.patch @@ -0,0 +1,25 @@ +From 0bdbe60325a22202f8e250a9578407648a0d29b9 Mon Sep 17 00:00:00 2001 +From: Will Dietz <w@wdtz.org> +Date: Wed, 1 Feb 2017 06:09:49 -0600 +Subject: [PATCH] Set pax flags on julia binaries to disable memory protection. + +--- + Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Makefile b/Makefile +index 8d45a1baa..91ea33b21 100644 +--- a/Makefile ++++ b/Makefile +@@ -61,6 +61,8 @@ julia-src-release julia-src-debug : julia-src-% : julia-deps + + julia-ui-release julia-ui-debug : julia-ui-% : julia-src-% + @$(MAKE) $(QUIET_MAKE) -C ui julia-$* ++ @echo "setting PaX flags on $(JULIA_EXECUTABLE_$*)" ++ @paxctl -czexm $(JULIA_EXECUTABLE_$*) + + julia-inference : julia-base julia-ui-$(JULIA_BUILD_MODE) $(build_prefix)/.examples + @$(MAKE) $(QUIET_MAKE) $(build_private_libdir)/inference.ji JULIA_BUILD_MODE=$(JULIA_BUILD_MODE) +-- +2.11.0 + diff --git a/pkgs/development/compilers/julia/0004-hardened.patch b/pkgs/development/compilers/julia/0004-hardened.patch new file mode 100644 index 000000000000..901f967c9d55 --- /dev/null +++ b/pkgs/development/compilers/julia/0004-hardened.patch @@ -0,0 +1,25 @@ +From eddb251a00ace6e63e32e7dcb9e1ec632cac14e0 Mon Sep 17 00:00:00 2001 +From: Will Dietz <w@wdtz.org> +Date: Wed, 1 Feb 2017 06:09:49 -0600 +Subject: [PATCH] Set pax flags on julia binaries to disable memory protection. + +--- + Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Makefile b/Makefile +index 0e28cc87b..aab8cfa8d 100644 +--- a/Makefile ++++ b/Makefile +@@ -91,6 +91,8 @@ julia-src-release julia-src-debug : julia-src-% : julia-deps julia_flisp.boot.in + + julia-ui-release julia-ui-debug : julia-ui-% : julia-src-% + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/ui julia-$* ++ @echo "setting PaX flags on $(JULIA_EXECUTABLE_$*)" ++ @paxctl -czexm $(JULIA_EXECUTABLE_$*) + + julia-inference : julia-base julia-ui-$(JULIA_BUILD_MODE) $(build_prefix)/.examples + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) $(build_private_libdir)/inference.ji JULIA_BUILD_MODE=$(JULIA_BUILD_MODE) +-- +2.11.0 + diff --git a/pkgs/development/compilers/julia/default.nix b/pkgs/development/compilers/julia/default.nix index 214b31534818..ebdd4c760d10 100644 --- a/pkgs/development/compilers/julia/default.nix +++ b/pkgs/development/compilers/julia/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchgit, fetchurl # build tools -, gfortran, m4, makeWrapper, patchelf, perl, which, python2 +, gfortran, m4, makeWrapper, patchelf, perl, which, python2, paxctl # libjulia dependencies , libunwind, llvm, readline, utf8proc, zlib # standard library dependencies @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { ./0001-use-system-utf8proc.patch ./0002-use-system-suitesparse.patch ./0003-no-ldconfig.patch - ]; + ] ++ stdenv.lib.optional stdenv.needsPax ./0004-hardened-0.4.7.patch; postPatch = '' patchShebangs . contrib @@ -79,7 +79,8 @@ stdenv.mkDerivation rec { ] ++ stdenv.lib.optionals stdenv.isDarwin [CoreServices ApplicationServices] ; - nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which ]; + nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which ] + ++ stdenv.lib.optional stdenv.needsPax paxctl; makeFlags = let diff --git a/pkgs/development/compilers/julia/git.nix b/pkgs/development/compilers/julia/git.nix index 73f0e67baa56..9cfa8895f74a 100644 --- a/pkgs/development/compilers/julia/git.nix +++ b/pkgs/development/compilers/julia/git.nix @@ -1,6 +1,6 @@ { stdenv, fetchgit, fetchurl # build tools -, gfortran, m4, makeWrapper, patchelf, perl, which, python2 +, gfortran, m4, makeWrapper, patchelf, perl, which, python2, paxctl # libjulia dependencies , libunwind, readline, utf8proc, zlib , llvm @@ -72,7 +72,7 @@ stdenv.mkDerivation rec { patches = [ ./0001.1-use-system-utf8proc.patch ./0002-use-system-suitesparse.patch - ]; + ] ++ stdenv.lib.optional stdenv.needsPax ./0004-hardened.patch; postPatch = '' patchShebangs . contrib @@ -86,7 +86,8 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optionals stdenv.isDarwin [CoreServices ApplicationServices] ; - nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which ]; + nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which ] + ++ stdenv.lib.optional stdenv.needsPax paxctl; makeFlags = let diff --git a/pkgs/development/compilers/kotlin/default.nix b/pkgs/development/compilers/kotlin/default.nix index 52a47c50420e..0f2f3d12a1ce 100644 --- a/pkgs/development/compilers/kotlin/default.nix +++ b/pkgs/development/compilers/kotlin/default.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, makeWrapper, jre, unzip }: stdenv.mkDerivation rec { - version = "1.0.5-2"; + version = "1.0.6"; name = "kotlin-${version}"; src = fetchurl { url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}.zip"; - sha512 = "0z8phc51y8dfjnm95fs2dnmvhp7xm2am5xm71byh598flkpjmagnwah4j8z9fpg4qy94dwmqxf5zs3q8nfra89kmwskzpvp7bbibi0h"; + sha256 = "1dhliqd79hydd62xmrn2nwrcqy7lb5svkahkkpx9w3z9s5r0p8j2"; }; propagatedBuildInputs = [ jre ] ; diff --git a/pkgs/development/compilers/ocaml/4.04.nix b/pkgs/development/compilers/ocaml/4.04.nix index 7e35c9e1aa80..1ded1aed2325 100644 --- a/pkgs/development/compilers/ocaml/4.04.nix +++ b/pkgs/development/compilers/ocaml/4.04.nix @@ -3,4 +3,7 @@ import ./generic.nix { minor_version = "04"; patch_version = "0"; sha256 = "1d2nk3kq4dyzz8dls45r13jprq5by3q8kshc8kvxzm8n4fnnvvb4"; + + # If the executable is stipped it does not work + dontStrip = true; } diff --git a/pkgs/development/compilers/rust/bootstrap.nix b/pkgs/development/compilers/rust/bootstrap.nix index 93deee01e56e..b582b21dcc49 100644 --- a/pkgs/development/compilers/rust/bootstrap.nix +++ b/pkgs/development/compilers/rust/bootstrap.nix @@ -14,16 +14,16 @@ let then "x86_64-apple-darwin" else abort "missing boostrap url for platform ${stdenv.system}"; - # fetch hashes by running `print-hashes.sh 1.13.0` + # fetch hashes by running `print-hashes.sh 1.14.0` bootstrapHash = if stdenv.system == "i686-linux" - then "239734113f6750d31085c7a08c260d492991cc1ef10817b6d44154515f3f9439" + then "8d5c75728b44468216f99651dfae9d60ae0696a77105dd2b02942d75f3256840" else if stdenv.system == "x86_64-linux" - then "95f4c372b1b81ac1038161e87e932dd7ab875d25c167a861c3949b0f6a65516d" + then "c71325cfea1b6f0bdc5189fa4c50ff96f828096ff3f7b5056367f9685d6a4d04" else if stdenv.system == "i686-darwin" - then "f6e01cab3bf8d0a6fe9cc2447aa10ce894569daaa72d44063c229da918b96023" + then "fe1b3d67329a22d67e3b8db8858a43022e2e746dde60ef4a2db3f2cac16ea9bd" else if stdenv.system == "x86_64-darwin" - then "f538ca5732b844cf7f00fc4aaaf200a49a845b58b4ec8aef38da0b00e2cf6efe" + then "3381341524b0184da5ed2cdcddc2a25e2e335e87f1cf676f64d98ee5e6479f20" else throw "missing boostrap hash for platform ${stdenv.system}"; needsPatchelf = stdenv.isLinux; @@ -33,7 +33,7 @@ let sha256 = bootstrapHash; }; - version = "1.13.0"; + version = "1.14.0"; in rec { diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix index 7b8d5a3d1ef7..e3314732fa4d 100644 --- a/pkgs/development/compilers/rust/default.nix +++ b/pkgs/development/compilers/rust/default.nix @@ -6,15 +6,14 @@ let in rec { rustc = callPackage ./rustc.nix { - shortVersion = "1.14"; + shortVersion = "1.15"; isRelease = true; forceBundledLLVM = false; configureFlags = [ "--release-channel=stable" ]; - srcRev = "e8a0123241f0d397d39cd18fcc4e5e7edde22730"; - srcSha = "1sla3gnx9dqvivnyhvwz299mc3jmdy805q2y5xpmpi1vhfk0bafx"; + srcRev = "10893a9a349cdd423f2490a6984acb5b3b7c8046"; + srcSha = "0861iivb98ir9ixq2qzznfc1b2l9khlwdln5n0gf2mp1fi3w4d4f"; patches = [ - ./patches/disable-lockfile-check-stable.patch ./patches/darwin-disable-fragile-tcp-tests.patch ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch; @@ -25,10 +24,10 @@ rec { }; cargo = callPackage ./cargo.nix rec { - version = "0.15.0"; - srcRev = "298a0127f703d4c2500bb06d309488b92ef84ae1"; - srcSha = "0v74r18vszapw2rfk7w72czkp9gbq4s1sggphm5vx0kyh058dxc5"; - depsSha256 = "0ksiywli8r4lkprfknm0yz1w27060psi3db6wblqmi8sckzdm44h"; + version = "0.16.0"; + srcRev = "6e0c18cccc8b0c06fba8a8d76486f81a792fb420"; + srcSha = "117ivvs9wz848mwf8bw797n10qpn77agd353z8b0hxgbxhpribya"; + depsSha256 = "11s2xpgfhl4mb4wa2nk4mzsypr7m9daxxc7l0vraiz5cr77gk7qq"; inherit rustc; # the rustc that will be wrapped by cargo inherit rustPlatform; # used to build cargo diff --git a/pkgs/development/compilers/rust/patches/disable-lockfile-check-stable.patch b/pkgs/development/compilers/rust/patches/disable-lockfile-check-stable.patch deleted file mode 100644 index c5009b7ba672..000000000000 --- a/pkgs/development/compilers/rust/patches/disable-lockfile-check-stable.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e7378e267bba203bd593b49705c24303b0a46cb7 Mon Sep 17 00:00:00 2001 -From: David Craven <david@craven.ch> -Date: Wed, 1 Jun 2016 01:41:35 +0200 -Subject: [PATCH] disable-lockfile-check - ---- - src/tools/tidy/src/main.rs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/tools/tidy/src/main.rs b/src/tools/tidy/src/main.rs -index 2839bbd..50142ff 100644 ---- a/src/tools/tidy/src/main.rs -+++ b/src/tools/tidy/src/main.rs -@@ -48,7 +48,7 @@ fn main() { - errors::check(&path, &mut bad); - cargo::check(&path, &mut bad); - features::check(&path, &mut bad); -- cargo_lock::check(&path, &mut bad); -+ //cargo_lock::check(&path, &mut bad); - pal::check(&path, &mut bad); - - if bad { - panic!("some tidy checks failed"); --- -2.8.3 - diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index 056177fd265f..a693afb8b597 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -56,6 +56,8 @@ stdenv.mkDerivation { ++ [ "--enable-local-rust" "--local-rust-root=${rustPlatform.rust.rustc}" "--enable-rpath" ] # ++ [ "--jemalloc-root=${jemalloc}/lib" ++ [ "--default-linker=${stdenv.cc}/bin/cc" "--default-ar=${binutils.out}/bin/ar" ] + # TODO: Remove when fixed build with rustbuild + ++ [ "--disable-rustbuild" ] ++ optional (stdenv.cc.cc ? isClang) "--enable-clang" ++ optional (targets != []) "--target=${target}" ++ optional (!forceBundledLLVM) "--llvm-root=${llvmShared}"; diff --git a/pkgs/development/compilers/souper/default.nix b/pkgs/development/compilers/souper/default.nix new file mode 100644 index 000000000000..74e1cbf68d30 --- /dev/null +++ b/pkgs/development/compilers/souper/default.nix @@ -0,0 +1,56 @@ +{ stdenv, fetchFromGitHub, cmake, makeWrapper +, llvmPackages_39, hiredis, z3_opt, gtest +}: + +let + klee = fetchFromGitHub { + owner = "klee"; + repo = "klee"; + rev = "a743d7072d9ccf11f96e3df45f25ad07da6ad9d6"; + sha256 = "0qwzs029vlba8xz362n4b00hdm2z3lzhzmvix1r8kpbfrvs8vv91"; + }; +in stdenv.mkDerivation { + name = "souper-unstable-2017-01-05"; + + src = fetchFromGitHub { + owner = "google"; + repo = "souper"; + rev = "1be75fe6a96993b57dcba038798fe6d1c7d113eb"; + sha256 = "0r8mjb88lwz9a3syx7gwsxlwfg0krffaml04ggaf3ad0cza2mvm8"; + }; + + nativeBuildInputs = [ + cmake + makeWrapper + ]; + + buildInputs = [ + llvmPackages_39.llvm + llvmPackages_39.clang-unwrapped + hiredis + gtest + ]; + + enableParallelBuilding = true; + + preConfigure = '' + mkdir -pv third_party + cp -R "${klee}" third_party/klee + ''; + + installPhase = '' + mkdir -pv $out/bin + cp -v ./souper $out/bin/ + cp -v ./clang-souper $out/bin/ + wrapProgram "$out/bin/souper" \ + --add-flags "-z3-path=\"${z3_opt}/bin/z3\"" + ''; + + meta = with stdenv.lib; { + description = "A superoptimizer for LLVM IR"; + homepage = "https://github.com/google/souper"; + license = licenses.asl20; + maintainers = with maintainers; [ taktoa ]; + platforms = with platforms; linux; + }; +} |