uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,104 @@
{ lib
, stdenv
, fetchurl
, buildPackages
, gawk
, gmp
, libtool
, makeWrapper
, pkg-config
, pkgsBuildBuild
, readline
}:
stdenv.mkDerivation rec {
pname = "guile";
version = "1.8.8";
src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
sha256 = "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3";
};
outputs = [ "out" "dev" "info" ];
setOutputFlags = false; # $dev gets into the library otherwise
# GCC 4.6 raises a number of set-but-unused warnings.
configureFlags = [
"--disable-error-on-warning"
]
# Guile needs patching to preset results for the configure tests about
# pthreads, which work only in native builds.
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
"--with-threads=no";
depsBuildBuild = [
buildPackages.stdenv.cc
]
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
pkgsBuildBuild.guile_1_8;
nativeBuildInputs = [
makeWrapper
pkg-config
];
buildInputs = [
libtool
readline
];
propagatedBuildInputs = [
gmp
# 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,
# see below.
libtool
];
patches = [
# Fix doc snarfing with GCC 4.5.
./cpp-4.5.patch
# Self explanatory
./CVE-2016-8605.patch
];
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.
# ERROR: file: "libtest-asmobs", message: "file not found"
# This is fixed here:
# <https://git.savannah.gnu.org/cgit/guile.git/commit/?h=branch_release-1-8&id=a0aa1e5b69d6ef0311aeea8e4b9a94eae18a1aaf>.
doCheck = false;
doInstallCheck = doCheck;
setupHook = ./setup-hook-1.8.sh;
meta = with lib; {
homepage = "https://www.gnu.org/software/guile/";
description = "Embeddable Scheme implementation";
longDescription = ''
GNU Guile is an implementation of the Scheme programming language, with
support for many SRFIs, packaged for use in a wide variety of
environments. In addition to implementing the R5RS Scheme standard and a
large subset of R6RS, Guile includes a module system, full access to POSIX
system calls, networking support, multiple threads, dynamic linking, a
foreign function call interface, and powerful string processing.
'';
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ ludo ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,160 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, boehmgc
, buildPackages
, coverageAnalysis ? null
, gawk
, gmp
, libffi
, libtool
, libunistring
, makeWrapper
, pkg-config
, pkgsBuildBuild
, readline
}:
let
# Do either a coverage analysis build or a standard build.
builder = if coverageAnalysis != null
then coverageAnalysis
else stdenv.mkDerivation;
in
builder rec {
pname = "guile";
version = "2.0.13";
src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
sha256 = "12yqkr974y91ylgw6jnmci2v90i90s7h9vxa4zk0sai8vjnz4i1p";
};
outputs = [ "out" "dev" "info" ];
setOutputFlags = false; # $dev gets into the library otherwise
depsBuildBuild = [
buildPackages.stdenv.cc
]
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
pkgsBuildBuild.guile_2_0;
nativeBuildInputs = [
makeWrapper
pkg-config
];
buildInputs = [
readline
libtool
libunistring
libffi
];
propagatedBuildInputs = [
boehmgc
gmp
# 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, see below.
libtool
libunistring
];
enableParallelBuilding = true;
patches = [
# Small fixes to Clang compiler
./clang.patch
# Self-explanatory
./disable-gc-sensitive-tests.patch
# Read the header of the patch to more info
./eai_system.patch
# RISC-V endianness
./riscv.patch
# Fixes stability issues with 00-repl-server.test
(fetchpatch {
url = "https://git.savannah.gnu.org/cgit/guile.git/patch/?id=2fbde7f02adb8c6585e9baf6e293ee49cd23d4c4";
sha256 = "0p6c1lmw1iniq03z7x5m65kg3lq543kgvdb4nrxsaxjqf3zhl77v";
})] ++
(lib.optional (coverageAnalysis != null) ./gcov-file-name.patch)
++ lib.optionals stdenv.isDarwin [
./filter-mkostemp-darwin.patch
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch";
sha256 = "12wvwdna9j8795x59ldryv9d84c1j3qdk2iskw09306idfsis207";
})
];
# Explicitly link against libgcc_s, to work around the infamous
# "libgcc_s.so.1 must be installed for pthread_cancel to work".
# don't have "libgcc_s.so.1" on darwin
LDFLAGS = lib.optionalString
(!stdenv.isDarwin && !stdenv.hostPlatform.isMusl) "-lgcc_s";
configureFlags = [
"--with-libreadline-prefix"
] ++ lib.optionals stdenv.isSunOS [
# Make sure the right <gmp.h> is found, and not the incompatible
# /usr/include/mp.h from OpenSolaris. See
# <https://lists.gnu.org/archive/html/hydra-users/2012-08/msg00000.html>
# for details.
"--with-libgmp-prefix=${lib.getDev gmp}"
# Same for these (?).
"--with-libreadline-prefix=${lib.getDev readline}"
"--with-libunistring-prefix=${libunistring}"
# See below.
"--without-threads"
];
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|-lunistring|-L${libunistring}/lib -lunistring|g ;
s|^Cflags:\(.*\)$|Cflags: -I${libunistring}/include \1|g ;
s|-lltdl|-L${libtool.lib}/lib -lltdl|g ;
s|includedir=$out|includedir=$dev|g
"
'';
# make check doesn't work on darwin
# On Linuxes+Hydra the tests are flaky; feel free to investigate deeper.
doCheck = false;
doInstallCheck = doCheck;
setupHook = ./setup-hook-2.0.sh;
meta = with lib; {
homepage = "https://www.gnu.org/software/guile/";
description = "Embeddable Scheme implementation";
longDescription = ''
GNU Guile is an implementation of the Scheme programming language, with
support for many SRFIs, packaged for use in a wide variety of
environments. In addition to implementing the R5RS Scheme standard and
a large subset of R6RS, Guile includes a module system, full access to
POSIX system calls, networking support, multiple threads, dynamic
linking, a foreign function call interface, and powerful string
processing.
'';
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ ludo lovek323 vrthra ];
platforms = platforms.all;
};
}
//
(lib.optionalAttrs (!stdenv.isLinux) {
# Work around <https://bugs.gnu.org/14201>.
SHELL = stdenv.shell;
CONFIG_SHELL = stdenv.shell;
})

