ghc: drop all compiler versions prior to 7.10.3

None of these old compilers are used anywhere in Nixpkgs, and keeping those
builds working in the face of regular updates of GCC, binutils, and whatnot is
too much effort for no obvious benefit.
This commit is contained in:
Peter Simons 2018-03-16 21:07:13 +01:00
parent 929dac413b
commit 993bcbb225
13 changed files with 1 additions and 1098 deletions

View File

@ -1,146 +0,0 @@
{ stdenv
, fetchurl, perl
, ncurses5, gmp, libiconv
}:
# Prebuilt only does native
assert stdenv.targetPlatform == stdenv.hostPlatform;
let
libPath = stdenv.lib.makeLibraryPath ([
ncurses5 gmp
] ++ stdenv.lib.optional (stdenv.hostPlatform.isDarwin) libiconv);
libEnvVar = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin "DY"
+ "LD_LIBRARY_PATH";
in
stdenv.mkDerivation rec {
version = "7.0.4";
name = "ghc-${version}-binary";
src = fetchurl ({
"i686-linux" = {
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2";
sha256 = "0mfnihiyjl06f5w1yrjp36sw9g67g2ymg5sdl0g23h1pab99jx63";
};
"x86_64-linux" = {
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2";
sha256 = "0mc4rhqcxz427wq4zgffmnn0d2yjqvy6af4x9mha283p1gdj5q99";
};
"i686-darwin" = {
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-apple-darwin.tar.bz2";
sha256 = "0qj45hslrrr8zfks8m1jcb3awwx9rh35ndnpfmb0gwb6j7azq5n3";
};
"x86_64-darwin" = {
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.bz2";
sha256 = "1m2ml88p1swf4dnv2vq8hz4drcp46n3ahpfi05wh01ajkf8hnn3l";
};
}.${stdenv.hostPlatform.system}
or (throw "cannot bootstrap GHC on this platform"));
nativeBuildInputs = [ perl ];
# Cannot patchelf beforehand due to relative RPATHs that anticipate
# the final install location/
${libEnvVar} = libPath;
postUnpack =
# GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
# during linking
stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
'' +
# Strip is harmful, see also below. It's important that this happens
# first. The GHC Cabal build system makes use of strip by default and
# has hardcoded paths to /usr/bin/strip in many places. We replace
# those below, making them point to our dummy script.
''
mkdir "$TMP/bin"
for i in strip; do
echo '#! ${stdenv.shell}' > "$TMP/bin/$i"
chmod +x "$TMP/bin/$i"
done
PATH="$TMP/bin:$PATH"
'' +
# We have to patch the GMP paths for the integer-gmp package.
''
find . -name integer-gmp.buildinfo \
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \;
'' + stdenv.lib.optionalString stdenv.isDarwin ''
find . -name base.buildinfo \
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
'' +
# Rename needed libraries and binaries, fix interpreter
stdenv.lib.optionalString stdenv.isLinux ''
find . -type f -perm -0100 -exec patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \;
paxmark m ./ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
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
for prog in ld ar gcc strip ranlib; do
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
done
'';
configurePlatforms = [ ];
configureFlags = [
"--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib"
"--with-gmp-includes=${stdenv.lib.getDev gmp}/include"
] ++ stdenv.lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}";
# Stripping combined with patchelf breaks the executables (they die
# with a segfault or the kernel even refuses the execve). (NIXPKGS-85)
dontStrip = true;
# No building is necessary, but calling make without flags ironically
# calls install-strip ...
dontBuild = true;
# On Linux, use patchelf to modify the executables so that they can
# find editline/gmp.
preFixup = stdenv.lib.optionalString stdenv.isLinux ''
find "$out" -type f -executable \
-exec patchelf --set-rpath "${libPath}" {} \;
'' + stdenv.lib.optionalString stdenv.isDarwin ''
# not enough room in the object files for the full path to libiconv :(
for exe in $(find "$out" -type f -executable); do
isScript $exe && continue
ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib
install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib $exe
done
for file in $(find "$out" -name setup-config); do
substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
done
'';
doInstallCheck = true;
installCheckPhase = ''
# Sanity check, can ghc create executables?
cd $TMP
mkdir test-ghc; cd test-ghc
cat > main.hs << EOF
module Main where
main = putStrLn "yes"
EOF
$out/bin/ghc --make main.hs
echo compilation ok
[ $(./main) == "yes" ]
'';
passthru = {
targetPrefix = "";
# Our Cabal compiler name
haskellCompilerName = "ghc-7.0.4";
};
meta.license = stdenv.lib.licenses.bsd3;
meta.platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin"];
}

View File

