about summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-03-23 09:18:41 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2019-03-23 09:18:41 +0100
commitb40d7528726cc97cf17ba6944842dc7975e60b4b (patch)
tree3079ee4822b3c1aafe34547169c4aa4a41417dc4 /pkgs/development/compilers
parent04066403aef0fe8c1b8123f862ed9f58f04583f7 (diff)
parent2cc644411361fcdde9c9b3b84d1ddd8d87c435af (diff)
downloadnixlib-b40d7528726cc97cf17ba6944842dc7975e60b4b.tar
nixlib-b40d7528726cc97cf17ba6944842dc7975e60b4b.tar.gz
nixlib-b40d7528726cc97cf17ba6944842dc7975e60b4b.tar.bz2
nixlib-b40d7528726cc97cf17ba6944842dc7975e60b4b.tar.lz
nixlib-b40d7528726cc97cf17ba6944842dc7975e60b4b.tar.xz
nixlib-b40d7528726cc97cf17ba6944842dc7975e60b4b.tar.zst
nixlib-b40d7528726cc97cf17ba6944842dc7975e60b4b.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/closure/default.nix4
-rw-r--r--pkgs/development/compilers/compcert/default.nix11
-rw-r--r--pkgs/development/compilers/cudatoolkit/default.nix6
-rw-r--r--pkgs/development/compilers/elm/default.nix2
-rw-r--r--pkgs/development/compilers/ghc/8.2.2-binary.nix9
-rw-r--r--pkgs/development/compilers/ghc/8.6.3-binary.nix9
-rw-r--r--pkgs/development/compilers/ghc/8.6.3.nix235
-rw-r--r--pkgs/development/compilers/llvm/7/crtbegin-and-end.patch30
-rw-r--r--pkgs/development/compilers/llvm/8/clang/default.nix2
-rw-r--r--pkgs/development/compilers/llvm/8/compiler-rt.nix11
-rw-r--r--pkgs/development/compilers/llvm/8/crtbegin-and-end.patch30
-rw-r--r--pkgs/development/compilers/llvm/8/default.nix6
-rw-r--r--pkgs/development/compilers/llvm/8/libc++/default.nix2
-rw-r--r--pkgs/development/compilers/llvm/8/libc++abi.nix2
-rw-r--r--pkgs/development/compilers/llvm/8/lld.nix2
-rw-r--r--pkgs/development/compilers/llvm/8/lldb.nix2
-rw-r--r--pkgs/development/compilers/llvm/8/llvm.nix6
-rw-r--r--pkgs/development/compilers/llvm/8/openmp.nix2
-rw-r--r--pkgs/development/compilers/purescript/purescript/default.nix60
19 files changed, 143 insertions, 288 deletions
diff --git a/pkgs/development/compilers/closure/default.nix b/pkgs/development/compilers/closure/default.nix
index 5c4d276ab973..e9e973618257 100644
--- a/pkgs/development/compilers/closure/default.nix
+++ b/pkgs/development/compilers/closure/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "closure-compiler-${version}";
-  version = "20190121";
+  version = "20190215";
 
   src = fetchurl {
     url = "https://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
-    sha256 = "1jxxj3a1pbf7bbqs0rkqk28ii1r3w2va4iis8fffx8zfvbgncwyc";
+    sha256 = "16rpl7x90ganpxlz6v9292cwx7dnkhklqx1nn161yj7ypf9bzd4k";
   };
 
   sourceRoot = ".";
diff --git a/pkgs/development/compilers/compcert/default.nix b/pkgs/development/compilers/compcert/default.nix
index de01d7afdf04..4538d3031489 100644
--- a/pkgs/development/compilers/compcert/default.nix
+++ b/pkgs/development/compilers/compcert/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, fetchpatch, makeWrapper
+{ stdenv, lib, fetchFromGitHub, fetchpatch, makeWrapper
 , coq, ocamlPackages, coq2html
 , tools ? stdenv.cc
 }:
