Merge commit '130a0cbde6feae6b51f35a007c78cc8a25a6c3c9' into strict-deps-base

This commit is contained in:
John Ericson 2018-05-13 16:17:26 -04:00
commit 29ef982af4
4 changed files with 95 additions and 63 deletions

View File

@ -1,33 +1,41 @@
{ fetchurl, stdenv, libtool, readline, gmp { stdenv, buildPackages
, gawk, makeWrapper }: , buildPlatform, hostPlatform
, fetchurl, makeWrapper, gawk, pkgconfig
, libtool, readline, gmp
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "guile-1.8.8"; name = "guile-1.8.8";
src = fetchurl { src = fetchurl {
url = "mirror://gnu/guile/" + name + ".tar.gz"; url = "mirror://gnu/guile/${name}.tar.gz";
sha256 = "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"; sha256 = "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3";
}; };
patches = [ ./cpp-4.5.patch ];
outputs = [ "out" "dev" "info" ]; outputs = [ "out" "dev" "info" ];
setOutputFlags = false; # $dev gets into the library otherwise setOutputFlags = false; # $dev gets into the library otherwise
# GCC 4.6 raises a number of set-but-unused warnings. # GCC 4.6 raises a number of set-but-unused warnings.
configureFlags = [ "--disable-error-on-warning" ]; configureFlags = [ "--disable-error-on-warning" ];
nativeBuildInputs = [ makeWrapper gawk ]; depsBuildBuild = [ buildPackages.stdenv.cc ]
propagatedBuildInputs = [ readline gmp libtool ]; ++ stdenv.lib.optional (hostPlatform != buildPlatform)
selfNativeBuildInput = true; buildPackages.buildPackages.guile_1_8;
nativeBuildInputs = [ makeWrapper gawk pkgconfig ];
buildInputs = [ readline libtool ];
postInstall = '' propagatedBuildInputs = [
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin" gmp
'';
preBuild = '' # XXX: These ones aren't normally needed here, but `libguile*.la' has '-l'
sed -e '/lt_dlinit/a lt_dladdsearchdir("'$out/lib'");' -i libguile/dynl.c # flags for them without corresponding '-L' flags. Adding them here will add
''; # the needed `-L' flags. As for why the `.la' file lacks the `-L' flags,
# see below.
libtool
];
patches = [ ./cpp-4.5.patch ];
# Guile needs patching to preset results for the configure tests # Guile needs patching to preset results for the configure tests
# about pthreads, which work only in native builds. # about pthreads, which work only in native builds.
@ -37,6 +45,22 @@ stdenv.mkDerivation rec {
fi fi
''; '';
preBuild = ''
sed -e '/lt_dlinit/a lt_dladdsearchdir("'$out/lib'");' -i libguile/dynl.c
'';
postInstall = ''
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
''
# XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for
# why `--with-libunistring-prefix' and similar options coming from
# `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64.
+ ''
sed -i "$out/lib/pkgconfig/guile"-*.pc \
-e "s|-lltdl|-L${libtool.lib}/lib -lltdl|g"
'';
# One test fails. # One test fails.
# ERROR: file: "libtest-asmobs", message: "file not found" # ERROR: file: "libtest-asmobs", message: "file not found"
# This is fixed here: # This is fixed here:
@ -46,17 +70,16 @@ stdenv.mkDerivation rec {
setupHook = ./setup-hook.sh; setupHook = ./setup-hook.sh;
meta = { meta = {
description = "GNU Guile, an embeddable Scheme interpreter"; description = "Embeddable Scheme implementation";
homepage = http://www.gnu.org/software/guile/;
license = stdenv.lib.licenses.lgpl2Plus;
maintainers = [ stdenv.lib.maintainers.ludo ];
platforms = stdenv.lib.platforms.unix;
longDescription = '' longDescription = ''
GNU Guile is an interpreter for the Scheme programming language, GNU Guile is an interpreter for the Scheme programming language,
packaged as a library that can be embedded into programs to make packaged as a library that can be embedded into programs to make
them extensible. It supports many SRFIs. them extensible. It supports many SRFIs.
''; '';
homepage = http://www.gnu.org/software/guile/;
license = stdenv.lib.licenses.lgpl2Plus;
maintainers = [ stdenv.lib.maintainers.ludo ];
platforms = stdenv.lib.platforms.unix;
}; };
} }

View File

@ -1,6 +1,8 @@
{ fetchurl, stdenv, libtool, readline, gmp, pkgconfig, boehmgc, libunistring { stdenv, buildPackages
, libffi, gawk, makeWrapper, fetchpatch, coverageAnalysis ? null, gnu ? null , buildPlatform, hostPlatform
, hostPlatform , fetchpatch, fetchurl, makeWrapper, gawk, pkgconfig
, libffi, libtool, readline, gmp, boehmgc, libunistring
, coverageAnalysis ? null, gnu ? null
}: }:
# Do either a coverage analysis build or a standard build. # Do either a coverage analysis build or a standard build.
@ -19,18 +21,21 @@
outputs = [ "out" "dev" "info" ]; outputs = [ "out" "dev" "info" ];
setOutputFlags = false; # $dev gets into the library otherwise setOutputFlags = false; # $dev gets into the library otherwise
depsBuildBuild = [ buildPackages.stdenv.cc ]
++ stdenv.lib.optional (hostPlatform != buildPlatform)
buildPackages.buildPackages.guile_2_0;
nativeBuildInputs = [ makeWrapper gawk pkgconfig ]; nativeBuildInputs = [ makeWrapper gawk pkgconfig ];
buildInputs = [ readline libtool libunistring libffi ]; buildInputs = [ readline libtool libunistring libffi ];
propagatedBuildInputs = [ gmp boehmgc ]
# XXX: These ones aren't normally needed here, but since propagatedBuildInputs = [
# `libguile-2.0.la' reads `-lltdl -lunistring', adding them here will add gmp boehmgc
# XXX: These ones aren't normally needed here, but `libguile*.la' has '-l'
# flags for them without corresponding '-L' flags. Adding them here will add
# the needed `-L' flags. As for why the `.la' file lacks the `-L' flags, # the needed `-L' flags. As for why the `.la' file lacks the `-L' flags,
# see below. # see below.
++ [ libtool libunistring ]; libtool libunistring
];
# A native Guile 2.0 is needed to cross-build Guile.
selfNativeBuildInput = true;
enableParallelBuilding = true; enableParallelBuilding = true;
@ -40,6 +45,7 @@
url = "http://git.savannah.gnu.org/cgit/guile.git/patch/?id=2fbde7f02adb8c6585e9baf6e293ee49cd23d4c4"; url = "http://git.savannah.gnu.org/cgit/guile.git/patch/?id=2fbde7f02adb8c6585e9baf6e293ee49cd23d4c4";
sha256 = "0p6c1lmw1iniq03z7x5m65kg3lq543kgvdb4nrxsaxjqf3zhl77v"; sha256 = "0p6c1lmw1iniq03z7x5m65kg3lq543kgvdb4nrxsaxjqf3zhl77v";
}) })
./riscv.patch
] ++ ] ++
(stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch); (stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch);
@ -67,11 +73,12 @@
postInstall = '' postInstall = ''
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin" wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
''
# XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for # XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for
# why `--with-libunistring-prefix' and similar options coming from # why `--with-libunistring-prefix' and similar options coming from
# `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64. # `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64.
sed -i "$out/lib/pkgconfig/guile-2.0.pc" \ + ''
sed -i "$out/lib/pkgconfig/guile"-*.pc \
-e "s|-lunistring|-L${libunistring}/lib -lunistring|g ; -e "s|-lunistring|-L${libunistring}/lib -lunistring|g ;
s|^Cflags:\(.*\)$|Cflags: -I${libunistring}/include \1|g ; s|^Cflags:\(.*\)$|Cflags: -I${libunistring}/include \1|g ;
s|-lltdl|-L${libtool.lib}/lib -lltdl|g ; s|-lltdl|-L${libtool.lib}/lib -lltdl|g ;
@ -85,15 +92,6 @@
setupHook = ./setup-hook-2.0.sh; setupHook = ./setup-hook-2.0.sh;
crossAttrs.preConfigure =
stdenv.lib.optionalString (hostPlatform.isHurd)
# On GNU, libgc depends on libpthread, but the cross linker doesn't
# know where to find libpthread, which leads to erroneous test failures
# in `configure', where `-pthread' and `-lpthread' aren't explicitly
# passed. So it needs some help (XXX).
"export LDFLAGS=-Wl,-rpath-link=${gnu.libpthreadCross}/lib";
meta = { meta = {
description = "Embeddable Scheme implementation"; description = "Embeddable Scheme implementation";
homepage = http://www.gnu.org/software/guile/; homepage = http://www.gnu.org/software/guile/;

View File

@ -1,6 +1,8 @@
{ fetchurl, stdenv, libtool, readline, gmp, pkgconfig, boehmgc, libunistring { stdenv, buildPackages
, libffi, gawk, makeWrapper, fetchpatch, coverageAnalysis ? null, gnu ? null , buildPlatform, hostPlatform
, hostPlatform , fetchurl, makeWrapper, gawk, pkgconfig
, libffi, libtool, readline, gmp, boehmgc, libunistring
, coverageAnalysis ? null, gnu ? null
}: }:
# Do either a coverage analysis build or a standard build. # Do either a coverage analysis build or a standard build.
@ -20,23 +22,27 @@
outputs = [ "out" "dev" "info" ]; outputs = [ "out" "dev" "info" ];
setOutputFlags = false; # $dev gets into the library otherwise setOutputFlags = false; # $dev gets into the library otherwise
depsBuildBuild = [ buildPackages.stdenv.cc ]
++ stdenv.lib.optional (hostPlatform != buildPlatform)
buildPackages.buildPackages.guile;
nativeBuildInputs = [ makeWrapper gawk pkgconfig ]; nativeBuildInputs = [ makeWrapper gawk pkgconfig ];
buildInputs = [ readline libtool libunistring libffi ]; buildInputs = [ readline libtool libunistring libffi ];
propagatedBuildInputs = [ gmp boehmgc ] propagatedBuildInputs = [
# XXX: These ones aren't normally needed here, but since gmp boehmgc
# `libguile-2.0.la' reads `-lltdl -lunistring', adding them here will add
# XXX: These ones aren't normally needed here, but `libguile*.la' has '-l'
# flags for them without corresponding '-L' flags. Adding them here will add
# the needed `-L' flags. As for why the `.la' file lacks the `-L' flags, # the needed `-L' flags. As for why the `.la' file lacks the `-L' flags,
# see below. # see below.
++ [ libtool libunistring ]; libtool libunistring
];
# A native Guile 2.0 is needed to cross-build Guile.
selfNativeBuildInput = true;
enableParallelBuilding = true; enableParallelBuilding = true;
patches = [ patches = [
./eai_system.patch ./eai_system.patch
./riscv.patch
] ++ ] ++
(stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch); (stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch);
@ -63,11 +69,12 @@
postInstall = '' postInstall = ''
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin" wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
''
# XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for # XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for
# why `--with-libunistring-prefix' and similar options coming from # why `--with-libunistring-prefix' and similar options coming from
# `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64. # `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64.
sed -i "$out/lib/pkgconfig/guile-2.2.pc" \ + ''
sed -i "$out/lib/pkgconfig/guile"-*.pc \
-e "s|-lunistring|-L${libunistring}/lib -lunistring|g ; -e "s|-lunistring|-L${libunistring}/lib -lunistring|g ;
s|^Cflags:\(.*\)$|Cflags: -I${libunistring}/include \1|g ; s|^Cflags:\(.*\)$|Cflags: -I${libunistring}/include \1|g ;
s|-lltdl|-L${libtool.lib}/lib -lltdl|g ; s|-lltdl|-L${libtool.lib}/lib -lltdl|g ;
@ -81,15 +88,6 @@
setupHook = ./setup-hook-2.2.sh; setupHook = ./setup-hook-2.2.sh;
crossAttrs.preConfigure =
stdenv.lib.optionalString (hostPlatform.isHurd)
# On GNU, libgc depends on libpthread, but the cross linker doesn't
# know where to find libpthread, which leads to erroneous test failures
# in `configure', where `-pthread' and `-lpthread' aren't explicitly
# passed. So it needs some help (XXX).
"export LDFLAGS=-Wl,-rpath-link=${gnu.libpthreadCross}/lib";
meta = { meta = {
description = "Embeddable Scheme implementation"; description = "Embeddable Scheme implementation";
homepage = http://www.gnu.org/software/guile/; homepage = http://www.gnu.org/software/guile/;

View File

@ -0,0 +1,13 @@
diff --git a/module/system/base/target.scm b/module/system/base/target.scm
index 95ab8d8c9..93616f4a3 100644
--- a/module/system/base/target.scm
+++ b/module/system/base/target.scm
@@ -86,6 +86,8 @@
(endianness big))
((string=? "aarch64" cpu)
(endianness little))
+ ((string-match "riscv[1-9][0-9]*" cpu)
+ (endianness little))
(else
(error "unknown CPU endianness" cpu)))))