diff --git a/.gitignore b/.gitignore index 36f897261..dc8eedaf4 100644 --- a/.gitignore +++ b/.gitignore @@ -67,8 +67,8 @@ guile-procedures.txt guile-config/guile-config *.go TAGS -/meta/guile-2.2.pc -/meta/guile-2.2-uninstalled.pc +/meta/guile-3.0.pc +/meta/guile-3.0-uninstalled.pc gdb-pre-inst-guile cscope.out cscope.files diff --git a/GUILE-VERSION b/GUILE-VERSION index 223a2935f..a44c254fb 100644 --- a/GUILE-VERSION +++ b/GUILE-VERSION @@ -2,10 +2,10 @@ # Note: `GUILE_VERSION' is defined in `configure.ac' using `git-version-gen'. GUILE_MAJOR_VERSION=2 -GUILE_MINOR_VERSION=2 -GUILE_MICRO_VERSION=2 +GUILE_MINOR_VERSION=3 +GUILE_MICRO_VERSION=0 -GUILE_EFFECTIVE_VERSION=2.2 +GUILE_EFFECTIVE_VERSION=3.0 # All of the shared lib versioning info. Right now, for this to work @@ -16,7 +16,7 @@ GUILE_EFFECTIVE_VERSION=2.2 # See libtool info pages for more information on how and when to # change these. -LIBGUILE_INTERFACE_CURRENT=3 +LIBGUILE_INTERFACE_CURRENT=0 LIBGUILE_INTERFACE_REVISION=0 -LIBGUILE_INTERFACE_AGE=2 +LIBGUILE_INTERFACE_AGE=0 LIBGUILE_INTERFACE="${LIBGUILE_INTERFACE_CURRENT}:${LIBGUILE_INTERFACE_REVISION}:${LIBGUILE_INTERFACE_AGE}" diff --git a/README b/README index 575ea5c3b..2636a7f3a 100644 --- a/README +++ b/README @@ -1,8 +1,8 @@ -This is version 2.2 of Guile, Project GNU's extension language library. -Guile is an implementation of the Scheme programming language, packaged -as a library that can be linked into applications to give them their own -extension language. Guile supports other languages as well, giving -users of Guile-based applications a choice of languages. +This is a prerelease of version 3.0 of Guile, Project GNU's extension +language library. Guile is an implementation of the Scheme programming +language, packaged as a library that can be linked into applications to +give them their own extension language. Guile supports other languages +as well, giving users of Guile-based applications a choice of languages. Please send bug reports to bug-guile@gnu.org. @@ -257,7 +257,7 @@ switches specific to Guile you may find useful in some circumstances. Cross building Guile ===================================================== -As of Guile 2.2.x, the build process produces a library, libguile-2.2, +As of Guile 3.0.x, the build process produces a library, libguile-3.0, along with Guile "object files" containing bytecode to be interpreted by Guile's virtual machine. The bytecode format depends on the endianness and word size of the host CPU. diff --git a/doc/guile.1 b/doc/guile.1 index 7b3d23292..6097ac2e9 100644 --- a/doc/guile.1 +++ b/doc/guile.1 @@ -4,7 +4,7 @@ .\" groff -man -Tascii foo.1 .\" .\" title section date source manual -.TH GUILE 1 "2011-03-04" GNU "GNU Guile 2.2" +.TH GUILE 1 "2017-05-22" GNU "GNU Guile 3.0" . .SH NAME guile \- The GNU Project Extension Language diff --git a/doc/ref/api-evaluation.texi b/doc/ref/api-evaluation.texi index 7a4c8c975..98593ce3f 100644 --- a/doc/ref/api-evaluation.texi +++ b/doc/ref/api-evaluation.texi @@ -935,8 +935,8 @@ When @code{primitive-load-path} searches the @code{%load-compiled-path} for a corresponding compiled file for a relative path it does so by appending @code{.go} to the relative path. For example, searching for @code{ice-9/popen} could find -@code{/usr/lib/guile/2.2/ccache/ice-9/popen.go}, and use it instead of -@code{/usr/share/guile/2.2/ice-9/popen.scm}. +@code{/usr/lib/guile/3.0/ccache/ice-9/popen.go}, and use it instead of +@code{/usr/share/guile/3.0/ice-9/popen.scm}. If @code{primitive-load-path} does not find a corresponding @code{.go} file in the @code{%load-compiled-path}, or the @code{.go} file is out of diff --git a/doc/ref/api-options.texi b/doc/ref/api-options.texi index 0259b4b21..4a9125e42 100644 --- a/doc/ref/api-options.texi +++ b/doc/ref/api-options.texi @@ -60,13 +60,13 @@ The @code{effective-version} function returns the version name that should remain unchanged during a stable series. Currently that means that it omits the micro version. The effective version should be used for items like the versioned share directory name -i.e.@: @file{/usr/share/guile/2.2/} +i.e.@: @file{/usr/share/guile/3.0/} @lisp -(version) @result{} "2.2.0" -(effective-version) @result{} "2.2" -(major-version) @result{} "2" -(minor-version) @result{} "2" +(version) @result{} "3.0.0" +(effective-version) @result{} "3.0" +(major-version) @result{} "3" +(minor-version) @result{} "0" (micro-version) @result{} "0" @end lisp @end deffn @@ -87,7 +87,7 @@ party package) are installed. On Unix-like systems this is usually @file{/usr/share/guile/@var{GUILE_EFFECTIVE_VERSION}}; @noindent -for example @file{/usr/local/share/guile/2.2}. +for example @file{/usr/local/share/guile/3.0}. @end deffn @deffn {Scheme Procedure} %site-dir diff --git a/doc/ref/guile-invoke.texi b/doc/ref/guile-invoke.texi index a18984f31..171a30ada 100644 --- a/doc/ref/guile-invoke.texi +++ b/doc/ref/guile-invoke.texi @@ -373,7 +373,7 @@ Here is an example using the Bash shell that adds the current directory, @example $ export GUILE_LOAD_COMPILED_PATH=".:../my-library" $ guile -c '(display %load-compiled-path) (newline)' -(. ../my-library /usr/local/lib/guile/2.2/ccache) +(. ../my-library /usr/local/lib/guile/3.0/ccache) @end example @item GUILE_LOAD_PATH @@ -392,8 +392,8 @@ directory to @code{%load-path}, and adds the relative directory @example $ env GUILE_LOAD_PATH=".:...:../srfi" \ guile -c '(display %load-path) (newline)' -(. /usr/local/share/guile/2.2 \ -/usr/local/share/guile/site/2.2 \ +(. /usr/local/share/guile/3.0 \ +/usr/local/share/guile/site/3.0 \ /usr/local/share/guile/site \ /usr/local/share/guile \ ../srfi) diff --git a/doc/ref/libguile-foreign-objects.texi b/doc/ref/libguile-foreign-objects.texi index 29e1f8619..0603496d0 100644 --- a/doc/ref/libguile-foreign-objects.texi +++ b/doc/ref/libguile-foreign-objects.texi @@ -276,13 +276,11 @@ make_file (int fd) @cindex finalization Note that the finalizer may be invoked in ways and at times you might -not expect. In particular, if the user's Guile is built with support -for threads, the finalizer may be called from any thread that is running -Guile. In Guile 2.0, finalizers are invoked via ``asyncs'', which -interleaves them with running Scheme code; @pxref{Asyncs}. In Guile 2.2 -there will be a dedicated finalization thread, to ensure that the -finalization doesn't run within the critical section of any other thread -known to Guile. +not expect. In a Guile built without threading support, finalizers are +invoked via ``asyncs'', which interleaves them with running Scheme code; +@pxref{Asyncs}. If the user's Guile is built with support for threads, +the finalizer will probably be called by a dedicated finalization +thread, unless the user invokes @code{scm_run_finalizers ()} explicitly. In either case, finalizers run concurrently with the main program, and so they need to be async-safe and thread-safe. If for some reason this diff --git a/doc/ref/libguile-parallel.texi b/doc/ref/libguile-parallel.texi index 166766edf..75fcd88ba 100644 --- a/doc/ref/libguile-parallel.texi +++ b/doc/ref/libguile-parallel.texi @@ -27,7 +27,7 @@ need to know which version of Guile to ask for, when they build against Guile. Guile solves this problem by installing a file to be read by the @code{pkg-config} utility, a tool to query installed packages by name. Guile encodes the version into its pkg-config name, so that users can -ask for @code{guile-2.0} or @code{guile-2.2}, as appropriate. +ask for @code{guile-2.2} or @code{guile-3.0}, as appropriate. For effective version @value{EFFECTIVE-VERSION}, for example, you would invoke @code{pkg-config --cflags --libs guile-@value{EFFECTIVE-VERSION}} diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi index 3d4415629..ae1c6109c 100644 --- a/doc/ref/srfi-modules.texi +++ b/doc/ref/srfi-modules.texi @@ -151,6 +151,7 @@ The Guile core has the following features, guile guile-2 ;; starting from Guile 2.x guile-2.2 ;; starting from Guile 2.2 +guile-3.0 ;; starting from Guile 3.0 r5rs srfi-0 srfi-4 diff --git a/libguile/_scm.h b/libguile/_scm.h index 093815d98..2c505faab 100644 --- a/libguile/_scm.h +++ b/libguile/_scm.h @@ -247,9 +247,9 @@ void scm_ia64_longjmp (scm_i_jmp_buf *, int); #define SCM_OBJCODE_WORD_SIZE SCM_CPP_STRINGIFY (SIZEOF_VOID_P) /* Major and minor versions must be single characters. */ -#define SCM_OBJCODE_MAJOR_VERSION 3 -#define SCM_OBJCODE_MINIMUM_MINOR_VERSION 9 -#define SCM_OBJCODE_MINOR_VERSION A +#define SCM_OBJCODE_MAJOR_VERSION 4 +#define SCM_OBJCODE_MINIMUM_MINOR_VERSION 0 +#define SCM_OBJCODE_MINOR_VERSION 0 #define SCM_OBJCODE_MAJOR_VERSION_STRING \ SCM_CPP_STRINGIFY(SCM_OBJCODE_MAJOR_VERSION) #define SCM_OBJCODE_MINOR_VERSION_STRING \ diff --git a/libguile/loader.c b/libguile/loader.c index 54bf1bff5..d8816abcd 100644 --- a/libguile/loader.c +++ b/libguile/loader.c @@ -87,7 +87,7 @@ static void register_elf (char *data, size_t len, char *frame_maps); enum bytecode_kind { BYTECODE_KIND_NONE, - BYTECODE_KIND_GUILE_2_2 + BYTECODE_KIND_GUILE_3_0 }; static SCM @@ -95,7 +95,7 @@ pointer_to_procedure (enum bytecode_kind bytecode_kind, char *ptr) { switch (bytecode_kind) { - case BYTECODE_KIND_GUILE_2_2: + case BYTECODE_KIND_GUILE_3_0: { return scm_i_make_program ((scm_t_uint32 *) ptr); } @@ -294,12 +294,11 @@ process_dynamic_segment (char *base, Elf_Phdr *dyn_phdr, scm_t_uint16 minor = dyn[i].d_un.d_val & 0xffff; switch (major) { - case 0x0202: - bytecode_kind = BYTECODE_KIND_GUILE_2_2; + case 0x0300: + bytecode_kind = BYTECODE_KIND_GUILE_3_0; if (minor < SCM_OBJCODE_MINIMUM_MINOR_VERSION) return "incompatible bytecode version"; - /* FIXME for 3.0: Go back to integers. */ - if (minor > SCM_OBJCODE_MINOR_VERSION_STRING[0]) + if (minor > SCM_OBJCODE_MINOR_VERSION) return "incompatible bytecode version"; break; default: @@ -320,7 +319,7 @@ process_dynamic_segment (char *base, Elf_Phdr *dyn_phdr, switch (bytecode_kind) { - case BYTECODE_KIND_GUILE_2_2: + case BYTECODE_KIND_GUILE_3_0: if ((scm_t_uintptr) init % 4) return "unaligned DT_INIT"; if ((scm_t_uintptr) entry % 4) @@ -356,6 +355,8 @@ load_thunk_from_memory (char *data, size_t len, int is_read_only) SCM init = SCM_BOOL_F, entry = SCM_BOOL_F; char *frame_maps = 0; + errno = 0; + if (len < sizeof *header) ABORT ("object file too small"); diff --git a/meta/Makefile.am b/meta/Makefile.am index d49ebd9ac..acbd8e71a 100644 --- a/meta/Makefile.am +++ b/meta/Makefile.am @@ -77,7 +77,7 @@ substitute = \ -e "s|[@]guild[@]|$$guild|g" \ -e "s|[@]installed_guile[@]|$$installed_guile|g" -# Substitutions for dependencies that appear in 'guile-2.0.pc'. +# Substitutions for dependencies that appear in 'guile-3.0.pc'. dependency_substitutions = \ -e "s|[@]BDW_GC_CFLAGS[@]|$(BDW_GC_CFLAGS)|g" \ -e "s|[@]BDW_GC_LIBS[@]|$(BDW_GC_LIBS)|g" \ diff --git a/meta/guile-2.2-uninstalled.pc.in b/meta/guile-3.0-uninstalled.pc.in similarity index 100% rename from meta/guile-2.2-uninstalled.pc.in rename to meta/guile-3.0-uninstalled.pc.in diff --git a/meta/guile-2.2.pc.in b/meta/guile-3.0.pc.in similarity index 100% rename from meta/guile-2.2.pc.in rename to meta/guile-3.0.pc.in diff --git a/module/system/vm/assembler.scm b/module/system/vm/assembler.scm index 8d71dc551..1eb253f65 100644 --- a/module/system/vm/assembler.scm +++ b/module/system/vm/assembler.scm @@ -1806,8 +1806,8 @@ needed." ;;; ;; FIXME: Define these somewhere central, shared with C. -(define *bytecode-major-version* #x0202) -(define *bytecode-minor-version* (char->integer #\A)) +(define *bytecode-major-version* #x0300) +(define *bytecode-minor-version* 0) (define (link-dynamic-section asm text rw rw-init frame-maps) "Link the dynamic section for an ELF image with bytecode @var{text},