Merge commit '3b29468313bc8604fe8f85c8d9316fd276d3985c' into HEAD

This commit is contained in:
Frederik Rietdijk
2017-08-21 04:44:40 +02:00
117 changed files with 614 additions and 652 deletions

View File

@@ -344,8 +344,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null &&
hasAttr "propagatedBuildInputs" libcCross)
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs);
LIBRARY_PATH = makeLibraryPath ([]

View File

@@ -467,7 +467,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs);
LIBRARY_PATH = makeLibraryPath ([]

View File

@@ -473,7 +473,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs);
LIBRARY_PATH = makeLibraryPath ([]

View File

@@ -325,13 +325,7 @@ stdenv.mkDerivation ({
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
preConfigure =
# Not sure why this is causing problems, now that the stdenv
# exports CPP=cpp the build fails with strange errors on darwin.
# https://github.com/NixOS/nixpkgs/issues/27889
stdenv.lib.optionalString stdenv.cc.isClang ''
unset CPP
'' + stdenv.lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
preConfigure = stdenv.lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g`
export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET"
export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET"
@@ -497,7 +491,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs);
LIBRARY_PATH = makeLibraryPath ([]

View File

@@ -226,6 +226,19 @@ stdenv.mkDerivation ({
hardeningDisable = [ "format" ];
# This should kill all the stdinc frameworks that gcc and friends like to
# insert into default search paths.
prePatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
substituteInPlace gcc/config/darwin-c.c \
--replace 'if (stdinc)' 'if (0)'
substituteInPlace libgcc/config/t-slibgcc-darwin \
--replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name $lib/lib/\$(SHLIB_INSTALL_NAME)"
substituteInPlace libgfortran/configure \
--replace "-install_name \\\$rpath/\\\$soname" "-install_name $lib/lib/\\\$soname"
'';
postPatch =
if (hostPlatform.isHurd
|| (libcCross != null # e.g., building `gcc.crossDrv'
@@ -468,7 +481,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs")
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs);
LIBRARY_PATH = makeLibraryPath ([]

View File

@@ -228,6 +228,19 @@ stdenv.mkDerivation ({
hardeningDisable = [ "format" ];
# This should kill all the stdinc frameworks that gcc and friends like to
# insert into default search paths.
prePatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
substituteInPlace gcc/config/darwin-c.c \
--replace 'if (stdinc)' 'if (0)'
substituteInPlace libgcc/config/t-slibgcc-darwin \
--replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name $lib/lib/\$(SHLIB_INSTALL_NAME)"
substituteInPlace libgfortran/configure \
--replace "-install_name \\\$rpath/\\\$soname" "-install_name $lib/lib/\\\$soname"
'';
postPatch =
if (hostPlatform.isHurd
|| (libcCross != null # e.g., building `gcc.crossDrv'
@@ -470,7 +483,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs")
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs);
LIBRARY_PATH = makeLibraryPath ([]

View File

@@ -470,7 +470,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs")
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs);
LIBRARY_PATH = makeLibraryPath ([]

View File

@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
outputs = [ "out" "doc" ];
outputs = [ "out" "man" "doc" ];
preConfigure = ''
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure

View File

@@ -21,42 +21,42 @@ let
else
throw "openjdk requires i686-linux or x86_64 linux";
update = "141";
build = "15";
update = "152";
build = "04";
baseurl = "http://hg.openjdk.java.net/jdk8u/jdk8u";
repover = "jdk8u${update}-b${build}";
paxflags = if stdenv.isi686 then "msp" else "m";
jdk8 = fetchurl {
url = "${baseurl}/archive/${repover}.tar.gz";
sha256 = "0b2nf1x2wcjn0ijyxhnrhcap4vq43sbblh5kf0qcqmx83cs3z6yh";
sha256 = "1hnpbx0v89jmbg58ym4zm255da11zf5jq8y5s58zj4x2z6b1fpxi";
};
langtools = fetchurl {
url = "${baseurl}/langtools/archive/${repover}.tar.gz";
sha256 = "1mirjjywv7mnirrxj5sx3zg6j2864vjvphkn9mxx1pad49by7157";
sha256 = "060q01msfyspn14c9mkf9x0l8sprki9n8zb3cwlgglhnr2d4gfbr";
};
hotspot = fetchurl {
url = "${baseurl}/hotspot/archive/${repover}.tar.gz";
sha256 = "0hhvsrclx58i7ns2v7la2wncnndblppwjncniwcvhnhgl5zhpp31";
sha256 = "0705667y6llsmszvdcbhbxzbn1csv1f2rlyghwggx5xnaq46dhx6";
};
corba = fetchurl {
url = "${baseurl}/corba/archive/${repover}.tar.gz";
sha256 = "1brr72rlpaz70ihymdyp808vw433cr8b11l5qdc76aic2ywbwjyp";
sha256 = "13f4h43lw9q1292fymn2d7whwvccpkcqraasdhvzf904101xcpsl";
};
jdk = fetchurl {
url = "${baseurl}/jdk/archive/${repover}.tar.gz";
sha256 = "1d4q531jswzk00kdskzfkgr0f4qmxpc7pg9w8p1gq84yz93wz11k";
sha256 = "16wqinqv0aqyf6jg3nsn6rj5s7ggq82wvx86zm584g56011vkgf6";
};
jaxws = fetchurl {
url = "${baseurl}/jaxws/archive/${repover}.tar.gz";
sha256 = "0haw5095p45w33m8pafnp5r5j2lif8c1271chad5sp4gbbk40ai4";
sha256 = "0japl4nyb8y3w1mpfpkxn5vkf8fap1rg340vjnb6qm6fpqvl964f";
};
jaxp = fetchurl {
url = "${baseurl}/jaxp/archive/${repover}.tar.gz";
sha256 = "0pm2cccy31d9rnkgc2hcxbpjjhf4wbayx18qn736nncvwcwa76bj";
sha256 = "024zphx9r92ws9xjihvhyrbbbamfl7js0s24ff577v5z5gdb1lly";
};
nashorn = fetchurl {
url = "${baseurl}/nashorn/archive/${repover}.tar.gz";
sha256 = "1g05vfggjjg51dki28zby27pnd4z1b23fv9kyc3hdmc4bcj306x0";
sha256 = "1crnbjjv1s6ndqpllcrggcpsxvqcnpr58zp51y0hjz3m3gpsxwcq";
};
openjdk8 = stdenv.mkDerivation {
name = "openjdk-8u${update}b${build}";
@@ -98,6 +98,10 @@ let
substituteInPlace configure --replace /bin/bash "$shell"
substituteInPlace hotspot/make/linux/adlc_updater --replace /bin/sh "$shell"
substituteInPlace hotspot/make/linux/makefiles/dtrace.make --replace /usr/include/sys/sdt.h "/no-such-path"
''
# https://bugzilla.redhat.com/show_bug.cgi?id=1306558
+ stdenv.lib.optionalString stdenv.cc.isGNU ''
NIX_CFLAGS_COMPILE+=" -fno-lifetime-dse -fno-delete-null-pointer-checks"
'';
configureFlags = [

View File

@@ -124,7 +124,7 @@ stdenv.mkDerivation {
buildInputs = [ ncurses ] ++ targetToolchains
++ optional (!forceBundledLLVM) llvmShared;
outputs = [ "out" "doc" ];
outputs = [ "out" "man" "doc" ];
setOutputFlags = false;
# Disable codegen units for the tests.