diff options
author | Andy Wingo <wingo@pobox.com> | 2017-04-18 21:37:36 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2017-04-18 21:37:36 +0200 |
commit | e0502f3c7711e2f505126297e66cafa43d232685 (patch) | |
tree | 81fdbe756a22b83278a08f4a7adc3479bb54820f /libguile/loader.c | |
parent | 7c71be0c7e8c533b221dbd71e29e94ea213787cf (diff) | |
download | guile-e0502f3c7711e2f505126297e66cafa43d232685.tar.gz |
Bump objcode version in a compatible way
* libguile/_scm.h (SCM_OBJCODE_MINIMUM_MINOR_VERSION): New definition,
indicating the oldest objcode version that we support.
(SCM_OBJCODE_MINOR_VERSION): Bump.
* libguile/loader.c (process_dynamic_segment): Support a range of
versions.
* module/system/vm/assembler.scm (*bytecode-minor-version*): Bump.
Diffstat (limited to 'libguile/loader.c')
-rw-r--r-- | libguile/loader.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libguile/loader.c b/libguile/loader.c index 7b1adc9c9..54bf1bff5 100644 --- a/libguile/loader.c +++ b/libguile/loader.c @@ -296,12 +296,10 @@ process_dynamic_segment (char *base, Elf_Phdr *dyn_phdr, { case 0x0202: bytecode_kind = BYTECODE_KIND_GUILE_2_2; - /* As we get closer to 2.2, we will allow for backwards - compatibility and we can change this test to ">" - instead of "!=". However until then, to deal with VM - churn it's best to keep these things in - lock-step. */ - if (minor != SCM_OBJCODE_MINOR_VERSION) + 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]) return "incompatible bytecode version"; break; default: |