@@ -14,9 +14,11 @@ stdenv.mkDerivation rec {
   name    = "compcert-${version}";
   version = "3.5";
 
-  src = fetchurl {
-    url    = "http://compcert.inria.fr/release/${name}.tgz";
-    sha256 = "127s8nwsmpl7ng7h4yy8cci8p6ncsw8i8jq3z0pyhx2siryddq0v";
+  src = fetchFromGitHub {
+    owner = "AbsInt";
+    repo = "CompCert";
+    rev = "v${version}";
+    sha256 = "1g8067a5x3vd0l47d04gjvy5yx49nghh55am5d1fbrjirfsnsz8j";
   };
 
   nativeBuildInputs = [ makeWrapper ];
@@ -24,7 +26,6 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
 
   patchPhase = ''
-    substituteInPlace ./VERSION --replace 3.4 3.5
     substituteInPlace ./configure \
       --replace '{toolprefix}gcc' '{toolprefix}cc'
   '';
diff --git a/pkgs/development/compilers/cudatoolkit/default.nix b/pkgs/development/compilers/cudatoolkit/default.nix
index 3a34d14f8ad3..e2c3c8fe587b 100644
--- a/pkgs/development/compilers/cudatoolkit/default.nix
+++ b/pkgs/development/compilers/cudatoolkit/default.nix
@@ -147,7 +147,11 @@ let
         done < <(find $out $lib $doc -type f -print0)
       '';
 
-      doInstallCheck = true;
+      # cuda-gdb doesn't run correctly when not using sandboxing, so
+      # temporarily disabling the install check.  This should be set to true
+      # when we figure out how to get `cuda-gdb --version` to run correctly
+      # when not using sandboxing.
+      doInstallCheck = false;
       postInstallCheck = let
       in ''
         # Smoke test binaries
diff --git a/pkgs/development/compilers/elm/default.nix b/pkgs/development/compilers/elm/default.nix
index bfaf24cd9872..f14bce5d96b3 100644
--- a/pkgs/development/compilers/elm/default.nix
+++ b/pkgs/development/compilers/elm/default.nix
@@ -4,7 +4,7 @@
 
 let
   fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; };
-  hsPkgs = haskell.packages.ghc863.override {
+  hsPkgs = haskell.packages.ghc864.override {
     overrides = self: super: with haskell.lib;
       let elmPkgs = {
             elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: {
diff --git a/pkgs/development/compilers/ghc/8.2.2-binary.nix b/pkgs/development/compilers/ghc/8.2.2-binary.nix
index 678245d3e437..af98e9a311d5 100644
--- a/pkgs/development/compilers/ghc/8.2.2-binary.nix
+++ b/pkgs/development/compilers/ghc/8.2.2-binary.nix
@@ -107,6 +107,15 @@ stdenv.mkDerivation rec {
 
       sed -i "s|/usr/bin/perl|perl\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
       sed -i "s|/usr/bin/gcc|gcc\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
+    '' +
+    # We're kludging a glibc bindist into working with non-glibc...
+    # Here we patch up the use of `__strdup` (part of glibc binary ABI)
+    # to instead use `strdup` since musl doesn't provide __strdup
+    # (`__strdup` is defined to be an alias of `strdup` anyway[1]).
+    # [1] http://refspecs.linuxbase.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/baselib---strdup-1.html
+    # Use objcopy magic to make the change:
+    stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+      find ./ghc-${version}/rts -name "libHSrts*.a" -exec ''${OBJCOPY:-objcopy} --redefine-sym __strdup=strdup {} \;
     '';
 
   configurePlatforms = [ ];
diff --git a/pkgs/development/compilers/ghc/8.6.3-binary.nix b/pkgs/development/compilers/ghc/8.6.3-binary.nix
index cde67183ef49..7e845da5b648 100644
--- a/pkgs/development/compilers/ghc/8.6.3-binary.nix
+++ b/pkgs/development/compilers/ghc/8.6.3-binary.nix
@@ -99,6 +99,15 @@ stdenv.mkDerivation rec {
 
       sed -i "s|/usr/bin/perl|perl\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
       sed -i "s|/usr/bin/gcc|gcc\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
+    '' +
+    # We're kludging a glibc bindist into working with non-glibc...
+    # Here we patch up the use of `__strdup` (part of glibc binary ABI)
+    # to instead use `strdup` since musl doesn't provide __strdup
+    # (`__strdup` is defined to be an alias of `strdup` anyway[1]).
+    # [1] http://refspecs.linuxbase.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/baselib---strdup-1.html
+    # Use objcopy magic to make the change:
+    stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+      find ./ghc-${version}/rts -name "libHSrts*.a" -exec ''${OBJCOPY:-objcopy} --redefine-sym __strdup=strdup {} \;
     '';
 
   configurePlatforms = [ ];
diff --git a/pkgs/development/compilers/ghc/8.6.3.nix b/pkgs/development/compilers/ghc/8.6.3.nix
deleted file mode 100644
index a2378b595684..000000000000
--- a/pkgs/development/compilers/ghc/8.6.3.nix
+++ /dev/null
@@ -1,235 +0,0 @@
-{ stdenv, targetPackages
-
-# build-tools
-, bootPkgs
-, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3, m4, sphinx
-
-, libiconv ? null, ncurses
-
-, # GHC can be built with system libffi or a bundled one.
-  libffi ? null
-
-, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
-, # LLVM is conceptually a run-time-only depedendency, but for
-  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
-  # build-time dependency too.
-  buildLlvmPackages, llvmPackages
-
-, # If enabled, GHC will be built with the GPL-free but slower integer-simple
-  # library instead of the faster but GPLed integer-gmp library.
-  enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
-
-, # If enabled, use -fPIC when compiling static libs.
-  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
-
-, # Whether to build dynamic libs for the standard library (on the target
-  # platform). Static libs are always built.
-  enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
-
-, # Whetherto build terminfo.
-  enableTerminfo ? !stdenv.targetPlatform.isWindows
-
-, # What flavour to build. An empty string indicates no
-  # specific flavour and falls back to ghc default values.
-  ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
-}:
-
-assert !enableIntegerSimple -> gmp != null;
-
-let
-  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
-
-  inherit (bootPkgs) ghc;
-
-  # TODO(@Ericson2314) Make unconditional
-  targetPrefix = stdenv.lib.optionalString
-    (targetPlatform != hostPlatform)
-    "${targetPlatform.config}-";
-
-  buildMK = ''
-    BuildFlavour = ${ghcFlavour}
-    ifneq \"\$(BuildFlavour)\" \"\"
-    include mk/flavours/\$(BuildFlavour).mk
-    endif
-    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
-    INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
-  '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
-    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
-    CrossCompilePrefix = ${targetPrefix}
-    HADDOCK_DOCS = NO
-    BUILD_SPHINX_HTML = NO
-    BUILD_SPHINX_PDF = NO
-  '' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
-    GhcLibHcOpts += -fPIC
-    GhcRtsHcOpts += -fPIC
-  '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
-    EXTRA_CC_OPTS += -std=gnu99
-  '';
-
-  # Splicer will pull out correct variations
-  libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
-    ++ [libffi]
-    ++ stdenv.lib.optional (!enableIntegerSimple) gmp
-    ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
-
-  toolsForTarget =
-    if hostPlatform == buildPlatform then
-      [ targetPackages.stdenv.cc ] ++ stdenv.lib.optional useLLVM llvmPackages.llvm
-    else assert targetPlatform == hostPlatform; # build != host == target
-      [ stdenv.cc ] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
-
-  targetCC = builtins.head toolsForTarget;
-
-in
-stdenv.mkDerivation (rec {
-  version = "8.6.3";
-  name = "${targetPrefix}ghc-${version}";
-
-  src = fetchurl {
-    url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
-    sha256 = "08vzq0dpg4a39bs61j6rq4z0n7jby5mc69h4m25xhd8rjyvkg7lz";
-  };
-
-  enableParallelBuilding = true;
-
-  outputs = [ "out" "doc" ];
-
-  patches = [(fetchpatch rec { # https://phabricator.haskell.org/D5123
-    url = "http://tarballs.nixos.org/sha256/${sha256}";
-    name = "D5123.diff";
-    sha256 = "0nhqwdamf2y4gbwqxcgjxs0kqx23w9gv5kj0zv6450dq19rji82n";
-  })];
-
-  postPatch = "patchShebangs .";
-
-  # GHC is a bit confused on its cross terminology.
-  preConfigure = ''
-    for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
-      export "''${env#TARGET_}=''${!env}"
-    done
-    # GHC is a bit confused on its cross terminology, as these would normally be
-    # the *host* tools.
-    export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
-    export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
-    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
-    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isAarch32 ".gold"}"
-    export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
-    export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
-    export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
-    export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
-    export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
-    export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
-
-    echo -n "${buildMK}" > mk/build.mk
-    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
-  '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
-    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
-  '' + stdenv.lib.optionalString stdenv.isDarwin ''
-    export NIX_LDFLAGS+=" -no_dtrace_dof"
-  '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
-    sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
-  '' + stdenv.lib.optionalString targetPlatform.isMusl ''
-      echo "patching llvm-targets for musl targets..."
-      echo "Cloning these existing '*-linux-gnu*' targets:"
-      grep linux-gnu llvm-targets | sed 's/^/  /'
-      echo "(go go gadget sed)"
-      sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
-      echo "llvm-targets now contains these '*-linux-musl*' targets:"
-      grep linux-musl llvm-targets | sed 's/^/  /'
-
-      echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
-      # (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
-      for x in configure aclocal.m4; do
-        substituteInPlace $x \
-          --replace '*-android*|*-gnueabi*)' \
-                    '*-android*|*-gnueabi*|*-musleabi*)'
-      done
-  '';
-
-  # TODO(@Ericson2314): Always pass "--target" and always prefix.
-  configurePlatforms = [ "build" "host" ]
-    ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
-  # `--with` flags for libraries needed for RTS linker
-  configureFlags = [
-    "--datadir=$doc/share/doc/ghc"
-    "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
-  ] ++ stdenv.lib.optionals (libffi != null) ["--with-system-libffi" "--with-ffi-includes=${libffi.dev}/include" "--with-ffi-libraries=${libffi.out}/lib"
-  ] ++ stdenv.lib.optional (targetPlatform == hostPlatform && !enableIntegerSimple) [
-    "--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
-  ] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
-    "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
-  ] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
-    "--enable-bootstrap-with-devel-snapshot"
-  ] ++ stdenv.lib.optionals (targetPlatform.isAarch32) [
-    "CFLAGS=-fuse-ld=gold"
-    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
-    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
-  ] ++ stdenv.lib.optionals (targetPlatform.isDarwin && targetPlatform.isAarch64) [
-    # fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
-    "--disable-large-address-space"
-  ];
-
-  # Make sure we never relax`$PATH` and hooks support for compatability.
-  strictDeps = true;
-
-  # Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
-	dontAddExtraLibs = true;
-
-  nativeBuildInputs = [
-    perl autoconf automake m4 python3 sphinx
-    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
-  ];
-
-  # For building runtime libs
-  depsBuildTarget = toolsForTarget;
-
-  buildInputs = [ perl ] ++ (libDeps hostPlatform);
-
-  propagatedBuildInputs = [ targetPackages.stdenv.cc ]
-    ++ stdenv.lib.optional useLLVM llvmPackages.llvm;
-
-  depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
-  depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
-
-  # required, because otherwise all symbols from HSffi.o are stripped, and
-  # that in turn causes GHCi to abort
-  stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
-
-  checkTarget = "test";
-
-  hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
-
-  postInstall = ''
-    # Install the bash completion file.
-    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
-
-    # Patch scripts to include "readelf" and "cat" in $PATH.
-    for i in "$out/bin/"*; do
-      test ! -h $i || continue
-      egrep --quiet '^#!' <(head -n 1 $i) || continue
-      sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
-    done
-  '';
-
-  passthru = {
-    inherit bootPkgs targetPrefix;
-
-    inherit llvmPackages;
-    inherit enableShared;
-
-    # Our Cabal compiler name
-    haskellCompilerName = "ghc-8.6.3";
-  };
-
-  meta = {
-    homepage = http://haskell.org/ghc;
-    description = "The Glasgow Haskell Compiler";
-    maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
-    inherit (ghc.meta) license platforms;
-  };
-
-} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
-  dontStrip = true;
-  dontPatchELF = true;
-  noAuditTmpdir = true;
-})
diff --git a/pkgs/development/compilers/llvm/7/crtbegin-and-end.patch b/pkgs/development/compilers/llvm/7/crtbegin-and-end.patch
index 032b04708d16..e63be181f95c 100644
--- a/pkgs/development/compilers/llvm/7/crtbegin-and-end.patch
+++ b/pkgs/development/compilers/llvm/7/crtbegin-and-end.patch
@@ -156,7 +156,7 @@ Index: compiler-rt/lib/crt/CMakeLists.txt
 ===================================================================
 --- /dev/null
 +++ compiler-rt/lib/crt/CMakeLists.txt
-@@ -0,0 +1,101 @@
+@@ -0,0 +1,102 @@
 +add_compiler_rt_component(crt)
 +
 +function(check_cxx_section_exists section output)
@@ -216,7 +216,7 @@ Index: compiler-rt/lib/crt/CMakeLists.txt
 +    OUTPUT_VARIABLE CHECK_OUTPUT
 +    ERROR_VARIABLE CHECK_ERROR
 +  )
-+  string(FIND ${CHECK_OUTPUT} ${section} SECTION_FOUND)
++  string(FIND "${CHECK_OUTPUT}" "${section}" SECTION_FOUND)
 +
 +  if(NOT SECTION_FOUND EQUAL -1)
 +    set(${output} TRUE PARENT_SCOPE)
@@ -231,6 +231,7 @@ Index: compiler-rt/lib/crt/CMakeLists.txt
 +  SOURCE "__attribute__((constructor)) void f() {}\nint main() { return 0; }\n")
 +
 +append_list_if(COMPILER_RT_HAS_INITFINI_ARRAY -DCRT_HAS_INITFINI_ARRAY CRT_CFLAGS)
++append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC CRT_CFLAGS)
 +
 +foreach(arch ${CRT_SUPPORTED_ARCH})
 +  add_compiler_rt_runtime(clang_rt.crtbegin
@@ -243,7 +244,7 @@ Index: compiler-rt/lib/crt/CMakeLists.txt
 +    OBJECT
 +    ARCHS ${arch}
 +    SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtbegin.c
-+    CFLAGS ${CRT_CFLAGS} -DCRT_SHARED -fPIC
++    CFLAGS ${CRT_CFLAGS} -DCRT_SHARED
 +    PARENT_TARGET crt)
 +  add_compiler_rt_runtime(clang_rt.crtend
 +    OBJECT
@@ -255,14 +256,14 @@ Index: compiler-rt/lib/crt/CMakeLists.txt
 +    OBJECT
 +    ARCHS ${arch}
 +    SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtend.c
-+    CFLAGS ${CRT_CFLAGS} -DCRT_SHARED -fPIC
++    CFLAGS ${CRT_CFLAGS} -DCRT_SHARED
 +    PARENT_TARGET crt)
 +endforeach()
 Index: compiler-rt/lib/crt/crtbegin.c
 ===================================================================
 --- /dev/null
 +++ compiler-rt/lib/crt/crtbegin.c
