1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 04:10:18 +02:00
guile/module/system/base
Ludovic Courtès de2c0a10fe Complete cross-compilation support.
* module/system/base/target.scm (%target-endianness, %target-word-size):
  New fluids.
  (%native-word-size): New variable.
  (with-target): Set these fluids.
  (cpu-endianness, cpu-word-size, triplet-cpu, triplet-vendor,
  triplet-os): New procedures.
  (target-cpu, target-vendor, target-os): Use them.
  (target-endianness, target-word-size): Refer to the corresponding
  fluid.

* libguile/objcodes.c (target_endianness_var, target_word_size_var): New
  global variables.
  (NATIVE_ENDIANNESS): New macro.
  (target_endianness, target_word_size, to_native_order): New functions.
  (make_objcode_from_file): Use `scm_bytecode_to_native_objcode' instead
  of `scm_bytecode_to_objcode'.
  (bytecode_to_objcode): New function, based on `scm_bytecode_to_objcode',
  with the addition of an `endianness' and `word_size' parameters.
  (scm_bytecode_to_objcode): Use it.
  (scm_bytecode_to_native_objcode): New function.
  (scm_write_objcode): Use `target_word_size' and `target_endianness'.
  Convert OBJCODE's len and meta-len to native byte order.
  (scm_init_objcodes): Initialize `target_endianness_var' and
  `target_word_size_var'.

* libguile/objcodes.h (scm_bytecode_to_native_objcode): New declaration.

* libguile/vm.c (really_make_boot_program): Use
  `scm_bytecode_to_native_objcode' instead of `scm_bytecode_to_objcode'.

* test-suite/tests/asm-to-bytecode.test (%objcode-cookie-size): New
  variable.
  (test-target): New procedure.
  ("cross-compilation"): Add `test-target' calls and the "unknown
  target" test.
2011-11-22 00:22:46 +01:00
..
compile.scm fix generation of auto-compiled file names on mingw systems 2011-06-30 16:07:17 +02:00
lalr.scm add source-location->source-properties to lalr 2010-11-18 12:31:28 +01:00
lalr.upstream.scm Add Boucher's lalr-scm' as the (system base lalr)' module. 2010-03-31 00:41:59 +02:00
language.scm current-language really defaults to Scheme. 2011-06-17 19:57:24 +02:00
message.scm Add `*current-warning-prefix*'. 2011-02-13 19:13:36 +01:00
pmatch.scm pmatch license clarification clarifications 2010-03-14 17:48:49 +01:00
syntax.scm let-values in terms of syntax-case, add make-tree-il-folder 2009-08-05 21:35:30 +02:00
target.scm Complete cross-compilation support. 2011-11-22 00:22:46 +01:00