@ -1,67 +0,0 @@
{ stdenv, fetchurl, ghc, perl, gmp, ncurses, libiconv }:
# TODO(@Ericson2314): Cross compilation support
assert stdenv.targetPlatform == stdenv.hostPlatform;
stdenv.mkDerivation rec {
version = "7.0.4";
name = "ghc-${version}";
src = fetchurl {
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.bz2";
sha256 = "1a9b78d9d66c9c21de6c0932e36bb87406a4856f1611bf83bd44539bdc6ed0ed";
};
patches = [ ./fix-7.0.4-clang.patch ./relocation.patch ];
buildInputs = [ ghc perl gmp ncurses ];
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib"
${stdenv.lib.optionalString stdenv.isDarwin ''
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
''}
'';
preConfigure = ''
echo -n "${buildMK}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString stdenv.isDarwin ''
find . -name '*.hs' | xargs sed -i -e 's|ASSERT (|ASSERT(|' -e 's|ASSERT2 (|ASSERT2(|' -e 's|WARN (|WARN(|'
find . -name '*.lhs' | xargs sed -i -e 's|ASSERT (|ASSERT(|' -e 's|ASSERT2 (|ASSERT2(|' -e 's|WARN (|WARN(|'
export NIX_LDFLAGS+=" -no_dtrace_dof"
'';
configureFlags = if stdenv.isDarwin then "--with-gcc=${./gcc-clang-wrapper.sh}"
else "--with-gcc=${stdenv.cc}/bin/gcc";
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
# required, because otherwise all symbols from HSffi.o are stripped, and
# that in turn causes GHCi to abort
stripDebugFlags=["-S" "--keep-file-symbols"];
passthru = {
targetPrefix = "";
# Our Cabal compiler name
haskellCompilerName = "ghc-7.0.4";
};
meta = {
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = [
stdenv.lib.maintainers.marcweber
stdenv.lib.maintainers.andres
stdenv.lib.maintainers.peti
];
platforms = ["x86_64-linux" "i686-linux"]; # Darwin is not supported.
inherit (ghc.meta) license;
};
}

View File

@ -1,148 +0,0 @@
{ stdenv
, fetchurl, perl
, ncurses5, gmp, libiconv
}:
# Prebuilt only does native
assert stdenv.targetPlatform == stdenv.hostPlatform;
let
libPath = stdenv.lib.makeLibraryPath ([
ncurses5 gmp
] ++ stdenv.lib.optional (stdenv.hostPlatform.isDarwin) libiconv);
libEnvVar = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin "DY"
+ "LD_LIBRARY_PATH";
in
stdenv.mkDerivation rec {
version = "7.4.2";
name = "ghc-${version}-binary";
src = fetchurl ({
"i686-linux" = {
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2";
sha256 = "0gny7knhss0w0d9r6jm1gghrcb8kqjvj94bb7hxf9syrk4fxlcxi";
};
"x86_64-linux" = {
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2";
sha256 = "043jabd0lh6n1zlqhysngbpvlsdznsa2mmsj08jyqgahw9sjb5ns";
};
"i686-darwin" = {
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-apple-darwin.tar.bz2";
sha256 = "1vrbs3pzki37hzym1f1nh07lrqh066z3ypvm81fwlikfsvk4djc0";
};
"x86_64-darwin" = {
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.bz2";
sha256 = "1imzqc0slpg0r6p40n5a9m18cbcm0m86z8dgyhfxcckksw54mzwf";
};
}.${stdenv.hostPlatform.system}
or (throw "cannot bootstrap GHC on this platform"));
nativeBuildInputs = [ perl ];
# Cannot patchelf beforehand due to relative RPATHs that anticipate
# the final install location/
${libEnvVar} = libPath;
postUnpack =
# GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
# during linking
stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
'' +
# Strip is harmful, see also below. It's important that this happens
# first. The GHC Cabal build system makes use of strip by default and
# has hardcoded paths to /usr/bin/strip in many places. We replace
# those below, making them point to our dummy script.
''
mkdir "$TMP/bin"
for i in strip; do
echo '#! ${stdenv.shell}' > "$TMP/bin/$i"
chmod +x "$TMP/bin/$i"
done
PATH="$TMP/bin:$PATH"
'' +
# We have to patch the GMP paths for the integer-gmp package.
''
find . -name integer-gmp.buildinfo \
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \;
'' + stdenv.lib.optionalString stdenv.isDarwin ''
find . -name base.buildinfo \
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
'' +
# Rename needed libraries and binaries, fix interpreter
stdenv.lib.optionalString stdenv.isLinux ''
find . -type f -perm -0100 -exec patchelf \
--replace-needed libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5 libncurses.so \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \;
paxmark m ./ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
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
for prog in ld ar gcc strip ranlib; do
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
done
'';
configurePlatforms = [ ];
configureFlags = [
"--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib"
"--with-gmp-includes=${stdenv.lib.getDev gmp}/include"
] ++ stdenv.lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}";
# Stripping combined with patchelf breaks the executables (they die
# with a segfault or the kernel even refuses the execve). (NIXPKGS-85)
dontStrip = true;
# No building is necessary, but calling make without flags ironically
# calls install-strip ...
dontBuild = true;
# On Linux, use patchelf to modify the executables so that they can
# find editline/gmp.
preFixup = stdenv.lib.optionalString stdenv.isLinux ''
find "$out" -type f -executable \
-exec patchelf --set-rpath "${libPath}" {} \;
'' + stdenv.lib.optionalString stdenv.isDarwin ''
# not enough room in the object files for the full path to libiconv :(
for exe in $(find "$out" -type f -executable); do
isScript $exe && continue
ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib
install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib $exe
done
for file in $(find "$out" -name setup-config); do
substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
done
'';
doInstallCheck = true;
installCheckPhase = ''
# Sanity check, can ghc create executables?
cd $TMP
mkdir test-ghc; cd test-ghc
cat > main.hs << EOF
{-# LANGUAGE TemplateHaskell #-}
module Main where
main = putStrLn \$([|"yes"|])
EOF
$out/bin/ghc --make main.hs || exit 1
echo compilation ok
[ $(./main) == "yes" ]
'';
passthru = {
targetPrefix = "";
# Our Cabal compiler name
haskellCompilerName = "ghc-7.4.2";
};
meta.license = stdenv.lib.licenses.bsd3;
meta.platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin"];
}

