Merge pull request #45006 from jbaum98/tachyon-darwin

tachyon: Add darwin support
This commit is contained in:
adisbladis 2018-08-14 12:44:16 +08:00 committed by GitHub
commit 3878342ef0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 3 deletions

View file

@ -0,0 +1,31 @@
diff --git a/unix/Make-arch b/unix/Make-arch
index 08afb85..822c4fc 100644
--- a/unix/Make-arch
+++ b/unix/Make-arch
@@ -924,7 +924,7 @@ macosx-thr:
$(MAKE) all \
"ARCH = macosx-thr" \
"CC = cc" \
- "CFLAGS = -Os -ffast-math -DBsd -DTHR -F/System/Library/Frameworks $(MISCFLAGS)" \
+ "CFLAGS = -Os -ffast-math -DBsd -DTHR $(MISCFLAGS)" \
"AR = ar" \
"ARFLAGS = r" \
"STRIP = strip" \
@@ -946,7 +946,7 @@ macosx-x86-thr:
$(MAKE) all \
"ARCH = macosx-x86-thr" \
"CC = cc" \
- "CFLAGS = -O2 -ffast-math -DBsd -DTHR -F/System/Library/Frameworks $(MISCFLAGS)" \
+ "CFLAGS = -O2 -ffast-math -DBsd -DTHR $(MISCFLAGS)" \
"AR = ar" \
"ARFLAGS = r" \
"STRIP = strip" \
@@ -957,7 +957,7 @@ macosx-x86-thr-ogl:
$(MAKE) all \
"ARCH = macosx-x86-thr-ogl" \
"CC = cc" \
- "CFLAGS = -O2 -ffast-math -DBsd -DTHR -I/usr/X11R6/include -F/System/Library/Frameworks $(MISCFLAGS) -DUSEOPENGL" \
+ "CFLAGS = -O2 -ffast-math -DBsd -DTHR -I/usr/X11R6/include $(MISCFLAGS) -DUSEOPENGL" \
"AR = ar" \
"ARFLAGS = r" \
"STRIP = strip" \

View file

@ -50,7 +50,9 @@ stdenv.mkDerivation rec {
./no-absolute-paths.patch
# Include new targets (like arm)
./make-archs.patch
];
] ++
# Ensure looks for nix-provided Carbon, not system frameworks
stdenv.lib.optional stdenv.isDarwin ./darwin.patch;
installPhase = ''
cd ../compile/${arch}
@ -66,8 +68,7 @@ stdenv.mkDerivation rec {
description = ''A Parallel / Multiprocessor Ray Tracing System'';
license = stdenv.lib.licenses.bsd3;
maintainers = [stdenv.lib.maintainers.raskin];
# darwin fails due to missing Carbon.h, even though Carbon is a build input
platforms = with stdenv.lib.platforms; linux ++ cygwin;
platforms = with stdenv.lib.platforms; linux ++ cygwin ++ darwin;
homepage = http://jedi.ks.uiuc.edu/~johns/tachyon/;
};
}