From 4189da6cb788952bef9d3f78802838ccfd28517a Mon Sep 17 00:00:00 2001 From: Luke Gorrie Date: Wed, 17 Jan 2018 13:05:44 +0000 Subject: [PATCH] Just use the default gcc instead of clang 4.0.0. It was a bit of a flight of fancy to use a pinned version of clang. This would make sense if we were really depending on hyper-specific behaviour of the C compiler, like some automatic SIMD parallization, but in reality we're not. So don't be fussy and just keep it simple. --- README.md | 4 ++-- raptorjit.nix | 3 ++- src/Makefile | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 23f3937dbb..fe8e2a7c76 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ build environment. You can use Nix to build/test/benchmark RaptorJIT with suitable versions of all dependencies provided. Note: Building with nix will be slow the first time because it -downloads the exact reference versions of the toolchain (clang, etc) +downloads the exact reference versions of the toolchain (gcc, etc) and all dependencies (glibc, etc). This is all cached for future builds. @@ -97,7 +97,7 @@ $ nix-shell # start sub-shell with pristine build environment in $PATH $ make ``` -... but make sure you have at least `make`, `clang`, and `luajit` in your `$PATH`. +... but make sure you have at least `make`, `gcc`, and `luajit` in your `$PATH`. ### Run the benchmarks diff --git a/raptorjit.nix b/raptorjit.nix index dbe7d9c918..734642e816 100644 --- a/raptorjit.nix +++ b/raptorjit.nix @@ -3,13 +3,14 @@ { pkgs, source, version }: with pkgs; -with llvmPackages_4.stdenv; # Use clang 4.0 +with stdenv; mkDerivation rec { name = "raptorjit-${version}"; inherit version; src = source; buildInputs = [ luajit ]; # LuaJIT to bootstrap DynASM + dontStrip = true; installPhase = '' mkdir -p $out/bin cp src/raptorjit $out/bin/raptorjit diff --git a/src/Makefile b/src/Makefile index 0e6142155e..4f6f81ed5a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -377,6 +377,10 @@ $(HOST_O): %.o: %.c $(E) "HOSTCC $@" $(Q)$(HOST_CC) $(HOST_ACFLAGS) -c -o $@ $< +$(DWARF_DWO): %.dwo: %.c + $(E) "CC(debug) $@" + $(Q)$(TARGET_CC) -g3 -fno-eliminate-unused-debug-types -gsplit-dwarf -c $< + include Makefile.dep ##############################################################################