View File

@ -1,77 +0,0 @@
{ stdenv, fetchurl, ghc, perl, ncurses, libiconv
, # 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 ? false, gmp ? null
}:
# TODO(@Ericson2314): Cross compilation support
assert stdenv.targetPlatform == stdenv.hostPlatform;
assert !enableIntegerSimple -> gmp != null;
stdenv.mkDerivation rec {
version = "7.4.2";
name = "ghc-${version}";
src = fetchurl {
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.bz2";
sha256 = "0vc3zmxqi4gflssmj35n5c8idbvyrhd88abi50whbirwlf4i5vpj";
};
patches = [ ./fix-7.4.2-clang.patch ./relocation.patch ];
buildInputs = [ ghc perl ncurses ]
++ stdenv.lib.optional (!enableIntegerSimple) gmp;
buildMK = ''
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib"
${stdenv.lib.optionalString stdenv.isDarwin ''
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
''}
'' + (if enableIntegerSimple then ''
INTEGER_LIBRARY = integer-simple
'' else ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
'');
preConfigure = ''
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 ''
find . -name '*.hs' | xargs sed -i -e 's|ASSERT (|ASSERT(|' -e 's|ASSERT2 (|ASSERT2(|' -e 's|WARN (|WARN(|'
find . -name '*.lhs' | xargs sed -i -e 's|ASSERT (|ASSERT(|' -e 's|ASSERT2 (|ASSERT2(|' -e 's|WARN (|WARN(|'
export NIX_LDFLAGS+=" -no_dtrace_dof"
'';
configureFlags = if stdenv.isDarwin then "--with-gcc=${./gcc-clang-wrapper.sh}"
else "--with-gcc=${stdenv.cc}/bin/gcc";
# required, because otherwise all symbols from HSffi.o are stripped, and
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
passthru = {
targetPrefix = "";
# Our Cabal compiler name
haskellCompilerName = "ghc-7.4.2";
};
meta = {
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = [
stdenv.lib.maintainers.marcweber
stdenv.lib.maintainers.andres
stdenv.lib.maintainers.peti
];
inherit (ghc.meta) license platforms;
};
}

View File

@ -1,103 +0,0 @@
{ stdenv, fetchurl, ghc, perl, ncurses, libiconv
, # 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 ? false, gmp ? null
}:
# TODO(@Ericson2314): Cross compilation support
assert stdenv.targetPlatform == stdenv.hostPlatform;
assert !enableIntegerSimple -> gmp != null;
let
# The "-Wa,--noexecstack" options might be needed only with GNU ld (as opposed
# to the gold linker). It prevents binaries' stacks from being marked as
# executable, which fails to run on a grsecurity/PaX kernel.
ghcFlags = "-optc-Wa,--noexecstack -opta-Wa,--noexecstack";
cFlags = "-Wa,--noexecstack";
in stdenv.mkDerivation rec {
version = "7.6.3";
name = "ghc-${version}";
src = fetchurl {
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.bz2";
sha256 = "1669m8k9q72rpd2mzs0bh2q6lcwqiwd1ax3vrard1dgn64yq4hxx";
};
patches = [ ./fix-7.6.3-clang.patch ./relocation.patch ];
buildInputs = [ ghc perl ncurses ]
++ stdenv.lib.optional (!enableIntegerSimple) gmp;
buildMK = ''
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib"
${stdenv.lib.optionalString stdenv.isDarwin ''
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
''}
'' + stdenv.lib.optionalString stdenv.isLinux ''
# Set ghcFlags for building ghc itself
SRC_HC_OPTS += ${ghcFlags}
SRC_CC_OPTS += ${cFlags}
'' + (if enableIntegerSimple then ''
INTEGER_LIBRARY = integer-simple
'' else ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
'');
preConfigure = ''
echo -n "${buildMK}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString stdenv.isLinux ''
# Set ghcFlags for binaries that ghc builds
sed -i -e 's|"\$topdir"|"\$topdir" ${ghcFlags}|' ghc/ghc.wrapper
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
find . -name '*.hs' | xargs sed -i -e 's|ASSERT (|ASSERT(|' -e 's|ASSERT2 (|ASSERT2(|' -e 's|WARN (|WARN(|'
find . -name '*.lhs' | xargs sed -i -e 's|ASSERT (|ASSERT(|' -e 's|ASSERT2 (|ASSERT2(|' -e 's|WARN (|WARN(|'
export NIX_LDFLAGS+=" -no_dtrace_dof"
'';
configureFlags = if stdenv.isDarwin then "--with-gcc=${./gcc-clang-wrapper.sh}"
else "--with-gcc=${stdenv.cc}/bin/gcc";
postInstall = ''
# ghci uses mmap with rwx protection at it implements dynamic
# linking on its own. See:
# - https://bugs.gentoo.org/show_bug.cgi?id=299709
# - https://ghc.haskell.org/trac/ghc/ticket/4244
# Therefore, we have to pax-mark the resulting binary.
# Haddock also seems to run with ghci, so mark it as well.
paxmark m $out/lib/${name}/{ghc,haddock}
'';
# required, because otherwise all symbols from HSffi.o are stripped, and
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
passthru = {
targetPrefix = "";
# Our Cabal compiler name
haskellCompilerName = "ghc-7.6.3";
};
meta = {
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = [
stdenv.lib.maintainers.marcweber
stdenv.lib.maintainers.andres
stdenv.lib.maintainers.peti
];
inherit (ghc.meta) license platforms;
};
}