View file

@ -0,0 +1,142 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, boehmgc
, buildPackages
, coverageAnalysis ? null
, gawk
, gmp
, libffi
, libtool
, libunistring
, makeWrapper
, pkg-config
, pkgsBuildBuild
, readline
}:
let
# Do either a coverage analysis build or a standard build.
builder = if coverageAnalysis != null
then coverageAnalysis
else stdenv.mkDerivation;
in
builder rec {
pname = "guile";
version = "2.2.7";
src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
sha256 = "013mydzhfswqci6xmyc1ajzd59pfbdak15i0b090nhr9bzm7dxyd";
};
outputs = [ "out" "dev" "info" ];
setOutputFlags = false; # $dev gets into the library otherwise
depsBuildBuild = [
buildPackages.stdenv.cc
]
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
pkgsBuildBuild.guile;
nativeBuildInputs = [
makeWrapper
pkg-config
];
buildInputs = [
libffi
libtool
libunistring
readline
];
propagatedBuildInputs = [
boehmgc
gmp
# 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,
# see below.
libtool
libunistring
];
# According to Bernhard M. Wiedemann <bwiedemann suse de> on
# #reproducible-builds on irc.oftc.net, (2020-01-29): they had to
# build Guile without parallel builds to make it reproducible.
#
# re: https://issues.guix.gnu.org/issue/20272
# re: https://build.opensuse.org/request/show/732638
enableParallelBuilding = false;
patches = [
# Read the header of the patch to more info
./eai_system.patch
] ++ lib.optional (coverageAnalysis != null) ./gcov-file-name.patch
++ lib.optional stdenv.isDarwin
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch";
sha256 = "12wvwdna9j8795x59ldryv9d84c1j3qdk2iskw09306idfsis207";
});
# Explicitly link against libgcc_s, to work around the infamous
# "libgcc_s.so.1 must be installed for pthread_cancel to work".
# don't have "libgcc_s.so.1" on clang
LDFLAGS = lib.optionalString
(stdenv.cc.isGNU && !stdenv.hostPlatform.isStatic) "-lgcc_s";
configureFlags = [
"--with-libreadline-prefix=${lib.getDev readline}"
] ++ lib.optionals stdenv.isSunOS [
# Make sure the right <gmp.h> is found, and not the incompatible
# /usr/include/mp.h from OpenSolaris. See
# <https://lists.gnu.org/archive/html/hydra-users/2012-08/msg00000.html>
# for details.
"--with-libgmp-prefix=${lib.getDev gmp}"
# Same for these (?).
"--with-libunistring-prefix=${libunistring}"
# See below.
"--without-threads"
];
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|-lunistring|-L${libunistring}/lib -lunistring|g ;
s|^Cflags:\(.*\)$|Cflags: -I${libunistring}/include \1|g ;
s|-lltdl|-L${libtool.lib}/lib -lltdl|g ;
s|includedir=$out|includedir=$dev|g
"
'';
# make check doesn't work on darwin
# On Linuxes+Hydra the tests are flaky; feel free to investigate deeper.
doCheck = false;
doInstallCheck = doCheck;
setupHook = ./setup-hook-2.2.sh;
meta = with lib; {
homepage = "https://www.gnu.org/software/guile/";
description = "Embeddable Scheme implementation";
longDescription = ''
GNU Guile is an implementation of the Scheme programming language, with
support for many SRFIs, packaged for use in a wide variety of
environments. In addition to implementing the R5RS Scheme standard and a
large subset of R6RS, Guile includes a module system, full access to POSIX
system calls, networking support, multiple threads, dynamic linking, a
foreign function call interface, and powerful string processing.
'';
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ ludo lovek323 vrthra ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,161 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, boehmgc
, buildPackages
, coverageAnalysis ? null
, gawk
, gmp
, libffi
, libtool
, libunistring
, makeWrapper
, pkg-config
, pkgsBuildBuild
, readline
, writeScript
}:
let
# Do either a coverage analysis build or a standard build.
builder = if coverageAnalysis != null
then coverageAnalysis
else stdenv.mkDerivation;
in
builder rec {
pname = "guile";
version = "3.0.8";
src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
sha256 = "sha256-2qcGClbygE6bdMjX5/6L7tErQ6qyeJo4WFGD/MF7ihM=";
};
outputs = [ "out" "dev" "info" ];
setOutputFlags = false; # $dev gets into the library otherwise
depsBuildBuild = [
buildPackages.stdenv.cc
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
pkgsBuildBuild.guile;
nativeBuildInputs = [
makeWrapper
pkg-config
];
buildInputs = [
libffi
libtool
libunistring
readline
];
propagatedBuildInputs = [
boehmgc
gmp
# 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, see below.
libtool
libunistring
];
# According to Bernhard M. Wiedemann <bwiedemann suse de> on
# #reproducible-builds on irc.oftc.net, (2020-01-29): they had to build
# Guile without parallel builds to make it reproducible.
#
# re: https://issues.guix.gnu.org/issue/20272
# re: https://build.opensuse.org/request/show/732638
enableParallelBuilding = false;
patches = [
./eai_system.patch
] ++ lib.optional (coverageAnalysis != null) ./gcov-file-name.patch
++ lib.optional stdenv.isDarwin
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch";
sha256 = "12wvwdna9j8795x59ldryv9d84c1j3qdk2iskw09306idfsis207";
});
# Explicitly link against libgcc_s, to work around the infamous
# "libgcc_s.so.1 must be installed for pthread_cancel to work".
# don't have "libgcc_s.so.1" on clang
LDFLAGS = lib.optionalString
(stdenv.cc.isGNU && !stdenv.hostPlatform.isStatic) "-lgcc_s";
configureFlags = [
"--with-libreadline-prefix=${lib.getDev readline}"
] ++ lib.optionals stdenv.isSunOS [
# Make sure the right <gmp.h> is found, and not the incompatible
# /usr/include/mp.h from OpenSolaris. See
# <https://lists.gnu.org/archive/html/hydra-users/2012-08/msg00000.html>
# for details.
"--with-libgmp-prefix=${lib.getDev gmp}"
# Same for these (?).
"--with-libunistring-prefix=${libunistring}"
# See below.
"--without-threads"
]
# Disable JIT on Apple Silicon, as it is not yet supported
# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44505";
++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "--enable-jit=no"
# At least on x86_64-darwin '-flto' autodetection is not correct:
# https://github.com/NixOS/nixpkgs/pull/160051#issuecomment-1046193028
++ lib.optional (stdenv.isDarwin) "--disable-lto";
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|-lunistring|-L${libunistring}/lib -lunistring|g ;
s|^Cflags:\(.*\)$|Cflags: -I${libunistring}/include \1|g ;
s|-lltdl|-L${libtool.lib}/lib -lltdl|g ;
s|includedir=$out|includedir=$dev|g
"
'';
# make check doesn't work on darwin
# On Linuxes+Hydra the tests are flaky; feel free to investigate deeper.
doCheck = false;
doInstallCheck = doCheck;
setupHook = ./setup-hook-3.0.sh;
passthru = {
updateScript = writeScript "update-guile-3" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl pcre common-updater-scripts
set -eu -o pipefail
# Expect the text in format of '"https://ftp.gnu.org/gnu/guile/guile-3.0.8.tar.gz"'
new_version="$(curl -s https://www.gnu.org/software/guile/download/ |
pcregrep -o1 '"https://ftp.gnu.org/gnu/guile/guile-(3[.0-9]+).tar.gz"')"
update-source-version guile_3_0 "$new_version"
'';
};
meta = with lib; {
homepage = "https://www.gnu.org/software/guile/";
description = "Embeddable Scheme implementation";
longDescription = ''
GNU Guile is an implementation of the Scheme programming language, with
support for many SRFIs, packaged for use in a wide variety of
environments. In addition to implementing the R5RS Scheme standard and a
large subset of R6RS, Guile includes a module system, full access to POSIX
system calls, networking support, multiple threads, dynamic linking, a
foreign function call interface, and powerful string processing.
'';
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ ludo lovek323 vrthra ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,59 @@
commit d514e3fc42eb14a1bc5846b27ef89f50ba3a5d48
Author: Ludovic Courtès <ludo@gnu.org>
Date: Tue Oct 11 10:14:26 2016 +0200
Remove 'umask' calls from 'mkdir'.
Fixes <http://bugs.gnu.org/24659>.
* libguile/filesys.c (SCM_DEFINE): Remove calls to 'umask' when MODE is
unbound; instead, use 0777 as the mode. Update docstring to clarify
this.
diff --git a/libguile/filesys.c b/libguile/filesys.c
index c8acb13ef..921f765f1 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2002, 2004, 2006, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2006,
+ * 2009, 2010, 2011, 2012, 2013, 2014, 2016 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -791,26 +792,21 @@ SCM_DEFINE (scm_delete_file, "delete-file", 1, 0, 0,
SCM_DEFINE (scm_mkdir, "mkdir", 1, 1, 0,
(SCM path, SCM mode),
"Create a new directory named by @var{path}. If @var{mode} is omitted\n"
- "then the permissions of the directory file are set using the current\n"
- "umask. Otherwise they are set to the decimal value specified with\n"
- "@var{mode}. The return value is unspecified.")
+ "then the permissions of the directory are set to @code{#o777}\n"
+ "masked with the current umask (@pxref{Processes, @code{umask}}).\n"
+ "Otherwise they are set to the value specified with @var{mode}.\n"
+ "The return value is unspecified.")
#define FUNC_NAME s_scm_mkdir
{
int rv;
- mode_t mask;
+ mode_t c_mode;
- if (SCM_UNBNDP (mode))
- {
- mask = umask (0);
- umask (mask);
- STRING_SYSCALL (path, c_path, rv = mkdir (c_path, 0777 ^ mask));
- }
- else
- {
- STRING_SYSCALL (path, c_path, rv = mkdir (c_path, scm_to_uint (mode)));
- }
+ c_mode = SCM_UNBNDP (mode) ? 0777 : scm_to_uint (mode);
+
+ STRING_SYSCALL (path, c_path, rv = mkdir (c_path, c_mode));
if (rv != 0)
SCM_SYSERROR;
+
return SCM_UNSPECIFIED;
}
#undef FUNC_NAME

View file

@ -0,0 +1,14 @@
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
index 889bca7..15d39b0 100644
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -74,7 +74,8 @@
in <inttypes.h> would reinclude us, skipping our contents because
_@GUARD_PREFIX@_STDINT_H is defined.
The include_next requires a split double-inclusion guard. */
-# @INCLUDE_NEXT@ @NEXT_STDINT_H@
+# include <inttypes.h>
+// # @INCLUDE_NEXT@ @NEXT_STDINT_H@
#endif
#if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H

View file

@ -0,0 +1,24 @@
Fix doc snarfing with GCC 4.5.
From <http://git.savannah.gnu.org/cgit/guile.git/commit/?h=branch_release-1-8&id=aac41d28358cea594bb30f6e547afb82bb6004a6>.
diff --git a/scripts/snarf-check-and-output-texi b/scripts/snarf-check-and-output-texi
index ea33e17..8cd42e8 100755
--- a/scripts/snarf-check-and-output-texi
+++ b/scripts/snarf-check-and-output-texi
@@ -267,6 +267,17 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
(set! *file* file)
(set! *line* line))
+ ;; newer gccs like to throw around more location markers into the
+ ;; preprocessed source; these (hash . hash) bits are what they translate to
+ ;; in snarfy terms.
+ (('location ('string . file) ('int . line) ('hash . 'hash))
+ (set! *file* file)
+ (set! *line* line))
+
+ (('location ('hash . 'hash) ('string . file) ('int . line) ('hash . 'hash))
+ (set! *file* file)
+ (set! *line* line))
+
(('arglist rest ...)
(set! *args* (do-arglist rest)))

View file

@ -0,0 +1,25 @@
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/gc.test
+++ b/test-suite/tests/gc.test
@@ -67,6 +67,7 @@
(with-test-prefix "gc"
(pass-if "Unused modules are removed"
+ (throw 'unresolved)
(let* ((guard (make-guardian))
(total 1000))
--- 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))

View file

@ -0,0 +1,24 @@
Building nixpkgs in non-chroot, NSS modules may fail
and that will report EAI_SYSTEM in getaddrinfo.
https://bugzilla.novell.com/show_bug.cgi?id=794696
Index: guile-2.0.7/test-suite/tests/net-db.test
===================================================================
--- guile-2.0.7.orig/test-suite/tests/net-db.test
+++ guile-2.0.7/test-suite/tests/net-db.test
@@ -79,6 +79,7 @@
(and (defined? 'EAI_NODATA) ; GNU extension
(= errcode EAI_NODATA))
(= errcode EAI_AGAIN)
+ (= errcode EAI_SYSTEM)
(begin
(format #t "unexpected error code: ~a ~s~%"
errcode (gai-strerror errcode))
@@ -105,6 +106,7 @@
;; `EAI_NONAME'.)
(and (or (= errcode EAI_SERVICE)
(= errcode EAI_NONAME)
+ (= errcode EAI_SYSTEM)
(and (defined? 'EAI_NODATA)
(= errcode EAI_NODATA)))
(string? (gai-strerror errcode))))))))

View file

@ -0,0 +1,28 @@
Filter incompat. mkostemp(3) flags on macOS 10.12
macOS Sierra introduces a mkostemp(3) function which is used when
present. Contrary to the GNUlib version of mkostemp(3) that was used
previously, this version fails with 'invalid argument' when flags other
than from a specified set are passed. From mktemp(3):
| The mkostemp() function is like mkstemp() but allows specifying
| additional open(2) flags (defined in <fcntl.h>). The permitted flags
| are O_APPEND, O_SHLOCK, O_EXLOCK and O_CLOEXEC.
Signed-off-by: Clemens Lang <cal@macports.org>
Upstream-Status: Submitted [https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24862#23]
--- a/libguile/filesys.c.orig 2017-01-09 00:53:27.000000000 +0100
+++ b/libguile/filesys.c 2017-01-09 00:54:48.000000000 +0100
@@ -1486,6 +1486,12 @@
mode_bits = scm_i_mode_bits (mode);
}
+#ifdef __APPLE__
+ /* macOS starting with 10.12 defines mkostemp(2) which is used if defined,
+ * but only accepts some flags according to its manpage. It fails with
+ * invalid argument when other flags are passed. */
+ open_flags &= O_APPEND | O_SHLOCK | O_EXLOCK | O_CLOEXEC;
+#endif
SCM_SYSCALL (rv = mkostemp (c_tmpl, open_flags));
if (rv == -1)
SCM_SYSERROR;

View 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();

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)))))

View file

@ -0,0 +1,7 @@
addGuileLibPath () {
if test -d "$1/share/guile/site"; then
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site"
fi
}
addEnvHooks "$hostOffset" addGuileLibPath

View file

@ -0,0 +1,19 @@
addGuileLibPath () {
if test -d "$1/share/guile/site/2.0"; then
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site/2.0"
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site/2.0"
elif test -d "$1/share/guile/site"; then
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site"
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site"
fi
if test -d "$1/lib/guile/2.0/ccache"; then
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/2.0/ccache"
fi
if test -d "$1/lib/guile/2.0/site-ccache"; then
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/2.0/site-ccache"
fi
}
addEnvHooks "$hostOffset" addGuileLibPath

View file

@ -0,0 +1,19 @@
addGuileLibPath () {
if test -d "$1/share/guile/site/2.2"; then
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site/2.2"
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site/2.2"
elif test -d "$1/share/guile/site"; then
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site"
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site"
fi
if test -d "$1/lib/guile/2.2/ccache"; then
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/2.2/ccache"
fi
if test -d "$1/lib/guile/2.2/site-ccache"; then
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/2.2/site-ccache"
fi
}
addEnvHooks "$hostOffset" addGuileLibPath

View file

@ -0,0 +1,19 @@
addGuileLibPath () {
if test -d "$1/share/guile/site/3.0"; then
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site/3.0"
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site/3.0"
elif test -d "$1/share/guile/site"; then
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site"
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site"
fi
if test -d "$1/lib/guile/3.0/ccache"; then
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/3.0/ccache"
fi
if test -d "$1/lib/guile/3.0/site-ccache"; then
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/3.0/site-ccache"
fi
}
addEnvHooks "$hostOffset" addGuileLibPath