[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mips64el: guild problem
From: |
Ludovic Courtès |
Subject: |
Re: mips64el: guild problem |
Date: |
Mon, 18 Feb 2013 23:28:39 +0100 |
User-agent: |
Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) |
Andreas Enge <address@hidden> skribis:
> ice-9/boot-9.scm:106:20: In procedure make_objcode_from_file: bad header on
> object file: "GOOF----LE-8-2.0"
This “GOOF” cookie indicates the Guile Object Object(!) Format. Here,
it says little endian with 8-byte pointers. That corresponds to this
GNU triplet:
--8<---------------cut here---------------start------------->8---
scheme@(system base target)> (with-target "mips64el-unknown-linux-gnu" (lambda
() (list (target-endianness) (target-word-size))))
$2 = (little 8)
--8<---------------cut here---------------end--------------->8---
However, my guess is that Guile was compiled with the N32 ABI, so it
expects 4-byte words. But Guile’s system/base/target.scm makes this
wrong assumption that “mips64” means 8-byte pointers:
--8<---------------cut here---------------start------------->8---
(define (cpu-word-size cpu)
"Return the word size for CPU."
(if (string=? cpu (triplet-cpu %host-type))
%native-word-size
(cond ((string-match "^i[0-9]86$" cpu) 4)
((string-match "64$" cpu) 8)
((string-match "64[lbe][lbe]$" cpu) 8)
((member cpu '("sparc" "powerpc" "mips" "mipsel")) 4)
((string-match "^arm.*" cpu) 4)
(else (error "unknown CPU word size" cpu)))))
--8<---------------cut here---------------end--------------->8---
For now, you can work around it by removing the --target argument from
Makefile.am.
Can you confirm?
Thanks,
Ludo’.