View File

@ -1,156 +0,0 @@
{ stdenv
, fetchurl, perl
, ncurses5, gmp, libiconv
}:
# Prebuilt only does native
assert stdenv.targetPlatform == stdenv.hostPlatform;
let
libPath = stdenv.lib.makeLibraryPath ([
ncurses5 gmp
] ++ stdenv.lib.optional (stdenv.hostPlatform.isDarwin) libiconv);
libEnvVar = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin "DY"
+ "LD_LIBRARY_PATH";
in
stdenv.mkDerivation rec {
version = "7.8.4";
name = "ghc-${version}-binary";
src = fetchurl ({
"i686-linux" = {
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux-deb7.tar.bz2";
sha256 = "5da2cf45986f33319a92a666f1f0149915334a7b64b41892ab94f4557242b406";
};
"x86_64-linux" = {
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux-deb7.tar.bz2";
sha256 = "20b5731d268613bbf6e977dbb192a3a3b7b78d954c35edbfca4fb36b652e24f7";
};
"x86_64-darwin" = {
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.bz2";
sha256 = "dfa161c2a136ee16214a49d5902e2377407c8292dbbdbb14fa0fa6b17220cae6";
};
}.${stdenv.hostPlatform.system}
or (throw "cannot bootstrap GHC on this platform"));
nativeBuildInputs = [ perl ];
# Cannot patchelf beforehand due to relative RPATHs that anticipate
# the final install location/
${libEnvVar} = libPath;
postUnpack =
# GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
# during linking
stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
# not enough room in the object files for the full path to libiconv :(
for exe in $(find . -type f -executable); do
isScript $exe && continue
ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib
install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib $exe
for file in $(find . -name setup-config); do
substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
done
done
'' +
# Some scripts used during the build need to have their shebangs patched
''
patchShebangs ghc-${version}/utils/
'' +
# Strip is harmful, see also below. It's important that this happens
# first. The GHC Cabal build system makes use of strip by default and
# has hardcoded paths to /usr/bin/strip in many places. We replace
# those below, making them point to our dummy script.
''
mkdir "$TMP/bin"
for i in strip; do
echo '#! ${stdenv.shell}' > "$TMP/bin/$i"
chmod +x "$TMP/bin/$i"
done
PATH="$TMP/bin:$PATH"
'' +
# We have to patch the GMP paths for the integer-gmp package.
''
find . -name integer-gmp.buildinfo \
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \;
'' + stdenv.lib.optionalString stdenv.isDarwin ''
find . -name base.buildinfo \
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
'' +
# Rename needed libraries and binaries, fix interpreter
stdenv.lib.optionalString stdenv.isLinux ''
find . -type f -perm -0100 -exec patchelf \
--replace-needed libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5 libncurses.so \
--replace-needed libtinfo.so libtinfo.so.5 \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \;
paxmark m ./ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
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
'';
configurePlatforms = [ ];
configureFlags = [
"--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib"
"--with-gmp-includes=${stdenv.lib.getDev gmp}/include"
] ++ stdenv.lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}";
# Stripping combined with patchelf breaks the executables (they die
# with a segfault or the kernel even refuses the execve). (NIXPKGS-85)
dontStrip = true;
# No building is necessary, but calling make without flags ironically
# calls install-strip ...
dontBuild = true;
# On Linux, use patchelf to modify the executables so that they can
# find editline/gmp.
preFixup = stdenv.lib.optionalString stdenv.isLinux ''
for p in $(find "$out" -type f -executable); do
if isELF "$p"; then
echo "Patchelfing $p"
patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
fi
done
'' + stdenv.lib.optionalString stdenv.isDarwin ''
# not enough room in the object files for the full path to libiconv :(
for exe in $(find "$out" -type f -executable); do
isScript $exe && continue
ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib
install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib $exe
done
for file in $(find "$out" -name setup-config); do
substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
done
'';
doInstallCheck = true;
installCheckPhase = ''
unset ${libEnvVar}
# Sanity check, can ghc create executables?
cd $TMP
mkdir test-ghc; cd test-ghc
cat > main.hs << EOF
{-# LANGUAGE TemplateHaskell #-}
module Main where
main = putStrLn \$([|"yes"|])
EOF
$out/bin/ghc --make main.hs || exit 1
echo compilation ok
[ $(./main) == "yes" ]
'';
passthru = { targetPrefix = ""; };
meta.license = stdenv.lib.licenses.bsd3;
meta.platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin"];
}

