> From: Matt Birkholz <p...@birchwood-abbey.net>
> Date: Fri, 29 Nov 2013 11:54:09 -0700
> 
> [...] you might want to look at why `make check' fails on i386.  New
> flonum tests reveal a snafu in SIGFPE handling that leaves a bogus
> word in the heap.  The bogosity trips up find_block_address's heap
> scan -- a "linkage section" where none should be.

I found the problem.  I created a new primitive that scans the whole
heap with find_block_address() and started calling it everywhere.  I
found that SIGFPE recovery may trip over the bogus linkage section
header, but it is not the cause.  If I run `make check' a second time,
it works fine!  If I clean tests/ and run `make check' it fails again.

I eventually narrowed it down to GCs during the compilation of
test-arith.bin.  No bogosity appears in the heap after compilation of
other files (GCing or not), nor after compilation of test-arith
withOUT a GC.  Interesting, eh?  (No.)

Upon closer examination of the Riastradh Build (with my hack to make
it work), I realized binaries were fasdumped by the host and loaded
into the target -- not the cross-compile I was expecting.  The
--enable-cross-compiling option seems to force a cross-compile, but
then installation fails because there are no .bci's, just .fni's.
(Perhaps that is easy to fix?)  Besides that, the cross-compiled
.com's are not compiled by-procedure and... and there were good
reasons why compile-svm.sh took the pains it did.

So I generalized compile-svm.sh somewhat, called the variation
cross-compile.sh, and usurped the Riastradh Build as in the patch
below.  This brought immediate relief and I did not have to #undef
ENABLE_TRAP_RECOVERY.

diff --git a/src/Makefile.in b/src/Makefile.in
index adaf948..e3a85e0 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -79,22 +79,10 @@ check:
        ./microcode/scheme --library lib --batch-mode \
          --load ../tests/check.scm --eval '(%exit)'
 
-all-native: microcode/scheme
-all-native: lib/runtime.com
-all-native: lib/all.com
-all-native: all-compiler
-all-native: all-cref
-all-native: all-edwin
-all-native: all-ffi
-all-native: all-imail
-all-native: all-runtime
-all-native: all-sf
-all-native: all-sos
-all-native: all-ssp
-all-native: all-star-parser
-all-native: all-win32
-all-native: all-xml
-all-native: cross-target
+all-native:
+       $(MAKE) compile-microcode
+       @$(top_srcdir)/etc/cross-compile.sh "$(MIT_SCHEME_EXE)"
+       $(MAKE) build-bands
 
 @IF_CROSS@COMPILER_SETTINGS_CROSS = (set! compiler:cross-compiling? true)
 @IF_LIARC@COMPILER_SETTINGS_LIARC = (set! compiler:invoke-c-compiler? false)

_______________________________________________
MIT-Scheme-devel mailing list
MIT-Scheme-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/mit-scheme-devel

Reply via email to