[fpc-pascal] is there a ready to use FPC Cross compiler x86-Linux -> MIPS-linux?
Dennis Poon
dennis at avidsoft.com.hk
Sat Jun 15 19:19:57 CEST 2013
I eventually found this page which talked about downloading a special
toolchain from openwrt web site
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=61112
I followed its instruction and successfully compiled a helloworld c
program and
successfully RUN the helloworld binary on Netgear 3700 running DD-Wrt !
I was overjoyed.
Then I tried to modify the steps to compile fpc
my toolchains is at /home/dennis/toolchains/staging_dir_mips/bin/
and in this folder, there are files: mips-linux-ar and mips-linux-as
so I
make clean all CPU_TARGET=mips OS_TARGET=linux
BINUTILSPREFIX=/home/dennis/toolchains/staging_dir_mips/bin/mips-linux-
but I got errors:
/home/dennis/toolchains/staging_dir_mips/bin/mips-linux-as -32 -mips32
-EB -o /home/dennis/fpc/2.7.1/rtl/units/mips-linux/prt0.o mips/prt0.as
mips/prt0.as: Assembler messages:
mips/prt0.as:23: Error: illegal operands `lui $a2,%hi(__dl_fini)'
mips/prt0.as:25: Error: illegal operands `sw $v0,%lo(__dl_fini)($a2)'
mips/prt0.as:54: Error: illegal operands `move $s8,$sp'
mips/prt0.as:56: Error: illegal operands `sw $s8,%lo(__stkptr)($at)'
mips/prt0.as:65: Error: illegal operands `lw $a0,0($s8)'
mips/prt0.as:66: Error: illegal operands `lui
$a1,%hi(operatingsystem_parameter_argc)'
mips/prt0.as:67: Error: illegal operands `sw
$a0,%lo(operatingsystem_parameter_argc)($a1)'
mips/prt0.as:70: Error: illegal operands `addiu $a1,$s8,4'
mips/prt0.as:71: Error: illegal operands `lui
$a2,%hi(operatingsystem_parameter_argv)'
mips/prt0.as:72: Error: illegal operands `sw
$a1,%lo(operatingsystem_parameter_argv)($a2)'
mips/prt0.as:75: Error: illegal operands `addiu $a2,$a0,1'
mips/prt0.as:76: Error: illegal operands `sll $a2,$a2,0x2'
mips/prt0.as:77: Error: illegal operands `addu $a2,$a2,$a1'
mips/prt0.as:78: Error: illegal operands `lui
$a3,%hi(operatingsystem_parameter_envp)'
mips/prt0.as:79: Error: illegal operands `sw
$a2,%lo(operatingsystem_parameter_envp)($a3)'
mips/prt0.as:80: Error: illegal operands `lui $t9,%hi(PASCALMAIN)'
mips/prt0.as:81: Error: illegal operands `addiu $t9,$t9,%lo(PASCALMAIN)'
mips/prt0.as:82: Error: illegal operands `jalr $t9'
mips/prt0.as:95: Error: illegal operands `sw $a0,16($sp)'
mips/prt0.as:97: Error: illegal operands `lw $t9,%lo(__dl_fini)($at)'
mips/prt0.as:98: Error: illegal operands `beqz $t9,.L1'
mips/prt0.as:100: Error: illegal operands `jalr $t9'
mips/prt0.as:103: Error: illegal operands `lw $a0,16($sp)'
mips/prt0.as:104: Error: illegal operands `li $v0,4001'
make[5]: *** [prt0.o] Error 1
make[5]: Leaving directory `/home/dennis/fpc/2.7.1/rtl/linux'
make[4]: *** [linux_all] Error 2
make[4]: Leaving directory `/home/dennis/fpc/2.7.1/rtl'
make[3]: *** [rtl] Error 2
make[3]: Leaving directory `/home/dennis/fpc/2.7.1/compiler'
make[2]: *** [cycle] Error 2
make[2]: Leaving directory `/home/dennis/fpc/2.7.1/compiler'
make[1]: *** [compiler_cycle] Error 2
make[1]: Leaving directory `/home/dennis/fpc/2.7.1'
make: *** [build-stamp.mips-linux] Error 2
I feel I am almost there. Any help on the above?
Dennis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130616/feef6306/attachment.html>
More information about the fpc-pascal
mailing list