View File

@ -1,91 +0,0 @@
{ stdenv, targetPackages
, fetchurl, ghc, perl
, libffi, libiconv ? null, ncurses
, # 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 ? false, gmp ? null
}:
# TODO(@Ericson2314): Cross compilation support
assert stdenv.targetPlatform == stdenv.hostPlatform;
assert !enableIntegerSimple -> gmp != null;
let
buildMK = ''
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib"
DYNAMIC_BY_DEFAULT = NO
${stdenv.lib.optionalString (stdenv.hostPlatform.libc != "glibc") ''
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
''}
'' + (if enableIntegerSimple then ''
INTEGER_LIBRARY = integer-simple
'' else ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
'');
# Splicer will pull out correct variations
libDeps = [ ncurses ]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (stdenv.hostPlatform.libc != "glibc") libiconv;
in
stdenv.mkDerivation rec {
version = "7.8.4";
name = "ghc-${version}";
src = fetchurl {
url = "http://www.haskell.org/ghc/dist/${version}/${name}-src.tar.xz";
sha256 = "1i4254akbb4ym437rf469gc0m40bxm31blp6s1z1g15jmnacs6f3";
};
enableParallelBuilding = true;
patches = [ ./relocation.patch ]
++ stdenv.lib.optional stdenv.isDarwin ./hpc-7.8.4.patch;
preConfigure = ''
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"
'';
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ];
nativeBuildInputs = [ ghc perl ];
depsBuildTarget = [ targetPackages.stdenv.cc ];
buildInputs = libDeps;
propagatedBuildInputs = [ targetPackages.stdenv.cc ];
depsTargetTarget = map stdenv.lib.getDev libDeps;
depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") libDeps;
# required, because otherwise all symbols from HSffi.o are stripped, and
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
passthru = {
targetPrefix = "";
# Our Cabal compiler name
haskellCompilerName = "ghc-7.8.4";
};
meta = {
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
inherit (ghc.meta) license platforms;
};
}

View File

