From 04a073f4bf1cc31a3a2606468b0e017b69d7ff39 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sat, 7 Nov 2020 16:03:14 +0100 Subject: [PATCH] * Allow for manually bumbing new native compiler ABI versions * src/comp.c (ABI_VERSION): Define macro. (hash_native_abi): Include ABI_VERSION in the hashing. (syms_of_comp): Tweak docstring. --- src/comp.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/comp.c b/src/comp.c index 05ec073c1fd..cb5f1a1ce96 100644 --- a/src/comp.c +++ b/src/comp.c @@ -406,6 +406,9 @@ load_gccjit_if_necessary (bool mandatory) } +/* Increase this number to force a new Vcomp_abi_hash to be generated. */ +#define ABI_VERSION "0" + /* C symbols emitted for the load relocation mechanism. */ #define CURRENT_THREAD_RELOC_SYM "current_thread_reloc" #define PURE_RELOC_SYM "pure_reloc" @@ -778,8 +781,10 @@ hash_native_abi (void) eassert (NILP (Vcomp_abi_hash)); Vcomp_abi_hash = - comp_hash_string (Fmapconcat (intern_c_string ("subr-name"), - Vcomp_subr_list, build_string (""))); + comp_hash_string ( + concat2 (build_string (ABI_VERSION), + Fmapconcat (intern_c_string ("subr-name"), + Vcomp_subr_list, build_string ("")))); Lisp_Object separator = build_string ("-"); Vcomp_native_version_dir = concat3 (Vemacs_version, @@ -5262,7 +5267,7 @@ native compiled one. */); DEFVAR_LISP ("comp-subr-list", Vcomp_subr_list, doc: /* List of all defined subrs. */); DEFVAR_LISP ("comp-abi-hash", Vcomp_abi_hash, - doc: /* String signing the ABI exposed to .eln files. */); + doc: /* String signing the .eln files ABI. */); Vcomp_abi_hash = Qnil; DEFVAR_LISP ("comp-native-version-dir", Vcomp_native_version_dir, doc: /* Directory in use to disambiguate eln compatibility. */); -- 2.39.5