Florian Klaempfl wrote:
Marc Weustink schrieb:
Marc Weustink wrote:
Florian Klaempfl wrote:
Luca Olivetti schrieb:
En/na Florian Klaempfl ha escrit:

It should be enough to build FPC with OPT=-dFPC_ARMEL
So it's now possible to produce eabi code with fpc?
Well, I did initial support. If you provide bugs reports, I'll try to
fix them.
hmm... current openmoko versions are eabi, but when I run a testapp
build by such fpc I get:

Program received signal SIGILL, Illegal instruction.
0x000129d0 in SYSTEM_FPSYSCALL$LONGINT$$LONGINT ()
(gdb) bt
#0  0x000129d0 in SYSTEM_FPSYSCALL$LONGINT$$LONGINT ()
#1  0x00012e1c in SYSTEM_FPGETRLIMIT$LONGINT$PRLIMIT$$LONGINT ()
#2  0x0001eef8 in SYSTEM_CHECKINITIALSTKLEN$LONGWORD$$LONGWORD ()
#3  0x0001efbc in SYSTEM_init ()
#4  0x0001a7ec in fpc_initializeunits ()
#5  0x0000e668 in main () at gtk2query.pp:263
I tried something more. I compiled FPC without FPC_ARMEL, but tweaked
init_settings.fputype:=fpu_soft in globals.pas so it would use soft fpu.

Now my testapp crashes on the first librarycall (how surprising), but
passes the fpc_initializeunits (and manages to do some writeln).
From this I assume syscalls in this case are correct and I guess there
is some difference between syscall calling and library calling.

As Luca suspected, this is the wrong way :) You've a kernel with old
syscall support. You should find out why it crashes with -dFPC_ARMEL.

I did this test only to see if there is a difference between calling conventions used for libraries and for syscalls.
It was not an attempt to get this path to working.

Assuming that there is a difference on purpose (need to sort that out), I tried to build a version with FPC_USE_LIBC to eliminate syscalls. After 2 patches, I got a RTL build with it, but it somehow fails to allocate mem. (fmmap returns -1)
Also that needs to be investigated (it was way beyond my bedtime)

Marc

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to