GNU Guile 1.9 with coverage analysis builds.
svn path=/nixpkgs/trunk/; revision=17994
This commit is contained in:
parent
82baac23a7
commit
f7947871a3
@ -1,7 +1,12 @@
|
|||||||
{ fetchurl, stdenv, libtool, readline, gmp, pkgconfig, boehmgc, libunistring
|
{ fetchurl, stdenv, libtool, readline, gmp, pkgconfig, boehmgc, libunistring
|
||||||
, gawk, makeWrapper }:
|
, gawk, makeWrapper, coverageAnalysis ? null }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
# Do either a coverage analysis build or a standard build.
|
||||||
|
(if coverageAnalysis != null
|
||||||
|
then coverageAnalysis
|
||||||
|
else stdenv.mkDerivation)
|
||||||
|
|
||||||
|
rec {
|
||||||
name = "guile-1.9.4"; # This is an alpha release!
|
name = "guile-1.9.4"; # This is an alpha release!
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "ftp://alpha.gnu.org/gnu/guile/${name}.tar.gz";
|
url = "ftp://alpha.gnu.org/gnu/guile/${name}.tar.gz";
|
||||||
@ -11,6 +16,10 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [ makeWrapper gawk readline libtool libunistring pkgconfig ];
|
buildInputs = [ makeWrapper gawk readline libtool libunistring pkgconfig ];
|
||||||
propagatedBuildInputs = [ gmp boehmgc ];
|
propagatedBuildInputs = [ gmp boehmgc ];
|
||||||
|
|
||||||
|
patches =
|
||||||
|
stdenv.lib.optionals (coverageAnalysis != null)
|
||||||
|
[ ./gcov-file-name.patch ./disable-gc-sensitive-tests.patch ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
|
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
|
||||||
|
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
This patch disable GC-sensitive tests. This is particularly useful when
|
||||||
|
compiling with `-O0' (as is done with coverage analysis) since there may
|
||||||
|
be many false references held on the stack, leading to the failure of
|
||||||
|
such tests.
|
||||||
|
|
||||||
|
--- a/test-suite/tests/threads.test
|
||||||
|
+++ b/test-suite/tests/threads.test
|
||||||
|
@@ -366,6 +366,7 @@
|
||||||
|
(not (mutex-owner m))))
|
||||||
|
|
||||||
|
(pass-if "mutex with owner not retained (bug #27450)"
|
||||||
|
+ (throw 'unresolved)
|
||||||
|
(let ((g (make-guardian)))
|
||||||
|
(g (let ((m (make-mutex))) (lock-mutex m) m))
|
||||||
|
|
42
pkgs/development/interpreters/guile/gcov-file-name.patch
Normal file
42
pkgs/development/interpreters/guile/gcov-file-name.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
This patch arranges so that we don't end up, with profiling builds, with a
|
||||||
|
file named `<stdout>.gcov' since that confuses lcov:
|
||||||
|
|
||||||
|
<stdout>:cannot open source file
|
||||||
|
geninfo: ERROR: cannot read <stdout>.gcov!
|
||||||
|
|
||||||
|
--- guile/libguile/c-tokenize.c 2009-09-13 13:05:15.000000000 +0200
|
||||||
|
+++ guile/libguile/c-tokenize.c 2009-10-28 16:24:15.000000000 +0100
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
|
||||||
|
-#line 3 "<stdout>"
|
||||||
|
+#line 3 "c-tokenize.c"
|
||||||
|
|
||||||
|
#define YY_INT_ALIGNED short int
|
||||||
|
|
||||||
|
@@ -616,7 +616,7 @@ int cookie_was_last = 0;
|
||||||
|
#define IS_COOKIE cookie_was_last = 1
|
||||||
|
#define IS_NOT_COOKIE cookie_was_last = 0
|
||||||
|
|
||||||
|
-#line 620 "<stdout>"
|
||||||
|
+#line 620 "c-tokenize.c"
|
||||||
|
|
||||||
|
#define INITIAL 0
|
||||||
|
|
||||||
|
@@ -799,7 +799,7 @@ YY_DECL
|
||||||
|
#line 65 "./c-tokenize.lex"
|
||||||
|
|
||||||
|
|
||||||
|
-#line 803 "<stdout>"
|
||||||
|
+#line 803 "c-tokenize.c"
|
||||||
|
|
||||||
|
if ( !(yy_init) )
|
||||||
|
{
|
||||||
|
@@ -1235,7 +1235,7 @@ YY_RULE_SETUP
|
||||||
|
#line 181 "./c-tokenize.lex"
|
||||||
|
ECHO;
|
||||||
|
YY_BREAK
|
||||||
|
-#line 1239 "<stdout>"
|
||||||
|
+#line 1239 "c-tokenize.c"
|
||||||
|
case YY_STATE_EOF(INITIAL):
|
||||||
|
yyterminate();
|
||||||
|
|
@ -2333,6 +2333,12 @@ let
|
|||||||
libunistring pkgconfig boehmgc;
|
libunistring pkgconfig boehmgc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
guile_1_9_coverage = import ../development/interpreters/guile/1.9.nix {
|
||||||
|
inherit fetchurl stdenv readline libtool gmp gawk makeWrapper
|
||||||
|
libunistring pkgconfig boehmgc;
|
||||||
|
inherit (releaseTools) coverageAnalysis;
|
||||||
|
};
|
||||||
|
|
||||||
io = builderDefsPackage (import ../development/interpreters/io) {
|
io = builderDefsPackage (import ../development/interpreters/io) {
|
||||||
inherit sqlite zlib gmp libffi cairo ncurses freetype mesa
|
inherit sqlite zlib gmp libffi cairo ncurses freetype mesa
|
||||||
libpng libtiff libjpeg readline libsndfile libxml2
|
libpng libtiff libjpeg readline libsndfile libxml2
|
||||||
|
@ -54,6 +54,7 @@ in (mapTestOn {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
guile = linux;
|
guile = linux;
|
||||||
|
guile_1_9_coverage = linux;
|
||||||
|
|
||||||
autogen = linux;
|
autogen = linux;
|
||||||
lsh = linux;
|
lsh = linux;
|
||||||
|
Loading…
Reference in New Issue
Block a user