-@@ -0,0 +1,110 @@
+@@ -0,0 +1,108 @@
 +/* ===-- crtbegin.c - Start of constructors and destructors ----------------===
 + *
 + *      	       The LLVM Compiler Infrastructure
@@ -282,8 +283,8 @@ Index: compiler-rt/lib/crt/crtbegin.c
 +void *__dso_handle = (void *)0;
 +#endif
 +
-+static long __EH_FRAME_LIST__[] __attribute__((
-+    section(".eh_frame"), aligned(sizeof(void *)), visibility("hidden"))) = {};
++static long __EH_FRAME_LIST__[]
++    __attribute__((section(".eh_frame"), aligned(sizeof(void *)))) = {};
 +
 +extern void __register_frame_info(const void *, void *) __attribute__((weak));
 +extern void *__deregister_frame_info(const void *) __attribute__((weak));
@@ -292,9 +293,8 @@ Index: compiler-rt/lib/crt/crtbegin.c
 +typedef void (*fp)(void);
 +
 +static fp __CTOR_LIST__[]
-+    __attribute__((section(".ctors"), aligned(sizeof(fp)), visibility("hidden"),
-+                   used)) = {(fp)-1};
-+extern fp __CTOR_LIST_END__[] __attribute__((visibility("hidden")));
++    __attribute__((section(".ctors"), aligned(sizeof(fp)), used)) = {(fp)-1};
++extern fp __CTOR_LIST_END__[];
 +#endif
 +
 +#ifdef CRT_SHARED
@@ -334,9 +334,8 @@ Index: compiler-rt/lib/crt/crtbegin.c
 +
 +#ifndef CRT_HAS_INITFINI_ARRAY
 +static fp __DTOR_LIST__[]
-+    __attribute__((section(".dtors"), aligned(sizeof(fp)), visibility("hidden"),
-+                   used)) = {(fp)-1};
-+extern fp __DTOR_LIST_END__[] __attribute__((visibility("hidden")));
++    __attribute__((section(".dtors"), aligned(sizeof(fp)), used)) = {(fp)-1};
++extern fp __DTOR_LIST_END__[];
 +#endif
 +
 +static void __attribute__((used)) __do_fini() {
@@ -377,7 +376,7 @@ Index: compiler-rt/lib/crt/crtend.c
 ===================================================================
 --- /dev/null
 +++ compiler-rt/lib/crt/crtend.c
-@@ -0,0 +1,23 @@
+@@ -0,0 +1,24 @@
 +/* ===-- crtend.c - End of constructors and destructors --------------------===
 + *
 + *      	       The LLVM Compiler Infrastructure
@@ -392,7 +391,8 @@ Index: compiler-rt/lib/crt/crtend.c
 +
 +// Put 4-byte zero which is the length field in FDE at the end as a terminator.
 +const int32_t __EH_FRAME_LIST_END__[]
-+    __attribute__((section(".eh_frame"), aligned(sizeof(int32_t)), used)) = {0};
++    __attribute__((section(".eh_frame"), aligned(sizeof(int32_t)),
++                   visibility("hidden"), used)) = {0};
 +
 +#ifndef CRT_HAS_INITFINI_ARRAY
 +typedef void (*fp)(void);
diff --git a/pkgs/development/compilers/llvm/8/clang/default.nix b/pkgs/development/compilers/llvm/8/clang/default.nix
index ad6300942613..44ec6c376cdb 100644
--- a/pkgs/development/compilers/llvm/8/clang/default.nix
+++ b/pkgs/development/compilers/llvm/8/clang/default.nix
@@ -9,7 +9,7 @@ let
     name = "clang-${version}";
 
     unpackPhase = ''
-      unpackFile ${fetch "cfe" "0z5si83w0i3l445c7624204mxsv82naps96icnv7v20s6njbsbsi"}
+      unpackFile ${fetch "cfe" "0svk1f70hvpwrjp6x5i9kqwrqwxnmcrw5s7f4cxyd100mdd12k08"}
       mv cfe-${version}* clang
       sourceRoot=$PWD/clang
       unpackFile ${clang-tools-extra_src}
diff --git a/pkgs/development/compilers/llvm/8/compiler-rt.nix b/pkgs/development/compilers/llvm/8/compiler-rt.nix
index 4e7df060e503..4965b57b0d73 100644
--- a/pkgs/development/compilers/llvm/8/compiler-rt.nix
+++ b/pkgs/development/compilers/llvm/8/compiler-rt.nix
@@ -2,7 +2,7 @@
 stdenv.mkDerivation rec {
   name = "compiler-rt-${version}";
   inherit version;
-  src = fetch "compiler-rt" "1rxa1rcn7r3yfn9cj0sx5gd90kslbd13q080rdyqb6jr9a9i1avb";
+  src = fetch "compiler-rt" "1c919wsm17xnv7lr8bhpq2wkq8113lzlw6hzhfr737j59x3wfddl";
 
   nativeBuildInputs = [ cmake python llvm ];
   buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
     "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
     "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
-  ] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
+  ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
     "-DCMAKE_C_FLAGS=-nodefaultlibs"
     "-DCMAKE_CXX_COMPILER_WORKS=ON"
     "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
@@ -20,13 +20,18 @@ stdenv.mkDerivation rec {
     "-DCOMPILER_RT_BUILD_PROFILE=OFF"
     "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
     "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+  ] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
+    "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+    "-DCOMPILER_RT_BUILD_XRAY=OFF"
+    "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+    "-DCOMPILER_RT_BUILD_PROFILE=OFF"
   ];
 
   outputs = [ "out" "dev" ];
 
   patches = [
     ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
-  ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
+  ]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
     ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch
     ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin ./compiler-rt-clock_gettime.patch;
 
diff --git a/pkgs/development/compilers/llvm/8/crtbegin-and-end.patch b/pkgs/development/compilers/llvm/8/crtbegin-and-end.patch
index 032b04708d16..e63be181f95c 100644
--- a/pkgs/development/compilers/llvm/8/crtbegin-and-end.patch
+++ b/pkgs/development/compilers/llvm/8/crtbegin-and-end.patch
@@ -156,7 +156,7 @@ Index: compiler-rt/lib/crt/CMakeLists.txt
 ===================================================================
 --- /dev/null
 +++ compiler-rt/lib/crt/CMakeLists.txt
-@@ -0,0 +1,101 @@
+@@ -0,0 +1,102 @@
 +add_compiler_rt_component(crt)
 +
 +function(check_cxx_section_exists section output)
@@ -216,7 +216,7 @@ Index: compiler-rt/lib/crt/CMakeLists.txt
 +    OUTPUT_VARIABLE CHECK_OUTPUT
 +    ERROR_VARIABLE CHECK_ERROR
 +  )
-+  string(FIND ${CHECK_OUTPUT} ${section} SECTION_FOUND)
++  string(FIND "${CHECK_OUTPUT}" "${section}" SECTION_FOUND)
 +
 +  if(NOT SECTION_FOUND EQUAL -1)
 +    set(${output} TRUE PARENT_SCOPE)
@@ -231,6 +231,7 @@ Index: compiler-rt/lib/crt/CMakeLists.txt
 +  SOURCE "__attribute__((constructor)) void f() {}\nint main() { return 0; }\n")
 +
 +append_list_if(COMPILER_RT_HAS_INITFINI_ARRAY -DCRT_HAS_INITFINI_ARRAY CRT_CFLAGS)
++append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC CRT_CFLAGS)
 +
 +foreach(arch ${CRT_SUPPORTED_ARCH})
 +  add_compiler_rt_runtime(clang_rt.crtbegin
@@ -243,7 +244,7 @@ Index: compiler-rt/lib/crt/CMakeLists.txt
 +    OBJECT
 +    ARCHS ${arch}
 +    SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtbegin.c
-+    CFLAGS ${CRT_CFLAGS} -DCRT_SHARED -fPIC
++    CFLAGS ${CRT_CFLAGS} -DCRT_SHARED
 +    PARENT_TARGET crt)
 +  add_compiler_rt_runtime(clang_rt.crtend
 +    OBJECT
@@ -255,14 +256,14 @@ Index: compiler-rt/lib/crt/CMakeLists.txt
 +    OBJECT
 +    ARCHS ${arch}
 +    SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtend.c
-+    CFLAGS ${CRT_CFLAGS} -DCRT_SHARED -fPIC
++    CFLAGS ${CRT_CFLAGS} -DCRT_SHARED
 +    PARENT_TARGET crt)
 +endforeach()
 Index: compiler-rt/lib/crt/crtbegin.c
 ===================================================================
 --- /dev/null
 +++ compiler-rt/lib/crt/crtbegin.c
-@@ -0,0 +1,110 @@
+@@ -0,0 +1,108 @@
 +/* ===-- crtbegin.c - Start of constructors and destructors ----------------===
 + *
 + *      	       The LLVM Compiler Infrastructure
@@ -282,8 +283,8 @@ Index: compiler-rt/lib/crt/crtbegin.c
 +void *__dso_handle = (void *)0;
 +#endif
 +
-+static long __EH_FRAME_LIST__[] __attribute__((
-+    section(".eh_frame"), aligned(sizeof(void *)), visibility("hidden"))) = {};
++static long __EH_FRAME_LIST__[]
++    __attribute__((section(".eh_frame"), aligned(sizeof(void *)))) = {};
 +
 +extern void __register_frame_info(const void *, void *) __attribute__((weak));
 +extern void *__deregister_frame_info(const void *) __attribute__((weak));
@@ -292,9 +293,8 @@ Index: compiler-rt/lib/crt/crtbegin.c
 +typedef void (*fp)(void);
 +
 +static fp __CTOR_LIST__[]
-+    __attribute__((section(".ctors"), aligned(sizeof(fp)), visibility("hidden"),
-+                   used)) = {(fp)-1};
-+extern fp __CTOR_LIST_END__[] __attribute__((visibility("hidden")));
++    __attribute__((section(".ctors"), aligned(sizeof(fp)), used)) = {(fp)-1};
++extern fp __CTOR_LIST_END__[];
 +#endif
 +
 +#ifdef CRT_SHARED
@@ -334,9 +334,8 @@ Index: compiler-rt/lib/crt/crtbegin.c
 +
 +#ifndef CRT_HAS_INITFINI_ARRAY
 +static fp __DTOR_LIST__[]
-+    __attribute__((section(".dtors"), aligned(sizeof(fp)), visibility("hidden"),
-+                   used)) = {(fp)-1};
-+extern fp __DTOR_LIST_END__[] __attribute__((visibility("hidden")));
++    __attribute__((section(".dtors"), aligned(sizeof(fp)), used)) = {(fp)-1};
++extern fp __DTOR_LIST_END__[];
 +#endif
 +
 +static void __attribute__((used)) __do_fini() {
@@ -377,7 +376,7 @@ Index: compiler-rt/lib/crt/crtend.c
 ===================================================================
 --- /dev/null
 +++ compiler-rt/lib/crt/crtend.c
-@@ -0,0 +1,23 @@
+@@ -0,0 +1,24 @@
 +/* ===-- crtend.c - End of constructors and destructors --------------------===
 + *
 + *      	       The LLVM Compiler Infrastructure
@@ -392,7 +391,8 @@ Index: compiler-rt/lib/crt/crtend.c
 +
 +// Put 4-byte zero which is the length field in FDE at the end as a terminator.
 +const int32_t __EH_FRAME_LIST_END__[]
-+    __attribute__((section(".eh_frame"), aligned(sizeof(int32_t)), used)) = {0};
++    __attribute__((section(".eh_frame"), aligned(sizeof(int32_t)),
++                   visibility("hidden"), used)) = {0};
 +
 +#ifndef CRT_HAS_INITFINI_ARRAY
 +typedef void (*fp)(void);
diff --git a/pkgs/development/compilers/llvm/8/default.nix b/pkgs/development/compilers/llvm/8/default.nix
index f70585632e87..c5f2163450fe 100644
--- a/pkgs/development/compilers/llvm/8/default.nix
+++ b/pkgs/development/compilers/llvm/8/default.nix
@@ -6,14 +6,14 @@
 
 let
   release_version = "8.0.0";
-  version = release_version + "rc2"; # differentiating these is important for rc's
+  version = release_version; # differentiating these is important for rc's
 
   fetch = name: sha256: fetchurl {
-    url = "https://prereleases.llvm.org/${release_version}/rc2/${name}-${version}.src.tar.xz";
+    url = "https://releases.llvm.org/${release_version}/${name}-${version}.src.tar.xz";
     inherit sha256;
   };
 
-  clang-tools-extra_src = fetch "clang-tools-extra" "1ypzbk7lf9dzkqh4p37dlr1bggjdrixr5gwb71jk9gh98grr2m5g";
+  clang-tools-extra_src = fetch "clang-tools-extra" "0jwx6nnshp92pd5852y7ip7qhaqdf8az5g0440pli9q8whmi402g";
 
   tools = stdenv.lib.makeExtensible (tools: let
     callPackage = newScope (tools // { inherit stdenv cmake libxml2 python isl release_version version fetch; });
diff --git a/pkgs/development/compilers/llvm/8/libc++/default.nix b/pkgs/development/compilers/llvm/8/libc++/default.nix
index 52a1dc53d35e..84db33209ebd 100644
--- a/pkgs/development/compilers/llvm/8/libc++/default.nix
+++ b/pkgs/development/compilers/llvm/8/libc++/default.nix
@@ -3,7 +3,7 @@
 stdenv.mkDerivation rec {
   name = "libc++-${version}";
 
-  src = fetch "libcxx" "1c8idvlqm4ik62q0llsndk9449yrgkj8hv5lz411hnbqjs09q9qq";
+  src = fetch "libcxx" "1qlx3wlxrnc5cwc1fcfc2vhfsl7j4294hi8y5kxj8hy8wxsjd462";
 
   postUnpack = ''
     unpackFile ${libcxxabi.src}
diff --git a/pkgs/development/compilers/llvm/8/libc++abi.nix b/pkgs/development/compilers/llvm/8/libc++abi.nix
index 9c3bfe5e1ff4..976c289e5bc5 100644
--- a/pkgs/development/compilers/llvm/8/libc++abi.nix
+++ b/pkgs/development/compilers/llvm/8/libc++abi.nix
@@ -3,7 +3,7 @@
 stdenv.mkDerivation {
   name = "libc++abi-${version}";
 
-  src = fetch "libcxxabi" "0hdg7xw8vazw85i675qld7i6wqx502srny84cp0w6wi6pk44xiqr";
+  src = fetch "libcxxabi" "1k875f977ybdkpdnr9105wa6hccy9qvpd9xd42n75h7p56bdxmn2";
 
   nativeBuildInputs = [ cmake ];
   buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;
diff --git a/pkgs/development/compilers/llvm/8/lld.nix b/pkgs/development/compilers/llvm/8/lld.nix
index ba7f888f4dd7..7fff6843c5f4 100644
--- a/pkgs/development/compilers/llvm/8/lld.nix
+++ b/pkgs/development/compilers/llvm/8/lld.nix
@@ -9,7 +9,7 @@
 stdenv.mkDerivation {
   name = "lld-${version}";
 
-  src = fetch "lld" "14nganpwr5y111zhwws95p6ikp8kfiybfdr2yfz5cmhb3zkcgk4h";
+  src = fetch "lld" "0dvf38pbm7jy88g66mz7ikkdfhm2qpj0iyzh62hzycifjbnciblw";
 
   nativeBuildInputs = [ cmake ];
   buildInputs = [ llvm libxml2 ];
diff --git a/pkgs/development/compilers/llvm/8/lldb.nix b/pkgs/development/compilers/llvm/8/lldb.nix
index ead507ea2cae..d40eeb4a2074 100644
--- a/pkgs/development/compilers/llvm/8/lldb.nix
+++ b/pkgs/development/compilers/llvm/8/lldb.nix
@@ -17,7 +17,7 @@
 stdenv.mkDerivation {
   name = "lldb-${version}";
 
-  src = fetch "lldb" "0r364w49m0l0808wm06g777qd14gwxnz0z267dbnwqkw6zc361lc";
+  src = fetch "lldb" "0wq3mi76fk86g2g2bcsr0yhagh1dlf2myk641ai58rc116gqp4a9";
 
   postPatch = ''
     # Fix up various paths that assume llvm and clang are installed in the same place
diff --git a/pkgs/development/compilers/llvm/8/llvm.nix b/pkgs/development/compilers/llvm/8/llvm.nix
index 273e33893fec..5d8d08167298 100644
--- a/pkgs/development/compilers/llvm/8/llvm.nix
+++ b/pkgs/development/compilers/llvm/8/llvm.nix
@@ -22,8 +22,8 @@
 let
   inherit (stdenv.lib) optional optionals optionalString;
 
-  src = fetch "llvm" "1h9zqgf968si0nzdmsa9rz634zrmz6mprvz2ifw6ky0h7va5rcvq";
-  polly_src = fetch "polly" "1wwnn0cxnrmiqb6kg577myz6kb8sm18jwc020lf0b1k5as7aw2kq";
+  src = fetch "llvm" "0k124sxkfhfi1rca6kzkdraf4axhx99x3cw2rk55056628dvwwl8";
+  polly_src = fetch "polly" "1x4xv3j226rqdddp7b61d71wsx2b8vmmri02ycx27y2fg7ba7xg3";
 
   # Used when creating a version-suffixed symlink of libLLVM.dylib
   shortVersion = with stdenv.lib;
@@ -71,6 +71,8 @@ in stdenv.mkDerivation (rec {
     substituteInPlace unittests/Support/CMakeLists.txt \
       --replace "add_subdirectory(DynamicLibrary)" ""
     rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
+    # valgrind unhappy with musl or glibc, but fails w/musl only
+    rm test/CodeGen/AArch64/wineh4.mir
   '' + ''
     patchShebangs test/BugPoint/compile-custom.ll.py
   '';
diff --git a/pkgs/development/compilers/llvm/8/openmp.nix b/pkgs/development/compilers/llvm/8/openmp.nix
index 1a628cf6dd4a..bf85cae5abe7 100644
--- a/pkgs/development/compilers/llvm/8/openmp.nix
+++ b/pkgs/development/compilers/llvm/8/openmp.nix
@@ -9,7 +9,7 @@
 stdenv.mkDerivation {
   name = "openmp-${version}";
 
-  src = fetch "openmp" "1xxxclzizcrfh0k870n4n3hh0khw14sv5i7s2kbdwl099k8b96cv";
+  src = fetch "openmp" "1mf9cpgvix34xlpv0inkgl3qmdvgvp96f7sksqizri0n5xfp1cgp";
 
   nativeBuildInputs = [ cmake perl ];
   buildInputs = [ llvm ];
diff --git a/pkgs/development/compilers/purescript/purescript/default.nix b/pkgs/development/compilers/purescript/purescript/default.nix
new file mode 100644
index 000000000000..5e84f2d874a5
--- /dev/null
+++ b/pkgs/development/compilers/purescript/purescript/default.nix
@@ -0,0 +1,60 @@
+{ stdenv, fetchurl, zlib, gmp, ncurses5, lib }:
+
+# from justinwoo/easy-purescript-nix
+# https://github.com/justinwoo/easy-purescript-nix/blob/d383972c82620a712ead4033db14110497bc2c9c/purs.nix
+
+let
+  dynamic-linker = stdenv.cc.bintools.dynamicLinker;
+
+  patchelf = libPath :
+    if stdenv.isDarwin
+      then ""
+      else
+        ''
+          chmod u+w $PURS
+          patchelf --interpreter ${dynamic-linker} --set-rpath ${libPath} $PURS
+          chmod u-w $PURS
+        '';
+
+in stdenv.mkDerivation rec {
+  name = "purs-simple";
+  version = "v0.12.3";
+
+  src =
+    if stdenv.isDarwin
+    then
+    fetchurl {
+      url = "https://github.com/purescript/purescript/releases/download/v0.12.3/macos.tar.gz";
+      sha256 = "1f916gv4fz571l4jvr15xjnsvjyy4nljv2ii9njwlm7k6yr5m0qn";
+    }
+    else
+    fetchurl {
+      url = "https://github.com/purescript/purescript/releases/download/v0.12.3/linux64.tar.gz";
+      sha256 = "1fad862a2sv4njxbbcfzibbi585m6is3ywb94nmjl8ax254baj3i";
+    };
+
+
+  buildInputs = [ zlib
+                  gmp
+                  ncurses5 ];
+  libPath = lib.makeLibraryPath buildInputs;
+  dontStrip = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    PURS="$out/bin/purs"
+
+    install -D -m555 -T purs $PURS
+    ${patchelf libPath}
+
+    mkdir -p $out/etc/bash_completion.d/
+    $PURS --bash-completion-script $PURS > $out/etc/bash_completion.d/purs-completion.bash
+  '';
+  meta = with stdenv.lib; {
+    description = "A strongly-typed functional programming language that compiles to JavaScript";
+    homepage = http://www.purescript.org/;
+    license = licenses.bsd3;
+    maintainers = [ maintainers.justinwoo ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+  };
+}