Subject: BUG: Modules compile as ELF's on PE/PE+ architecture

From: Vasiliy <[email-masked]>
Date: Thu, 4 Jul 2013 15:56:11 +0200

Dear Guile Team,

I have just tried to compile Guile from the git sources under Cygwin
(64-bit), and all the modules got compied by GUILEC as ELF
executables, not as PE/PE+'s as I would expect it, what was also quite
(unfortunate) surprising. Any ideas, what could be wrong?

BZW, the compiler has passed almost all tests:

PASS: test-system-cmds
PASS: test-bad-identifiers
PASS: test-require-extension
PASS: test-guile-snarf
PASS: test-import-order
PASS: test-command-line-encoding
PASS: test-command-line-encoding2
PASS: test-language
PASS: test-num2integral.exe
PASS: test-round.exe
PASS: test-asmobs
...
Backtrace:
In ice-9/boot-9.scm:
 163: 11 [catch #t #<catch-closure 600260d20> ...]
In unknown file:
   ?: 10 [apply-smob/1 #<catch-closure 600260d20>]
In ice-9/boot-9.scm:
  65: 9 [call-with-prompt # #<procedure 600268180 at
ice-9/eval.scm:414:20 ()> ...]
In ice-9/eval.scm:
 427: 8 [eval # #]
In ice-9/boot-9.scm:
2623: 7 [save-module-excursion #<procedure 600247100 at
ice-9/boot-9.scm:4118:3 ()>]
4123: 6 [#<procedure 600247100 at ice-9/boot-9.scm:4118:3 ()>]
1979: 5 [%start-stack load-stack ...]
1984: 4 [#<procedure 600269e70 ()>]
In unknown file:
   ?: 3 [primitive-load
"/usr/src/64bit/release/guile/guile-2.1.0-57/src/guile-2.1.0/test-suite/standalone/test-ffi"]
In ice-9/eval.scm:
 448: 2 [eval # ()]
 385: 1 [eval # ()]
In unknown file:
   ?: 0 [dynamic-func "strerror" #<dynamic-object #f>]

ERROR: In procedure dynamic-func:
ERROR: In procedure dynamic-pointer: Symbol not found: strerror
FAIL: test-ffi
PASS: test-list.exe
PASS: test-unwind.exe
fail: scm_from_double (1) == +nan.0
FAIL: test-conversion.exe
PASS: test-loose-ends.exe
PASS: test-fast-slot-ref
PASS: test-mb-regexp
PASS: test-use-srfi
PASS: test-scm-c-read.exe
PASS: test-scm-take-locale-symbol.exe
PASS: test-scm-take-u8vector.exe
PASS: test-scm-to-latin1-string.exe
PASS: test-scm-values.exe
PASS: test-scm-c-bind-keyword-arguments.exe
PASS: test-extensions
PASS: test-with-guile-module.exe
PASS: test-scm-with-guile.exe
PASS: test-scm-spawn-thread.exe
PASS: test-pthread-create.exe
SKIP: test-pthread-create-secondary.exe
PASS: test-smob-mark.exe
==================================
2 of 31 tests failed
(1 test was not run)
Please report to [email-masked]
==================================

My CFLAGS were '-mtune=native -march=native -Ofast -fomit-frame-pointer'

Kind regards,
Vasiliy