Author: ludo
Date: Fri Oct 15 13:55:02 2010
New Revision: 24303
URL: https://svn.nixos.org/websvn/nix/?rev=24303&sc=1

Log:
guile: Add the `build_tinycc' job.

Added:
   hydra-config/gnu/trunk/guile/tinycc-isnan.patch
Modified:
   hydra-config/gnu/trunk/guile/release.nix

Modified: hydra-config/gnu/trunk/guile/release.nix
==============================================================================
--- hydra-config/gnu/trunk/guile/release.nix    Fri Oct 15 13:54:53 2010        
(r24302)
+++ hydra-config/gnu/trunk/guile/release.nix    Fri Oct 15 13:55:02 2010        
(r24303)
@@ -266,6 +266,34 @@
           preUnpack = "gcc --version";
           inherit meta failureHook;
         };
+
+    # Check what it's like to build with an old compiler.
+    build_tinycc =
+      { tarball ? jobs.tarball {}
+      }:
+
+      let
+        system = "x86_64-linux";
+        pkgs = import nixpkgs { inherit system; };
+      in
+        with pkgs;
+        releaseTools.nixBuild {
+          name = "guile";
+          src = tarball;
+          configureFlags =
+            [ "CC=${tinycc}/bin/tcc" ] ++ (defaultConfigureFlags pkgs) ++
+            [ "--with-libltdl-prefix=${libtool}"
+              "--with-libgmp-prefix=${gmp}"
+              "--with-libunistring-prefix=${libunistring}"
+              "--with-readline-prefix=${readline}"
+              "--disable-rpath"  # tcc doesn't support the `-rpath' option
+            ];
+          makeFlags = [ "V=1" ];
+          buildInputs = buildInputsFrom pkgs;
+          buildOutOfSourceTree = true;
+          patches = [ ./tinycc-isnan.patch ];
+          inherit meta failureHook;
+        };
   }
 
   //

Added: hydra-config/gnu/trunk/guile/tinycc-isnan.patch
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ hydra-config/gnu/trunk/guile/tinycc-isnan.patch     Fri Oct 15 13:55:02 
2010        (r24303)
@@ -0,0 +1,20 @@
+Fix compilation of this file with TinyCC, which shows up like this:
+
+  isnan.c:132: division by zero in constant
+
+See <http://article.gmane.org/gmane.comp.lib.gnulib.bugs/23683>.
+
+diff --git a/lib/isnan.c b/lib/isnan.c
+index a59dea7..e292640 100644
+--- a/lib/isnan.c
++++ b/lib/isnan.c
+@@ -117,7 +117,8 @@ FUNC (DOUBLE x)
+ # else
+   /* Be careful to not do any floating-point operation on x, such as x == x,
+      because x may be a signaling NaN.  */
+-#  if defined __SUNPRO_C || defined __DECC || (defined __sgi && !defined 
__GNUC__)
++#  if defined __TINYC__ || defined __SUNPRO_C || defined __DECC \
++      || (defined __sgi && !defined __GNUC__)
+   /* The Sun C 5.0 compilers and the Compaq (ex-DEC) 6.4 compilers don't
+      recognize the initializers as constant expressions.  The latter compiler
+      also fails when constant-folding 0.0 / 0.0 even when constant-folding is
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to