@ -1,74 +0,0 @@
diff --git a/compiler/codeGen/CgInfoTbls.hs b/compiler/codeGen/CgInfoTbls.hs
index f704a69..37753fd 100644
--- a/compiler/codeGen/CgInfoTbls.hs
+++ b/compiler/codeGen/CgInfoTbls.hs
@@ -211,9 +211,7 @@ mkStackLayout = do
[(offset - frame_sp - retAddrSizeW, b)
| (offset, b) <- binds]
- WARN( not (all (\bind -> fst bind >= 0) rel_binds),
- ppr binds $$ ppr rel_binds $$
- ppr frame_size $$ ppr real_sp $$ ppr frame_sp )
+ WARN( not (all (\bind -> fst bind >= 0) rel_binds), ppr binds $$ ppr rel_binds $$ ppr frame_size $$ ppr real_sp $$ ppr frame_sp )
return $ stack_layout rel_binds frame_size
stack_layout :: [(VirtualSpOffset, CgIdInfo)]
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs
index 638e1db..0aee4b7 100644
--- a/compiler/main/GHC.hs
+++ b/compiler/main/GHC.hs
@@ -788,8 +788,7 @@ load2 how_much mod_graph = do
-- is stable).
partial_mg
| LoadDependenciesOf _mod <- how_much
- = ASSERT( case last partial_mg0 of
- AcyclicSCC ms -> ms_mod_name ms == _mod; _ -> False )
+ = ASSERT( case last partial_mg0 of AcyclicSCC ms -> ms_mod_name ms == _mod; _ -> False )
List.init partial_mg0
| otherwise
= partial_mg0
@@ -879,8 +878,7 @@ load2 how_much mod_graph = do
liftIO $ cleanTempFilesExcept dflags (ppFilesFromSummaries mods_to_keep)
-- there should be no Nothings where linkables should be, now
- ASSERT(all (isJust.hm_linkable)
- (eltsUFM (hsc_HPT hsc_env))) do
+ ASSERT(all (isJust.hm_linkable) (eltsUFM (hsc_HPT hsc_env))) do
-- Link everything together
linkresult <- liftIO $ link (ghcLink dflags) dflags False hpt4
diff --git a/compiler/simplCore/SimplUtils.lhs b/compiler/simplCore/SimplUtils.lhs
index 99a63e4..3268726 100644
--- a/compiler/simplCore/SimplUtils.lhs
+++ b/compiler/simplCore/SimplUtils.lhs
@@ -388,8 +388,7 @@ mkArgInfo fun rules n_val_args call_cont
else
map isStrictDmd demands ++ vanilla_stricts
| otherwise
- -> WARN( True, text "More demands than arity" <+> ppr fun <+> ppr (idArity fun)
- <+> ppr n_val_args <+> ppr demands )
+ -> WARN( True, text "More demands than arity" <+> ppr fun <+> ppr (idArity fun) <+> ppr n_val_args <+> ppr demands )
vanilla_stricts -- Not enough args, or no strictness
add_type_str :: Type -> [Bool] -> [Bool]
@@ -1812,4 +1811,4 @@ without getting changed to c1=I# c2.
I don't think this is worth fixing, even if I knew how. It'll
all come out in the next pass anyway.
-
\ No newline at end of file
+
diff --git a/compiler/simplCore/Simplify.lhs b/compiler/simplCore/Simplify.lhs
index d0fbd8d..ef87996 100644
--- a/compiler/simplCore/Simplify.lhs
+++ b/compiler/simplCore/Simplify.lhs
@@ -2071,8 +2071,7 @@ mkDupableAlt env case_bndr (con, bndrs', rhs')
rhs = mkConApp dc (map Type (tyConAppArgs scrut_ty)
++ varsToCoreExprs bndrs')
- LitAlt {} -> WARN( True, ptext (sLit "mkDupableAlt")
- <+> ppr case_bndr <+> ppr con )
+ LitAlt {} -> WARN( True, ptext (sLit "mkDupableAlt") <+> ppr case_bndr <+> ppr con )
case_bndr
-- The case binder is alive but trivial, so why has
-- it not been substituted away?

View File

@ -1,74 +0,0 @@
diff --git a/compiler/codeGen/CgInfoTbls.hs b/compiler/codeGen/CgInfoTbls.hs
index dbd22f3..42208f9 100644
--- a/compiler/codeGen/CgInfoTbls.hs
+++ b/compiler/codeGen/CgInfoTbls.hs
@@ -210,9 +210,7 @@ mkStackLayout = do
[(offset - frame_sp - retAddrSizeW, b)
| (offset, b) <- binds]
- WARN( not (all (\bind -> fst bind >= 0) rel_binds),
- ppr binds $$ ppr rel_binds $$
- ppr frame_size $$ ppr real_sp $$ ppr frame_sp )
+ WARN( not (all (\bind -> fst bind >= 0) rel_binds), ppr binds $$ ppr rel_binds $$ ppr frame_size $$ ppr real_sp $$ ppr frame_sp )
return $ stack_layout rel_binds frame_size
stack_layout :: [(VirtualSpOffset, CgIdInfo)]
diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs
index dece548..9643f30 100644
--- a/compiler/main/GhcMake.hs
+++ b/compiler/main/GhcMake.hs
@@ -236,8 +236,7 @@ load2 how_much mod_graph = do
-- is stable).
partial_mg
| LoadDependenciesOf _mod <- how_much
- = ASSERT( case last partial_mg0 of
- AcyclicSCC ms -> ms_mod_name ms == _mod; _ -> False )
+ = ASSERT( case last partial_mg0 of AcyclicSCC ms -> ms_mod_name ms == _mod; _ -> False )
List.init partial_mg0
| otherwise
= partial_mg0
@@ -331,8 +330,7 @@ load2 how_much mod_graph = do
liftIO $ intermediateCleanTempFiles dflags mods_to_keep hsc_env1
-- there should be no Nothings where linkables should be, now
- ASSERT(all (isJust.hm_linkable)
- (eltsUFM (hsc_HPT hsc_env))) do
+ ASSERT(all (isJust.hm_linkable) (eltsUFM (hsc_HPT hsc_env))) do
-- Link everything together
linkresult <- liftIO $ link (ghcLink dflags) dflags False hpt4
diff --git a/compiler/simplCore/SimplUtils.lhs b/compiler/simplCore/SimplUtils.lhs
index dd0ce4b..9501e73 100644
--- a/compiler/simplCore/SimplUtils.lhs
+++ b/compiler/simplCore/SimplUtils.lhs
@@ -393,8 +393,7 @@ mkArgInfo fun rules n_val_args call_cont
else
map isStrictDmd demands ++ vanilla_stricts
| otherwise
- -> WARN( True, text "More demands than arity" <+> ppr fun <+> ppr (idArity fun)
- <+> ppr n_val_args <+> ppr demands )
+ -> WARN( True, text "More demands than arity" <+> ppr fun <+> ppr (idArity fun) <+> ppr n_val_args <+> ppr demands )
vanilla_stricts -- Not enough args, or no strictness
add_type_str :: Type -> [Bool] -> [Bool]
@@ -1845,4 +1844,4 @@ without getting changed to c1=I# c2.
I don't think this is worth fixing, even if I knew how. It'll
all come out in the next pass anyway.
-
\ No newline at end of file
+
diff --git a/compiler/simplCore/Simplify.lhs b/compiler/simplCore/Simplify.lhs
index adcaf13..06d939d 100644
--- a/compiler/simplCore/Simplify.lhs
+++ b/compiler/simplCore/Simplify.lhs
@@ -2185,8 +2185,7 @@ mkDupableAlt env case_bndr (con, bndrs', rhs')
rhs = mkConApp dc (map Type (tyConAppArgs scrut_ty)
++ varsToCoreExprs bndrs')
- LitAlt {} -> WARN( True, ptext (sLit "mkDupableAlt")
- <+> ppr case_bndr <+> ppr con )
+ LitAlt {} -> WARN( True, ptext (sLit "mkDupableAlt") <+> ppr case_bndr <+> ppr con )
case_bndr
-- The case binder is alive but trivial, so why has
-- it not been substituted away?

View File

@ -1,57 +0,0 @@
diff --git a/compiler/codeGen/CgInfoTbls.hs b/compiler/codeGen/CgInfoTbls.hs
index 25ba154..fbb7874 100644
--- a/compiler/codeGen/CgInfoTbls.hs
+++ b/compiler/codeGen/CgInfoTbls.hs
@@ -178,9 +178,7 @@ mkStackLayout = do
[(offset - frame_sp - retAddrSizeW, b)
| (offset, b) <- binds]
- WARN( not (all (\bind -> fst bind >= 0) rel_binds),
- pprPlatform platform binds $$ pprPlatform platform rel_binds $$
- ppr frame_size $$ ppr real_sp $$ ppr frame_sp )
+ WARN( not (all (\bind -> fst bind >= 0) rel_binds), pprPlatform platform binds $$ pprPlatform platform rel_binds $$ ppr frame_size $$ ppr real_sp $$ ppr frame_sp )
return $ stack_layout rel_binds frame_size
stack_layout :: [(VirtualSpOffset, CgIdInfo)]
diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs
index 091e1be..23447e4 100644
--- a/compiler/main/GhcMake.hs
+++ b/compiler/main/GhcMake.hs
@@ -338,8 +338,7 @@ load2 how_much mod_graph = do
liftIO $ intermediateCleanTempFiles dflags mods_to_keep hsc_env1
-- there should be no Nothings where linkables should be, now
- ASSERT(all (isJust.hm_linkable)
- (eltsUFM (hsc_HPT hsc_env))) do
+ ASSERT(all (isJust.hm_linkable) (eltsUFM (hsc_HPT hsc_env))) do
-- Link everything together
linkresult <- liftIO $ link (ghcLink dflags) dflags False hpt4
diff --git a/compiler/simplCore/SimplUtils.lhs b/compiler/simplCore/SimplUtils.lhs
index 86dc88d..ecde4fd 100644
--- a/compiler/simplCore/SimplUtils.lhs
+++ b/compiler/simplCore/SimplUtils.lhs
@@ -407,8 +407,7 @@ mkArgInfo fun rules n_val_args call_cont
else
map isStrictDmd demands ++ vanilla_stricts
| otherwise
- -> WARN( True, text "More demands than arity" <+> ppr fun <+> ppr (idArity fun)
- <+> ppr n_val_args <+> ppr demands )
+ -> WARN( True, text "More demands than arity" <+> ppr fun <+> ppr (idArity fun) <+> ppr n_val_args <+> ppr demands )
vanilla_stricts -- Not enough args, or no strictness
add_type_str :: Type -> [Bool] -> [Bool]
diff --git a/compiler/simplCore/Simplify.lhs b/compiler/simplCore/Simplify.lhs
index 3bd95a7..4c9ee7c 100644
--- a/compiler/simplCore/Simplify.lhs
+++ b/compiler/simplCore/Simplify.lhs
@@ -2336,8 +2336,7 @@ mkDupableAlt env case_bndr (con, bndrs', rhs')
rhs = mkConApp dc (map Type (tyConAppArgs scrut_ty)
++ varsToCoreExprs bndrs')
- LitAlt {} -> WARN( True, ptext (sLit "mkDupableAlt")
- <+> ppr case_bndr <+> ppr con )
+ LitAlt {} -> WARN( True, ptext (sLit "mkDupableAlt") <+> ppr case_bndr <+> ppr con )
case_bndr
-- The case binder is alive but trivial, so why has
-- it not been substituted away?

View File

@ -1,71 +0,0 @@
diff --git a/compiler/codeGen/CgInfoTbls.hs b/compiler/codeGen/CgInfoTbls.hs
index 7cdb1b6..e953507 100644
--- a/compiler/codeGen/CgInfoTbls.hs
+++ b/compiler/codeGen/CgInfoTbls.hs
@@ -157,9 +157,7 @@ mkStackLayout = do
[(offset - frame_sp - retAddrSizeW, b)
| (offset, b) <- binds]
- WARN( not (all (\bind -> fst bind >= 0) rel_binds),
- ppr binds $$ ppr rel_binds $$
- ppr frame_size $$ ppr real_sp $$ ppr frame_sp )
+ WARN( not (all (\bind -> fst bind >= 0) rel_binds), ppr binds $$ ppr rel_binds $$ ppr frame_size $$ ppr real_sp $$ ppr frame_sp )
return $ stack_layout rel_binds frame_size
stack_layout :: [(VirtualSpOffset, CgIdInfo)]
diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs
index f563cd9..4ac7812 100644
--- a/compiler/main/GhcMake.hs
+++ b/compiler/main/GhcMake.hs
@@ -331,8 +331,7 @@ load how_much = do
liftIO $ intermediateCleanTempFiles dflags mods_to_keep hsc_env1
-- there should be no Nothings where linkables should be, now
- ASSERT(all (isJust.hm_linkable)
- (eltsUFM (hsc_HPT hsc_env))) do
+ ASSERT(all (isJust.hm_linkable) (eltsUFM (hsc_HPT hsc_env))) do
-- Link everything together
linkresult <- liftIO $ link (ghcLink dflags) dflags False hpt4
diff --git a/compiler/simplCore/SimplUtils.lhs b/compiler/simplCore/SimplUtils.lhs
index 87aefba..479d2ef 100644
--- a/compiler/simplCore/SimplUtils.lhs
+++ b/compiler/simplCore/SimplUtils.lhs
@@ -415,8 +415,7 @@ mkArgInfo fun rules n_val_args call_cont
else
map isStrictDmd demands ++ vanilla_stricts
| otherwise
- -> WARN( True, text "More demands than arity" <+> ppr fun <+> ppr (idArity fun)
- <+> ppr n_val_args <+> ppr demands )
+ -> WARN( True, text "More demands than arity" <+> ppr fun <+> ppr (idArity fun) <+> ppr n_val_args <+> ppr demands )
vanilla_stricts -- Not enough args, or no strictness
add_type_str :: Type -> [Bool] -> [Bool]
diff --git a/compiler/simplCore/Simplify.lhs b/compiler/simplCore/Simplify.lhs
index f2ed224..464fad6 100644
--- a/compiler/simplCore/Simplify.lhs
+++ b/compiler/simplCore/Simplify.lhs
@@ -2359,8 +2359,7 @@ mkDupableAlt env case_bndr (con, bndrs', rhs')
rhs = mkConApp dc (map Type (tyConAppArgs scrut_ty)
++ varsToCoreExprs bndrs')
- LitAlt {} -> WARN( True, ptext (sLit "mkDupableAlt")
- <+> ppr case_bndr <+> ppr con )
+ LitAlt {} -> WARN( True, ptext (sLit "mkDupableAlt") <+> ppr case_bndr <+> ppr con )
case_bndr
-- The case binder is alive but trivial, so why has
-- it not been substituted away?
diff --git a/compiler/types/Coercion.lhs b/compiler/types/Coercion.lhs
index 42e54ba..9b420ae 100644
--- a/compiler/types/Coercion.lhs
+++ b/compiler/types/Coercion.lhs
@@ -498,8 +498,7 @@ splitForAllCo_maybe _ = Nothing
coVarKind :: CoVar -> (Type,Type)
coVarKind cv
| Just (tc, [_kind,ty1,ty2]) <- splitTyConApp_maybe (varType cv)
- = ASSERT (tc `hasKey` eqPrimTyConKey)
- (ty1,ty2)
+ = ASSERT (tc `hasKey` eqPrimTyConKey) (ty1,ty2)
| otherwise = panic "coVarKind, non coercion variable"
-- | Makes a coercion type from two types: the types whose equality

View File

@ -1,13 +0,0 @@
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
index 991fc57..0aad221 100644
--- a/compiler/cmm/CLabel.hs
+++ b/compiler/cmm/CLabel.hs
@@ -877,7 +877,7 @@ labelDynamic dflags this_pkg this_mod lbl =
PlainModuleInitLabel m -> not (gopt Opt_Static dflags) && this_pkg /= (modulePackageId m)
- HpcTicksLabel m -> not (gopt Opt_Static dflags) && this_pkg /= (modulePackageId m)
+ HpcTicksLabel m -> not (gopt Opt_Static dflags) && this_mod /= m
-- Note that DynamicLinkerLabels do NOT require dynamic linking themselves.
_ -> False

View File

@ -6,16 +6,11 @@
let
# These are attributes in compiler and packages that don't support integer-simple.
integerSimpleExcludes = [
"ghc704Binary"
"ghc742Binary"
"ghc784Binary"
"ghc7103Binary"
"ghc821Binary"
"ghc704"
"ghc763"
"ghcCross"
"ghcjs"
"ghcjsHEAD"
"ghcCross"
"integer-simple"
];
@ -31,24 +26,9 @@ in rec {
compiler = {
ghc704Binary = callPackage ../development/compilers/ghc/7.0.4-binary.nix { gmp = pkgs.gmp4; };
ghc742Binary = callPackage ../development/compilers/ghc/7.4.2-binary.nix { gmp = pkgs.gmp4; };
ghc784Binary = callPackage ../development/compilers/ghc/7.8.4-binary.nix { };
ghc7103Binary = callPackage ../development/compilers/ghc/7.10.3-binary.nix { };
ghc821Binary = callPackage ../development/compilers/ghc/8.2.1-binary.nix { };
ghc704 = callPackage ../development/compilers/ghc/7.0.4.nix {
ghc = compiler.ghc704Binary;
};
ghc742 = callPackage ../development/compilers/ghc/7.4.2.nix {
ghc = compiler.ghc704Binary;
};
ghc763 = callPackage ../development/compilers/ghc/7.6.3.nix {
ghc = compiler.ghc704Binary;
};
ghc784 = callPackage ../development/compilers/ghc/7.8.4.nix {
ghc = compiler.ghc742Binary;
};
ghc7103 = callPackage ../development/compilers/ghc/7.10.3.nix rec {
bootPkgs = packages.ghc7103Binary;
inherit (bootPkgs) hscolour;