Commit 57a889b728 fixed out-of-tree
cross-compilation builds but broke in-tree cross-compilation builds.
With this change, we should have both.
* libguile/Makefile.am (gen-scmconfig.$(OBJEXT)): Use ‘-iquote’ instead
of ‘-I’.
* check-guile.in (top_srcdir): Don't try to make guile-procedures.tx, as
this races with multiple checkers, and it's gross.
* meta/uninstalled-env.in (GUILE_DOCSTRINGS_PATH): Instead when
uninstalled, use this variable.
* module/ice-9/documentation.scm (documentation-files): Remove the
current directory from the search path for documentation files; this was
always a hack. Instead allow GUILE_DOCSTRINGS_PATH to override the
built-in search path.
* libguile/scmsigs.c: Use raw pthread_create / pthread_join instead of
Guile's scm_spawn_thread, to ensure that the thread is entirely stopped
before a fork.
* libguile/scmsigs.h (scm_i_is_signal_delivery_thread): New internal
procedure, replacing a manual check against scm_i_signal_delivery_thread.
* libguile/threads.c: Use the new procedure.
Based on a patch by Rob Browning. Thanks!
Automake "strongly discourages" use of the serial driver, and switching
to the preferred parallel driver allows make -j4 check to run in about
half the time on a four core (not thread) host.
* Makefile.am (TESTS, TESTS_ENVIRONMENT): run ./check-guile from
test-suite/, not here.
* check-guile.in: let test harness handle progress output.
* configure.ac (AM_INIT_AUTOMAKE): allow parallel testing.
* test-suite/Makefile.am (SCM_TESTS): remove non-tests.
(EXTRA_DIST): move non-tests here.
(TESTS): include SCM_TESTS (now driven from here).
(TEST_EXTENSIONS): allow customization for .scm and .test.
(TESTS_ENVIRONMENT): stop defining (user only).
(AM_TESTS_ENVIRONMENT): replaces TESTS_ENVIRONMENT; drop guile.
(SCM_LOG_COMPILER): run .scm tests via meta/guile.
(AM_SCM_LOG_FLAGS): keep --no-auto-compile for .scm tests.
(TEST_LOG_DRIVER): run .test tests via custom automake ./driver.
* test-suite/driver: add automake test driver.
Support an optional --trs-file PATH argument that causes guile-test to
write the status information expected by the automake parallel test
harness to PATH.
In addition, when --trs-file is specified, suppress the final test
summary (via print-counts) since it would be repeated per-test-file when
running in parallel, the automake harness prints its own summary.
cf. https://www.gnu.org/software/automake/manual/html_node/API-for-Custom-Test-Drivers.html
* test-suite/guile-test (main): support --trs-file and --log-file.
* test-suite/test-suite/lib.scm: add count-summary-line.
* test-suite/test-suite/lib/automake.scm: add automake custom test driver.
Return 2 rather than 1 for errors so that 1 will be available for any
future boolean tests (as with say grep).
Direct error message to stderr rather than stdout.
* check-guile.in: send error message to stderr and exit 2 (not 1).
This allows users to adjust their pkg-config install location.
* configure.ac: Call PKG_INSTALLDIR.
* meta/Makefile.am (pkgconfigdir): Remove. It will be defined
automatically by the PKG_INSTALLDIR invocation.
* libguile/r6rs-ports.c (get_bytevector_all_var): New variable.
(init_bytevector_io_vars): New function.
(scm_get_bytevector_all): Rewrite as a proxy to ‘get-bytevector-all’
from (ice-9 binary-port).
* module/ice-9/binary-ports.scm (get-bytevector-all): New procedure.
* NEWS: Update.
Reported-by: Christopher Baines <mail@cbaines.net>
As suggested in
<https://lists.gnu.org/archive/html/guile-devel/2023-06/msg00008.html>.
* module/language/wisp.scm (wisp-uuid): Remove.
(repr-quote, repr-unquote, repr-quasiquote, repr-unquote-splicing)
(repr-syntax, repr-unsyntax, repr-quasisyntax, repr-unsyntax-splicing):
Turn into uninterned symbols.
(line-continues?, chunk-ends-with-period,
line-code-replace-inline-colons): Adjust comparisons accordingly.
(wisp-replace-paren-quotation-repr)[pred]: New procedure.
Use it to compare against the various ‘repr-’ values.
(wisp-make-improper)[dot?]: New procedure.
Use it to compare against ‘repr-dot’.
Fixes <https://bugs.gnu.org/67063>.
* doc/ref/api-io.texi (Venerable Port Interfaces): Bring unread-string
procedure documentation in line with other procedures in the section.
* libguile/ports.c (scm_unread_string): Make port argument optional.
* test-suite/tests/ports.test: Test unread-char and unread-string
without ports.
* NEWS: Update.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
The builtin primitive procedure `error` takes an optional message and
a list of arguments to include into the error message.
These args are formatted with `~S` and appended to the error message, so
that an example call of
`(error "Wrong argument: " 42)`
results in the output
"Wrong argument: 42"
If format strings occur in the message itself, however, they are
escaped. Thus a call like
`(error "Wrong argument: ~a" 42)`
is rendered as
"Wrong argument: ~a 42"
Some callers did not take this behavior into account, leading to
confusing error messages.
Changing the behavior of `error` to be
both backwards-compatible and accept also format strings inside messages
is not straightforward, because it would have to handle escaped `~`
characters as well. Therefore, fix `error` call sites using format
strings to use `format` before calling out to `error`.
The following files are affected:
* module/ice-9/format.scm (format)
* module/ice-9/r6rs-libraries.scm (resolve-r6rs-interface)
* module/oop/goops.scm (make)
* module/srfi/srfi-37.scm (Comment at the beginning of file)
* module/system/base/compile.scm (call-once)
* module/system/repl/command.scm (break, tracepoint)
* module/system/repl/common.scm (repl-default-options)
* module/system/vm/traps.scm (arg-check, trap-at-source-location)
There are a couple of further call sites that were left unchanged,
either because they are using their own `error` procedure:
* module/ice-9/read.scm
* module/ice-9/command-line.scm
or are not referenced from other modules:
* module/system/base/lalr.upstream.scm:
* module/sxml/upstream/assert.scm:
* module/sxml/sxml-match.ss:
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
gen-scmconfig.h is generated in libguile, not $(top_builddir).
* libguile/Makefile.am: Add '-I.' when compiling gen-scmconfig.o.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Commit 08041d216f attempted to make the "invocation compatible with
BSD sed", but moving '-i' first does not solve the problem because
it still requires to pass an argument. Instead just redirect the
instantiated output into a temporary file and install that.
* libguile/Makefile.am: Remove '-i' from INSTANTIATE.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Fixes <https://bugs.gnu.org/70144>.
Fixes a bug whereby ‘system*’ would change the handler of SIGINT and
SIGQUIT to SIG_IGN in a racy fashion, possibly competing with calls to
‘sigaction’ in Scheme in another thread.
This is a followup to 527c257d6e, which
witch to ‘posix_spawn’, ensuring signals are properly dealt with when
creating child processes.
* libguile/posix.c (restore_sigaction, scm_dynwind_sigaction): Remove.
(scm_system_star): Remove sigaction dynwind around call to
‘piped_process’.
* NEWS: Update.
Reported-by: Christopher Baines <mail@cbaines.net>
* module/language/tree-il/optimize.scm (make-optimizer): If the keyword
argument #:dump-optimized-tree-il? is present, print the Tree-IL that
will be handed to the next compiler. Also re-enable #:verify-tree-il?.
* libguile/scmsigs.c (scm_i_signals_post_fork): It's possible for
SCM_I_PTHREAD_ONCE_INIT to be a braced initializer. In that case when
this initializer is re-used as an assignment, it needs the type to
instead be treated as a C11 literal. Fixes compilation on Mac OS.
Thanks to Tony Garnock-Jones for the patch.
* lightening/aarch64-cpu.c (SWPAL, CASAL): New instructions.
(swap_atomic, cas_atomic): Use better instructions if we have LSE.
* lightening/aarch64.c (get_hwcap, jit_get_cpu): Arrange to detect LSE
availability on GNU/Linux and Darwin.
Based on a patch by Tony Garnock-Jones. Thanks!
Fixes a regression introduced in
4a0c2433d9: the strategy wouldn’t work
when writing to, say, a bytevector output port.
* module/system/vm/linker.scm (link-elf)[write-padding]: Reintroduce
loop for when PORT is not a file port. Remove first argument.
* libguile/ports.c (scm_seek): Let SEEK_DATA and SEEK_HOLE through.
(scm_init_ice_9_ports): Define ‘SEEK_DATA’ and ‘SEEK_HOLE’.
* module/ice-9/ports.scm: Export ‘SEEK_DATA’ and ‘SEEK_HOLE’ when
defined.
* test-suite/tests/ports.test ("size of sparse file")
("SEEK_DATA while on data", "SEEK_DATA while in hole")
("SEEK_HOLE while in hole"): New tests.
* NEWS: Update.