Merge commit '703a9f93c1254f7bdf0350ca0462de0d78033c62' into gcc-simplify-flags

This commit is contained in:
John Ericson
2017-12-05 17:58:16 -05:00
1287 changed files with 31668 additions and 79990 deletions

View File

@@ -3,12 +3,12 @@
stdenv.mkDerivation rec {
name = "chez-scheme-${version}";
version = "9.5-${dver}";
dver = "20171012";
dver = "20171109";
src = fetchgit {
url = "https://github.com/cisco/chezscheme.git";
rev = "adb3b7bb22ddaa1ba91b98b6f4a647427c3a4d9b";
sha256 = "0hiynf7g0q77ipqxjsqdm2zb0m15bl1hhp615fn3i2hv0qz5a4xr";
rev = "bc117fd4d567a6863689fec6814882a0f04e577a";
sha256 = "1adzw7bgdz0p4xmccc6awdkb7bp6xba9mnlsh3r3zvblqfci8i70";
fetchSubmodules = true;
};

View File

@@ -37,7 +37,7 @@ stdenv.mkDerivation ({
wrapProgram $f \
--set CHICKEN_REPOSITORY $CHICKEN_REPOSITORY \
--prefix CHICKEN_REPOSITORY_EXTRA : "$out/lib/chicken/${toString chicken.binaryVersion}/:$CHICKEN_REPOSITORY_EXTRA" \
--prefix CHICKEN_INCLUDE_PATH \; \"$CHICKEN_INCLUDE_PATH\;$out/share/\" \
--prefix CHICKEN_INCLUDE_PATH \; "$CHICKEN_INCLUDE_PATH;$out/share/" \
--prefix PATH : "$out/bin:${chicken}/bin:$CHICKEN_REPOSITORY_EXTRA:$CHICKEN_REPOSITORY"
done

View File

@@ -64,7 +64,7 @@ stdenv.mkDerivation rec {
installPhase = ''
install -Dm755 .build/crystal $out/bin/crystal
wrapProgram $out/bin/crystal \
--suffix CRYSTAL_PATH : $out/lib/crystal \
--suffix CRYSTAL_PATH : lib:$out/lib/crystal \
--suffix LIBRARY_PATH : $libPath
install -dm755 $out/lib/crystal
cp -r src/* $out/lib/crystal/

View File

@@ -146,7 +146,7 @@ stdenv.mkDerivation rec {
wrapProgram $out/bin/dmd \
--prefix PATH ":" "${stdenv.cc}/bin" \
--set CC "$""{CC:-$CC""}"
--set-default CC "$CC"
cd $out/bin
tee dmd.conf << EOF

View File

@@ -152,7 +152,7 @@ stdenv.mkDerivation rec {
wrapProgram $out/bin/dmd \
--prefix PATH ":" "${stdenv.cc}/bin" \
--set CC "$""{CC:-$CC""}"
--set-default CC "$CC"
cd $out/bin
tee dmd.conf << EOF

View File

@@ -1,18 +1,35 @@
{ stdenv, fetchgit, flex, bison }:
{ stdenv, fetchgit, fetchpatch, flex, bison, pkgconfig, python2, swig, which }:
stdenv.mkDerivation rec {
name = "dtc-${version}";
version = "1.4.4";
version = "1.4.5";
src = fetchgit {
url = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git";
rev = "refs/tags/v${version}";
sha256 = "1pxp7700b3za7q4fnsnxx6i8v66rnr8p6lyi7jf684y1hq5ynlnf";
sha256 = "10y5pbkcj5gkijcgnlvrh6q2prpnvsgihb9asz3zfp66mcjwzsy3";
};
nativeBuildInputs = [ flex bison ];
nativeBuildInputs = [ flex bison pkgconfig swig which ];
buildInputs = [ python2 ];
installFlags = [ "INSTALL=install" "PREFIX=$(out)" ];
patches = [
# Fix 32-bit build
(fetchpatch {
url = "https://git.kernel.org/pub/scm/utils/dtc/dtc.git/patch/?id=497432fd2131967f349e69dc5d259072151cc4b4";
sha256 = "1hrvhvz0qkck53mhacrc4rxjrvp34d8dkw7xb5lr4gpg32grvkpq";
})
# Fix setup.py
(fetchpatch {
url = "https://github.com/dezgeg/dtc/commit/d94a745148ba5c9198143ccc0f7d877fe498ab73.patch";
sha256 = "0hpryx04j1swvmjisrfhvss08zzz4nxz9iv72lp4jdgg6vg0argl";
})
];
postPatch = ''
patchShebangs pylibfdt/
'';
installFlags = [ "INSTALL=install" "PREFIX=$(out)" "SETUP_PREFIX=$(out)" ];
meta = with stdenv.lib; {
description = "Device Tree Compiler";

View File

@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper ];
buildInputs = with ocamlPackages; [
z3 ocaml findlib ocaml_batteries menhir stdint
z3 ocaml findlib batteries menhir stdint
zarith camlp4 yojson pprint
];

View File

@@ -184,7 +184,7 @@ let version = "4.8.5";
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
bootstrap = targetPlatform == hostPlatform && !hostPlatform.isArm && !hostPlatform.isMips;
bootstrap = targetPlatform == hostPlatform;
in
@@ -341,14 +341,6 @@ stdenv.mkDerivation ({
}"
] ++
# Optional features
optional (isl != null) "--with-isl=${isl}" ++
optionals (cloog != null) [
"--with-cloog=${cloog}"
"--disable-cloog-version-check"
"--enable-cloog-backend=isl"
] ++
(if enableMultilib
then ["--enable-multilib" "--disable-libquadmath"]
else ["--disable-multilib"]) ++
@@ -357,6 +349,14 @@ stdenv.mkDerivation ({
then ["--enable-plugin"]
else ["--disable-plugin"]) ++
# Optional features
optional (isl != null) "--with-isl=${isl}" ++
optionals (cloog != null) [
"--with-cloog=${cloog}"
"--disable-cloog-version-check"
"--enable-cloog-backend=isl"
] ++
# Java options
optionals langJava [
"--with-ecj-jar=${javaEcj}"
@@ -444,7 +444,7 @@ stdenv.mkDerivation ({
STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null
# If we are making a cross compiler, targetPlatform != hostPlatform
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
buildFlags = "";
@@ -490,7 +490,7 @@ stdenv.mkDerivation ({
EXTRA_TARGET_CFLAGS =
if targetPlatform != hostPlatform && libcCross != null then [
"-idirafter ${libcCross.dev}/include"
"-idirafter ${getDev libcCross}/include"
]
++ optionals (! crossStageStatic) [
"-B${libcCross.out}/lib"

View File

@@ -442,7 +442,7 @@ stdenv.mkDerivation ({
STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null
# If we are making a cross compiler, targetPlatform != hostPlatform
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
buildFlags = "";
@@ -488,7 +488,7 @@ stdenv.mkDerivation ({
EXTRA_TARGET_CFLAGS =
if targetPlatform != hostPlatform && libcCross != null then [
"-idirafter ${libcCross.dev}/include"
"-idirafter ${getDev libcCross}/include"
]
++ optionals (! crossStageStatic) [
"-B${libcCross.out}/lib"

View File

@@ -199,8 +199,6 @@ stdenv.mkDerivation ({
inherit sha256;
};
hardeningDisable = [ "format" ];
inherit patches;
outputs = [ "out" "lib" "man" "info" ];
@@ -209,6 +207,8 @@ stdenv.mkDerivation ({
libc_dev = stdenv.cc.libc_dev;
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 ''
@@ -354,9 +354,6 @@ stdenv.mkDerivation ({
}"
] ++
# Optional features
optional (isl != null) "--with-isl=${isl}" ++
(if enableMultilib
then ["--enable-multilib" "--disable-libquadmath"]
else ["--disable-multilib"]) ++
@@ -365,6 +362,9 @@ stdenv.mkDerivation ({
then ["--enable-plugin"]
else ["--disable-plugin"]) ++
# Optional features
optional (isl != null) "--with-isl=${isl}" ++
# Java options
optionals langJava [
"--with-ecj-jar=${javaEcj}"
@@ -452,7 +452,7 @@ stdenv.mkDerivation ({
STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null
# If we are making a cross compiler, targetPlatform != hostPlatform
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
buildFlags = "";
@@ -478,7 +478,7 @@ stdenv.mkDerivation ({
CPATH = makeSearchPathOutput "dev" "include" ([]
++ optional (zlib != null) zlib
++ optionals langJava [ boehmgc ]
++ optional langJava boehmgc
++ optionals javaAwtGtk xlibs
++ optionals javaAwtGtk [ gmp mpfr ]
++ optional (libpthread != null) libpthread

View File

@@ -179,7 +179,7 @@ let version = "6.4.0";
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
bootstrap = targetPlatform == hostPlatform;
bootstrap = targetPlatform == hostPlatform;
in
@@ -381,7 +381,7 @@ stdenv.mkDerivation ({
# Ada
optional langAda "--enable-libada" ++
# Cross compilation
# Cross-compilation
optional (targetPlatform == hostPlatform) (
let incDir = if hostPlatform.isDarwin
then "${darwin.usr-include}"
@@ -395,7 +395,7 @@ stdenv.mkDerivation ({
# Platform-specific flags
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
optionals (hostPlatform.isSunOS) [
optionals hostPlatform.isSunOS [
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
# On Illumos/Solaris GNU as is preferred
"--with-gnu-as" "--without-gnu-ld"
@@ -452,7 +452,7 @@ stdenv.mkDerivation ({
STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null
# If we are making a cross compiler, targetPlatform != hostPlatform
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
buildFlags = "";

View File

@@ -447,7 +447,7 @@ stdenv.mkDerivation ({
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, targetPlatform != hostPlatform
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
buildFlags = "";
};

View File

@@ -433,7 +433,7 @@ stdenv.mkDerivation ({
STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null
# If we are making a cross compiler, targetPlatform != hostPlatform
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
buildFlags = "";
@@ -532,6 +532,8 @@ stdenv.mkDerivation ({
stdenv.lib.platforms.linux ++
stdenv.lib.platforms.freebsd ++
optionals (langAda == false) stdenv.lib.platforms.darwin;
broken = true;
};
}

View File

@@ -9,7 +9,7 @@
let
inherit (bootPkgs) ghc;
version = "8.2.1.20171108";
version = "8.2.2";
commonBuildInputs = [ alex autoconf automake ghc happy hscolour perl python3 sphinx ];
commonPreConfigure = ''
@@ -26,14 +26,12 @@ in stdenv.mkDerivation (rec {
name = "ghc-${version}";
src = fetchurl {
url = "https://downloads.haskell.org/~ghc/8.2.2-rc3/${name}-src.tar.xz";
sha256 = "13h55vcrs243bv4hv8i4jq80rsx5hvhi09r3rcs562d8zk7k665w";
url = "https://downloads.haskell.org/~ghc/8.2.2/${name}-src.tar.xz";
sha256 = "1z05vkpaj54xdypmaml50hgsdpw29dhbs2r7magx0cm199iw73mv";
};
postPatch = "patchShebangs .";
patches = [ ./ghc-gold-linker.patch ];
preConfigure = commonPreConfigure;
buildInputs = commonBuildInputs;

View File

@@ -23,6 +23,9 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "all" ];
# The tests try to do stuff with 127.0.0.1 and localhost
__darwinAllowLocalNetworking = true;
# I'm not sure what go wants from its 'src', but the go installation manual
# describes an installation keeping the src.
preUnpack = ''

View File

@@ -118,11 +118,8 @@ stdenv.mkDerivation rec {
./ssl-cert-file-1.9.patch
./creds-test.patch
./remove-test-pie-1.9.patch
(fetchpatch {
url = "https://github.com/golang/go/commit/29415eb2b92e78481897c4161ba99f5b09fa6102.patch";
sha256 = "01jkm4b2dazzjnfla7rdd0w2clzplga3zza6ybpmkjkk3i4bp73d";
})
./go-1.9-skip-flaky-19608.patch
./go-1.9-skip-flaky-20072.patch
];
postPatch = optionalString stdenv.isDarwin ''

View File

@@ -0,0 +1,12 @@
diff --git a/src/net/http/serve_test.go b/src/net/http/serve_test.go
index 7137599..43cca2e 100644
--- a/src/net/http/serve_test.go
+++ b/src/net/http/serve_test.go
@@ -5361,6 +5361,7 @@ func testServerKeepAlivesEnabled(t *testing.T, h2 bool) {
// the server's doing its 1-byte background read between requests,
// waiting for the connection to maybe close.
func TestServerCancelsReadTimeoutWhenIdle(t *testing.T) {
+ testenv.SkipFlaky(t, 19608)
setParallel(t)
defer afterTest(t)
const timeout = 250 * time.Millisecond

View File

@@ -0,0 +1,20 @@
diff --git a/src/sync/waitgroup_test.go b/src/sync/waitgroup_test.go
index e3e3096..f80d1e2 100644
--- a/src/sync/waitgroup_test.go
+++ b/src/sync/waitgroup_test.go
@@ -6,6 +6,7 @@ package sync_test
import (
"internal/race"
+ "internal/testenv"
"runtime"
. "sync"
"sync/atomic"
@@ -73,6 +74,7 @@ func TestWaitGroupMisuse2(t *testing.T) {
if runtime.NumCPU() <= 4 {
t.Skip("NumCPU<=4, skipping: this test requires parallelism")
}
+ testenv.SkipFlaky(t, 20072)
defer func() {
err := recover()
if err != "sync: negative WaitGroup counter" &&

View File

@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
})
];
enableParallelBuilding = false; # occasional build problems;
enableParallelBuilding = true;
dontUseCmakeBuildDir = true;
NIX_LDFLAGS = "-lpam -L${pam}/lib";

View File

@@ -4,6 +4,7 @@ let version = "0.9.4"; in
stdenv.mkDerivation {
name = "jsonnet-${version}";
version = version;
src = fetchFromGitHub {
rev = "v${version}";

View File

@@ -1,12 +1,15 @@
{ stdenv, fetchurl, makeWrapper, jre, unzip }:
stdenv.mkDerivation rec {
version = "1.1.51";
let
version = "1.1.60";
release = "55";
in stdenv.mkDerivation rec {
inherit version;
name = "kotlin-${version}";
src = fetchurl {
url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}.zip";
sha256 = "1kbwyldfyyd20rnrl5yvyvqiqj9b3v6543vhlqsh5swhhc9nnd0b";
url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}-release-${release}.zip";
sha256 = "04vlhpc92pg0bcgapd5w2b3039sgv52km8i0m4mc5yf0ik6hx1s9";
};
propagatedBuildInputs = [ jre ] ;

View File

@@ -81,6 +81,8 @@ in stdenv.mkDerivation rec {
substituteInPlace lib/esan/esan_sideline_linux.cpp \
--replace 'struct sigaltstack' 'stack_t'
)
'' + stdenv.lib.optionalString stdenv.isAarch64 ''
patch -p0 < ${../aarch64.patch}
'';
# hacky fix: created binaries need to be run before installation

View File

@@ -75,6 +75,8 @@ in stdenv.mkDerivation rec {
# Revert compiler-rt commit that makes codesign mandatory
patch -p1 -i ${./compiler-rt-codesign.patch} -d projects/compiler-rt
'' + stdenv.lib.optionalString stdenv.isAarch64 ''
patch -p0 < ${../aarch64.patch}
'';
# hacky fix: created binaries need to be run before installation

View File

@@ -0,0 +1,51 @@
--- lib/Support/Unix/Memory.inc
+++ lib/Support/Unix/Memory.inc
@@ -126,8 +126,12 @@
Result.Address = Addr;
Result.Size = NumPages*PageSize;
- if (PFlags & MF_EXEC)
- Memory::InvalidateInstructionCache(Result.Address, Result.Size);
+ // Rely on protectMappedMemory to invalidate instruction cache.
+ if (PFlags & MF_EXEC) {
+ EC = Memory::protectMappedMemory (Result, PFlags);
+ if (EC != std::error_code())
+ return MemoryBlock();
+ }
return Result;
}
@@ -156,15 +160,31 @@
return std::error_code(EINVAL, std::generic_category());
int Protect = getPosixProtectionFlags(Flags);
-
uintptr_t Start = alignAddr((uint8_t *)M.Address - PageSize + 1, PageSize);
uintptr_t End = alignAddr((uint8_t *)M.Address + M.Size, PageSize);
+
+ bool InvalidateCache = (Flags & MF_EXEC);
+
+#if defined(__arm__) || defined(__aarch64__)
+ // Certain ARM implementations treat icache clear instruction as a memory read,
+ // and CPU segfaults on trying to clear cache on !PROT_READ page. Therefore we need
+ // to temporarily add PROT_READ for the sake of flushing the instruction caches.
+ if (InvalidateCache && !(Protect & PROT_READ)) {
+ int Result = ::mprotect((void *)Start, End - Start, Protect | PROT_READ);
+ if (Result != 0)
+ return std::error_code(errno, std::generic_category());
+
+ Memory::InvalidateInstructionCache(M.Address, M.Size);
+ InvalidateCache = false;
+ }
+#endif
+
int Result = ::mprotect((void *)Start, End - Start, Protect);
if (Result != 0)
return std::error_code(errno, std::generic_category());
- if (Flags & MF_EXEC)
+ if (InvalidateCache)
Memory::InvalidateInstructionCache(M.Address, M.Size);
return std::error_code();

View File

@@ -1,16 +1,18 @@
{ stdenv, fetchgit, makeWrapper, gmp, gcc }:
{ stdenv, fetchFromGitHub, makeWrapper, gmp, gcc }:
stdenv.mkDerivation rec {
v = "1.1.9";
name = "mkcl-${v}";
with stdenv.lib; stdenv.mkDerivation rec {
name = "mkcl-${version}";
version = "1.1.10.2017-11-14";
src = fetchgit {
url = "https://github.com/jcbeaudoin/mkcl.git";
rev = "86768cc1dfc2cc9caa1fe9696584bb25ea6c1429";
sha256 = "1gsvjp9xlnjccg0idi8x8gzkn6hlrqia95jh3zx7snm894503mf1";
src = fetchFromGitHub {
owner = "jcbeaudoin";
repo = "mkcl";
rev = "d3f5afe945907153db2be5a17a419966f83d7653";
sha256 = "1jfmnh96b5dy1874a9y843vihd14ya4by46rb4h5izldp6x3j3kl";
};
buildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper ];
propagatedBuildInputs = [ gmp ];
hardeningDisable = [ "format" ];
@@ -20,16 +22,27 @@ stdenv.mkDerivation rec {
"GMP_LDFLAGS=-L${gmp.out}/lib"
];
# tinycc configure flags copied from the tinycc derivation.
postConfigure = ''(
cd contrib/tinycc
./configure --cc=cc \
--elfinterp=$(< $NIX_CC/nix-support/dynamic-linker) \
--crtprefix=${getLib stdenv.cc.libc}/lib \
--sysincludepaths=${getDev stdenv.cc.libc}/include:{B}/include \
--libpaths=${getLib stdenv.cc.libc}/lib
)'';
postInstall = ''
wrapProgram $out/bin/mkcl --prefix PATH : "${gcc}/bin"
'';
enableParallelBuilding = true;
meta = {
description = "ANSI Common Lisp Implementation";
homepage = https://common-lisp.net/project/mkcl/;
license = stdenv.lib.licenses.lgpl2Plus;
platforms = stdenv.lib.platforms.linux;
maintainers = [stdenv.lib.maintainers.tohl];
license = licenses.lgpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ tohl ];
};
}

View File

@@ -0,0 +1,7 @@
{ stdenv, callPackage, Foundation, libobjc }:
callPackage ./generic-cmake.nix (rec {
inherit Foundation libobjc;
version = "4.8.1.0";
sha256 = "1vyvp2g28ihcgxgxr8nhzyzdmzicsh5djzk8dk1hj5p5f2k3ijqq";
})

View File

@@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
sha256 = "0jz2ayadx62zv2b5ji947bkvw63axl4a2q70lwli86zgmcl390gf";
};
patches = [ ./ignore-complex-float128.patch ];
preBuild = ''
patchShebangs .
'';

View File

@@ -0,0 +1,37 @@
--- a/src/frontc/clexer.mll
+++ b/src/frontc/clexer.mll
@@ -134,9 +134,11 @@ let init_lexicon _ =
(* WW: see /usr/include/sys/cdefs.h for why __signed and __volatile
* are accepted GCC-isms *)
("_Bool", fun loc -> BOOL loc);
+ ("_Complex", fun loc -> COMPLEX loc);
("char", fun loc -> CHAR loc);
("int", fun loc -> INT loc);
("float", fun loc -> FLOAT loc);
+ ("__float128", fun loc -> FLOAT128 loc);
("double", fun loc -> DOUBLE loc);
("void", fun loc -> VOID loc);
("enum", fun loc -> ENUM loc);
--- a/src/frontc/cparser.mly
+++ b/src/frontc/cparser.mly
@@ -269,6 +269,8 @@ let oblivState (s:statement): statement =
%token<Cabs.cabsloc> VOLATILE EXTERN STATIC CONST RESTRICT AUTO REGISTER FROZEN
%token<Cabs.cabsloc> THREAD
+%token<Cabs.cabsloc> COMPLEX FLOAT128
+
%token<Cabs.cabsloc> SIZEOF ALIGNOF
%token EQ PLUS_EQ MINUS_EQ STAR_EQ SLASH_EQ PERCENT_EQ
@@ -1002,7 +1004,11 @@ type_spec: /* ISO 6.7.2 */
| LONG { Tlong, $1 }
| INT64 { Tint64, $1 }
| FLOAT { Tfloat, $1 }
+| FLOAT128 { Tfloat, $1 }
| DOUBLE { Tdouble, $1 }
+| COMPLEX FLOAT { Tfloat, $2 }
+| COMPLEX FLOAT128{ Tfloat, $2 }
+| COMPLEX DOUBLE { Tdouble, $2 }
| SIGNED { Tsigned, $1 }
| UNSIGNED { Tunsigned, $1 }
| STRUCT id_or_typename

View File

@@ -33,7 +33,7 @@ let
# any package that depends on the JRE has $CLASSPATH set up
# properly.
mkdir -p $out/nix-support
printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib

View File

@@ -23,7 +23,7 @@ let
# any package that depends on the JRE has $CLASSPATH set up
# properly.
mkdir -p $out/nix-support
printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib

View File

@@ -184,13 +184,13 @@ let
preFixup = ''
prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}"
patchELF $jre
propagatedNativeBuildInputs+=" $jre"
propagatedBuildInputs+=" $jre"
# Propagate the setJavaClassPath setup hook from the JRE so that
# any package that depends on the JRE has $CLASSPATH set up
# properly.
mkdir -p $jre/nix-support
printWords ${setJavaClassPath} > $jre/nix-support/propagated-native-build-inputs
printWords ${setJavaClassPath} > $jre/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
mkdir -p $out/nix-support

View File

@@ -206,13 +206,13 @@ let
preFixup = ''
prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}"
patchELF $jre
propagatedNativeBuildInputs+=" $jre"
propagatedBuildInputs+=" $jre"
# Propagate the setJavaClassPath setup hook from the JRE so that
# any package that depends on the JRE has $CLASSPATH set up
# properly.
mkdir -p $jre/nix-support
printWords ${setJavaClassPath} > $jre/nix-support/propagated-native-build-inputs
printWords ${setJavaClassPath} > $jre/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
mkdir -p $out/nix-support

View File

@@ -204,14 +204,14 @@ let
preFixup = ''
prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}"
patchELF $jre
propagatedNativeBuildInputs+=" $jre"
propagatedBuildInputs+=" $jre"
# Propagate the setJavaClassPath setup hook from the JRE so that
# any package that depends on the JRE has $CLASSPATH set up
# properly.
mkdir -p $jre/nix-support
#TODO or printWords? cf https://github.com/NixOS/nixpkgs/pull/27427#issuecomment-317293040
echo -n "${setJavaClassPath}" > $jre/nix-support/propagated-native-build-inputs
echo -n "${setJavaClassPath}" > $jre/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
mkdir -p $out/nix-support

View File

@@ -166,7 +166,7 @@ let result = stdenv.mkDerivation rec {
ln -s $jrePath/lib/${architecture}/libnpjp2.so $jrePath/lib/${architecture}/plugins
mkdir -p $out/nix-support
printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
cat <<EOF >> $out/nix-support/setup-hook

View File

@@ -124,7 +124,7 @@ let result = stdenv.mkDerivation rec {
ln -s $out $out/jre
mkdir -p $out/nix-support
printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
cat <<EOF >> $out/nix-support/setup-hook

View File

@@ -1,11 +1,11 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "orc-0.4.27";
name = "orc-0.4.28";
src = fetchurl {
url = "https://gstreamer.freedesktop.org/src/orc/${name}.tar.xz";
sha256 = "14vbwdydwarcvswzf744jdjb3ibhv6k4j6hzdacfan41zic3xrai";
sha256 = "bfcd7c6563b05672386c4eedfc4c0d4a0a12b4b4775b74ec6deb88fc2bcd83ce";
};
outputs = [ "out" "dev" ];
@@ -15,10 +15,7 @@ stdenv.mkDerivation rec {
sed "/^toolsdir=/ctoolsdir=$dev/bin" -i "$dev"/lib/pkgconfig/orc*.pc
'';
# building memcpy_speed.log
# ../test-driver: line 107: 4495 Segmentation fault "$@" > $log_file 2>&1
# FAIL: memcpy_speed
doCheck = false; # see https://bugzilla.gnome.org/show_bug.cgi?id=728129#c7
doCheck = true;
meta = with stdenv.lib; {
description = "The Oil Runtime Compiler";

View File

@@ -1,31 +1,32 @@
{ stdenv, makeWrapper, buildOcaml, fetchFromGitHub,
ocaml, opam, topkg, menhir, merlin_extend, ppx_tools_versioned, utop }:
ocaml, opam, jbuilder, menhir, merlin_extend, ppx_tools_versioned, utop }:
buildOcaml rec {
name = "reason";
version = "3.0.0";
version = "3.0.3";
src = fetchFromGitHub {
owner = "facebook";
repo = "reason";
rev = version;
sha256 = "0vj3y9vlm9gqvj9grmb9n487avbrj4q5611m7wv1bsdpndvv96jr";
sha256 = "19kp1cnxi6dq89xh07c14q7kzkawbxdkwrvn1rl48l78d04agnxx";
};
propagatedBuildInputs = [ menhir merlin_extend ppx_tools_versioned ];
buildInputs = [ makeWrapper opam topkg utop menhir opam topkg ];
buildInputs = [ makeWrapper opam jbuilder utop menhir ];
buildFlags = [ "build" ]; # do not "make tests" before reason lib is installed
createFindlibDestdir = true;
postPatch = ''
substituteInPlace src/reasonbuild.ml --replace "refmt --print binary" "$out/bin/refmt --print binary"
substituteInPlace src/reasonbuild/myocamlbuild.ml \
--replace "refmt --print binary" "$out/bin/refmt --print binary"
'';
installPhase = ''
${topkg.installPhase}
${jbuilder.installPhase}
wrapProgram $out/bin/rtop \
--prefix PATH : "${utop}/bin" \

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeWrapper, cacert, zlib, buildRustPackage, curl
{ stdenv, fetchurl, makeWrapper, cacert, zlib, buildRustPackage, curl, darwin
, version
, src
, platform
@@ -6,12 +6,32 @@
}:
let
inherit (stdenv.lib) optionalString;
needsPatchelf = stdenv.isLinux;
inherit (stdenv.lib) getLib optionalString;
inherit (darwin) libiconv;
inherit (darwin.apple_sdk.frameworks) Security;
bootstrapping = versionType == "bootstrap";
patchBootstrapCargo = ''
${optionalString (stdenv.isLinux && bootstrapping) ''
patchelf \
--set-rpath "${stdenv.lib.makeLibraryPath [ curl zlib ]}" \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
"$out/bin/cargo"
''}
${optionalString (stdenv.isDarwin && bootstrapping) ''
install_name_tool \
-change /usr/lib/libiconv.2.dylib '${getLib libiconv}/lib/libiconv.2.dylib' \
"$out/bin/cargo"
install_name_tool \
-change /usr/lib/libcurl.4.dylib '${getLib curl}/lib/libcurl.4.dylib' \
"$out/bin/cargo"
install_name_tool \
-change /usr/lib/libz.1.dylib '${getLib zlib}/lib/libz.1.dylib' \
"$out/bin/cargo"
''}
'';
installComponents
= "rustc,rust-std-${platform}"
+ (optionalString bootstrapping ",rust-docs,cargo")
@@ -34,35 +54,36 @@ rec {
license = [ licenses.mit licenses.asl20 ];
};
phases = ["unpackPhase" "installPhase"];
phases = ["unpackPhase" "installPhase" "fixupPhase"];
propagatedBuildInputs = stdenv.lib.optional stdenv.isDarwin Security;
installPhase = ''
./install.sh --prefix=$out \
--components=${installComponents}
${optionalString (needsPatchelf && bootstrapping) ''
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
"$out/bin/rustdoc"
patchelf \
--set-rpath "${stdenv.lib.makeLibraryPath [ curl zlib ]}" \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
"$out/bin/cargo"
''}
${optionalString needsPatchelf ''
${optionalString (stdenv.isLinux && bootstrapping) ''
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
"$out/bin/rustc"
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
"$out/bin/rustdoc"
''}
${optionalString (stdenv.isDarwin && bootstrapping) ''
install_name_tool -change /usr/lib/libiconv.2.dylib '${darwin.libiconv}/lib/libiconv.2.dylib' "$out/bin/cargo"
install_name_tool -change /usr/lib/libcurl.4.dylib '${stdenv.lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo"
install_name_tool -change /usr/lib/libz.1.dylib '${stdenv.lib.getLib zlib}/lib/libz.1.dylib' "$out/bin/cargo"
''}
${patchBootstrapCargo}
# Do NOT, I repeat, DO NOT use `wrapProgram` on $out/bin/rustc
# (or similar) here. It causes strange effects where rustc loads
# the wrong libraries in a bootstrap-build causing failures that
# are very hard to track dow. For details, see
# https://github.com/rust-lang/rust/issues/34722#issuecomment-232164943
''}
'';
};
cargo = stdenv.mkDerivation rec {
@@ -78,19 +99,16 @@ rec {
license = [ licenses.mit licenses.asl20 ];
};
phases = ["unpackPhase" "installPhase" "fixupPhase"];
buildInputs = [ makeWrapper ];
phases = ["unpackPhase" "installPhase"];
propagatedBuildInputs = stdenv.lib.optional stdenv.isDarwin Security;
installPhase = ''
./install.sh --prefix=$out \
--components=cargo
${optionalString needsPatchelf ''
patchelf \
--set-rpath "${stdenv.lib.makeLibraryPath [ curl zlib ]}" \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
"$out/bin/cargo"
''}
${patchBootstrapCargo}
wrapProgram "$out/bin/cargo" \
--suffix PATH : "${rustc}/bin"

View File

@@ -1,16 +1,16 @@
{ stdenv, fetchurl, makeWrapper, cacert, zlib, curl }:
{ stdenv, fetchurl, callPackage }:
let
# Note: the version MUST be one version prior to the version we're
# building
version = "1.19.0";
version = "1.20.0";
# fetch hashes by running `print-hashes.sh 1.19.0`
# fetch hashes by running `print-hashes.sh 1.20.0`
hashes = {
i686-unknown-linux-gnu = "657b78f3c1a1b4412e12f7278e20cc318022fa276a58f0d38a0d15b515e39713";
x86_64-unknown-linux-gnu = "30ff67884464d32f6bbbde4387e7557db98868e87fb2afbb77c9b7716e3bff09";
i686-apple-darwin = "bdfd2189245dc5764c9f26bdba1429c2bf9d57477d8e6e3f0ba42ea0dc63edeb";
x86_64-apple-darwin = "5c668fb60a3ba3e97dc2cb8967fc4bb9422b629155284dcb89f94d116bb17820";
i686-unknown-linux-gnu = "abe592e06616cdc2fcca56ddbe482050dd49a1fada35e2af031c64fe6eb14668";
x86_64-unknown-linux-gnu = "ca1cf3aed73ff03d065a7d3e57ecca92228d35dc36d9274a6597441319f18eb8";
i686-apple-darwin = "b3c2470f8f132d285e6c989681e251592b67071bc9d93cac8a2e6b66f7bdfcb5";
x86_64-apple-darwin = "fa1fb8896d5e327cbe6deeb50e6e9a3346de629f2e6bcbd8c10f19f3e2ed67d5";
};
platform =
@@ -29,9 +29,8 @@ let
sha256 = hashes."${platform}";
};
in import ./binaryBuild.nix
{ inherit stdenv fetchurl makeWrapper cacert zlib curl;
in callPackage ./binaryBuild.nix
{ inherit version src platform;
buildRustPackage = null;
inherit version src platform;
versionType = "bootstrap";
}

View File

@@ -1,7 +1,11 @@
{ stdenv, fetchFromGitHub, file, curl, pkgconfig, python, openssl, cmake, zlib
, makeWrapper, libiconv, cacert, rustPlatform, rustc, libgit2, darwin
, version, srcSha, cargoSha256
, patches ? []}:
, patches ? [] }:
let
inherit (darwin.apple_sdk.frameworks) CoreFoundation;
in
rustPlatform.buildRustPackage rec {
name = "cargo-${version}";
@@ -21,13 +25,17 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ file curl python openssl cmake zlib makeWrapper libgit2 ]
# FIXME: Use impure version of CoreFoundation because of missing symbols.
# CFURLSetResourcePropertyForKey is defined in the headers but there's no
# corresponding implementation in the sources from opensource.apple.com.
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation libiconv ];
++ stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation libiconv ];
LIBGIT2_SYS_USE_PKG_CONFIG=1;
# FIXME: Use impure version of CoreFoundation because of missing symbols.
# CFURLSetResourcePropertyForKey is defined in the headers but there's no
# corresponding implementation in the sources from opensource.apple.com.
preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_CFLAGS_COMPILE="-F${CoreFoundation}/Library/Frameworks $NIX_CFLAGS_COMPILE"
'';
postInstall = ''
# NOTE: We override the `http.cainfo` option usually specified in
# `.cargo/config`. This is an issue when users want to specify
@@ -36,8 +44,7 @@ rustPlatform.buildRustPackage rec {
wrapProgram "$out/bin/cargo" \
--suffix PATH : "${rustc}/bin" \
--set CARGO_HTTP_CAINFO "${cacert}/etc/ssl/certs/ca-bundle.crt" \
--set SSL_CERT_FILE "${cacert}/etc/ssl/certs/ca-bundle.crt" \
${stdenv.lib.optionalString stdenv.isDarwin ''--suffix DYLD_LIBRARY_PATH : "${rustc}/lib"''}
--set SSL_CERT_FILE "${cacert}/etc/ssl/certs/ca-bundle.crt"
'';
checkPhase = ''

View File

@@ -6,7 +6,7 @@
let
rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {}));
version = "1.20.0";
version = "1.21.0";
in
rec {
rustc = callPackage ./rustc.nix {
@@ -18,7 +18,7 @@ rec {
src = fetchurl {
url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
sha256 = "0542y4rnzlsrricai130mqyxl8r6rd991frb4qsnwb27yigqg91a";
sha256 = "1yj8lnxybjrybp00fqhxw8fpr641dh8wcn9mk44xjnsb4i1c21qp";
};
patches = [

View File

@@ -0,0 +1,11 @@
{ stdenv, rustc }:
stdenv.mkDerivation {
name = "rust-src";
src = rustc.src;
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
mv src $out
rm -rf $out/{ci,doc,driver,etc,grammar,llvm,rt,rtstartup,rustllvm,test,tools,vendor}
'';
}

View File

@@ -32,7 +32,7 @@ stdenv.mkDerivation {
inherit src;
__impureHostDeps = [ "/usr/lib/libedit.3.dylib" ];
__darwinAllowLocalNetworking = true;
NIX_LDFLAGS = optionalString stdenv.isDarwin "-rpath ${llvmShared}/lib";
@@ -109,6 +109,14 @@ stdenv.mkDerivation {
# Disable all lldb tests.
# error: Can't run LLDB test because LLDB's python path is not set
rm -vr src/test/debuginfo/*
# Disable tests that fail when sandboxing is enabled.
substituteInPlace src/libstd/sys/unix/ext/net.rs \
--replace '#[test]' '#[test] #[ignore]'
substituteInPlace src/test/run-pass/env-home-dir.rs \
--replace 'home_dir().is_some()' true
rm -v src/test/run-pass/fds-are-cloexec.rs # FIXME: pipes?
rm -v src/test/run-pass/sync-send-in-std.rs # FIXME: ???
'';
preConfigure = ''

View File

@@ -0,0 +1,46 @@
{ stdenv, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
version = "0.4.0-RC1";
name = "dotty-${version}";
src = fetchurl {
url = "https://github.com/lampepfl/dotty/releases/download/${version}/${name}.tar.gz";
sha256 = "1d1ab08b85bd6898ce6273fa50818de0d314fc6e5377fb6ee05494827043321b";
};
propagatedBuildInputs = [ jre ] ;
buildInputs = [ makeWrapper ] ;
installPhase = ''
mkdir -p $out
mv * $out
mkdir -p $out/shared
mv $out/bin/common $out/shared
'';
fixupPhase = ''
for file in $out/bin/* ; do
substituteInPlace $file \
--replace '$PROG_HOME/bin/common' $out/shared/common
wrapProgram $file \
--set JAVA_HOME ${jre}
done
'';
meta = with stdenv.lib; {
description = "Research platform for new language concepts and compiler technologies for Scala.";
longDescription = ''
Dotty is a platform to try out new language concepts and compiler technologies for Scala.
The focus is mainly on simplification. We remove extraneous syntax (e.g. no XML literals),
and try to boil down Scalas types into a smaller set of more fundamental constructs.
The theory behind these constructs is researched in DOT, a calculus for dependent object types.
'';
homepage = http://dotty.epfl.ch/;
license = licenses.bsd3;
platforms = platforms.all;
maintainers = [maintainers.karolchmist];
};
}

View File

@@ -12,6 +12,8 @@ let
inherit sha256;
};
outputs = [ "out" "devdoc" ];
nativeBuildInputs = [ pkgconfig flex bison libxslt ] ++ extraNativeBuildInputs;
buildInputs = [ glib libiconv ] ++ libintlOrEmpty ++ extraBuildInputs;
@@ -65,5 +67,5 @@ in rec {
extraBuildInputs = [ graphviz ];
};
vala = vala_0_34;
vala = vala_0_38;
}

View File

@@ -54,7 +54,7 @@ in stdenv.mkDerivation rec {
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
mkdir -p $out/nix-support
printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
cat <<EOF >> $out/nix-support/setup-hook

View File

@@ -51,7 +51,7 @@ in stdenv.mkDerivation rec {
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
mkdir -p $out/nix-support
printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
cat <<EOF >> $out/nix-support/setup-hook