Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2012-10

CrossCompiling :: Windows -> Linux/MIPS

8 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

SkyDiablo

so wow !

my question have a little prehistory, but direct to the problem. i have
compile a crosscompiler;

windows -> Linux/MIPS

all works fine with one exception. if i start my helloWorld binary on my destination target system, i get this message:

FPU emulator disabled, make sure your toolchain was compiled with software floating point support (soft-float)

someone can think: "oh, the toolchain is wrong", but no, with the same toolchain and with an c++ source, i can create a working binary with this compiler switch: "-msoft-float".

so, how can i implement this "software floating point" behavoir in my FPC binary?

greez & thx,
sky...
<http://www.dict.cc/englisch-deutsch/prehistory.html>

Reply by email

Sven Barth
to SkyDiablo

You should also post how you compiled the compiler (e.g. your batch file) so everyone knows what you did to reach your current state. ;)

Regards,
Sven

SkyDiablo wrote 29 lines
so wow ! my question have a little prehistory, but direct to the problem. i have compile a crosscompiler; windows -> Linux/MIPS all works fine with one exception. if i start my helloWorld binary on my destination target system, i get this message: FPU emulator disabled, make sure your toolchain was compiled with software floating point support (soft-float) someone can think: "oh, the toolchain is wrong", but no, with the same toolchain and with an c++ source, i can create a working binary with this compiler switch: "-msoft-float". so, how can i implement this "software floating point" behavoir in my FPC binary? greez & thx, sky... <http://www.dict.cc/englisch-deutsch/prehistory.html> _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Jeppe Græsdal Johansen
to SkyDiablo: so wow ! my question have a little prehistory, but direct to the problem. i have compile…
SkyDiablo wrote 22 lines
so wow ! my question have a little prehistory, but direct to the problem. i have compile a crosscompiler; windows -> Linux/MIPS all works fine with one exception. if i start my helloWorld binary on my destination target system, i get this message: FPU emulator disabled, make sure your toolchain was compiled with software floating point support (soft-float) someone can think: "oh, the toolchain is wrong", but no, with the same toolchain and with an c++ source, i can create a working binary with this compiler switch: "-msoft-float". so, how can i implement this "software floating point" behavoir in my FPC binary? greez & thx, sky...

When building the crosscompiler try adding CROSSOPT="-Cfsoft". The same argument(-Cfsoft) should be specified when building a program with the crosscompiler afterwards. -Cf sets the FPU type, which by default is set to mips32. soft sets it to softfpu

Reply by email

SkyDiablo
to Sven Barth: You should also post how you compiled the compiler (e.g. your batch file) so everyone…

ok ;)

here are my current batch-build-script:

===========================================
set
PATH=C:\lazarus\fpc\2.6.0\bin\i386-win32;D:\Sourcery_CodeBench_Lite_for_MIPS_GNU_Linux_Toolchain\lib\gcc;D:\Sourcery_CodeBench_Lite_for_MIPS_GNU_Linux_Toolchain\bin set PREFIX=mips-linux-gnu-
set INSTALLDIR="D:\fpc\install"
set FPCMAKE="D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc\utils\fpcm\fpcmake.exe" set CPU_TARGET=mips
set OS_TARGET=linux
set CROSSOPT="-Cfsoft"

cd D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc
make distclean

cd D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc\utils\fpcm
make all

cd D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc
make all OS_TARGET=%OS_TARGET% CPU_TARGET=%CPU_TARGET% BINUTILSPREFIX=%PREFIX% CROSSOPT=%CROSSOPT%
make crossinstall OS_TARGET=%OS_TARGET% CPU_TARGET=%CPU_TARGET% BINUTILSPREFIX=%PREFIX% INSTALL_PREFIX=%INSTALLDIR% FPCMAKE=%FPCMAKE% CROSSOPT=%CROSSOPT%
make all install INSTALL_PREFIX=%INSTALLDIR% BINUTILSPREFIX=%PREFIX% CROSSOPT=%CROSSOPT%

pause
===========================================

and no, i have the same error as befor...

greez & thx,
sky...

Sven Barth wrote 40 lines
You should also post how you compiled the compiler (e.g. your batch file) so everyone knows what you did to reach your current state. ;) Regards, Sven On 30.10.2012 21:54, SkyDiablo wrote: > so wow ! > > my question have a little prehistory, but direct to the problem. i have > compile a crosscompiler; > > windows -> Linux/MIPS > > all works fine with one exception. if i start my helloWorld binary on my > destination target system, i get this message: > > FPU emulator disabled, make sure your toolchain was compiled with > software floating point support (soft-float) > > someone can think: "oh, the toolchain is wrong", but no, with the same > toolchain and with an c++ source, i can create a working binary with > this compiler switch: "-msoft-float". > > so, how can i implement this "software floating point" behavoir in my > FPC binary? > > greez & thx, > sky... > <http://www.dict.cc/englisch-deutsch/prehistory.html> > > > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel > _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Mark Morgan Lloyd
to Sven Barth: You should also post how you compiled the compiler (e.g. your batch file) so everyone…
Sven Barth wrote 26 lines
You should also post how you compiled the compiler (e.g. your batch file) so everyone knows what you did to reach your current state. ;) Regards, Sven On 30.10.2012 21:54, SkyDiablo wrote: > so wow ! > > my question have a little prehistory, but direct to the problem. i have > compile a crosscompiler; > > windows -> Linux/MIPS > > all works fine with one exception. if i start my helloWorld binary on my > destination target system, i get this message: > > FPU emulator disabled, make sure your toolchain was compiled with > software floating point support (soft-float) > > someone can think: "oh, the toolchain is wrong", but no, with the same > toolchain and with an c++ source, i can create a working binary with > this compiler switch: "-msoft-float". > > so, how can i implement this "software floating point" behavoir in my > FPC binary?

But a couple of days ago I sent him a binary of a "do-nothing" program, and via mail he tells me that

-----8<-----
# chmod +x donothing
# ./donothing
-bash: ./donothing: cannot execute binary file

# chmod +x test
# ./test
-bash: ./test: cannot execute binary file

i think i have a big endian system...
----->8-----

Would an empty program give this error if it were an FP issue (and for test purposes, can it be compiled so as not to)? Since he's got a working C compiler I pointed him at a program that somebody'd written to check endianness, but have had no response. Also he's not run FPC -i to check what the compiler thinks it is or run file on some of the systems's own binaries.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

SkyDiablo
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 51 lines
Sven Barth wrote: > You should also post how you compiled the compiler (e.g. your batch > file) so everyone knows what you did to reach your current state. ;) > > Regards, > Sven > > On 30.10.2012 21:54, SkyDiablo wrote: >> so wow ! >> >> my question have a little prehistory, but direct to the problem. i have >> compile a crosscompiler; >> >> windows -> Linux/MIPS >> >> all works fine with one exception. if i start my helloWorld binary >> on my >> destination target system, i get this message: >> >> FPU emulator disabled, make sure your toolchain was compiled with >> software floating point support (soft-float) >> >> someone can think: "oh, the toolchain is wrong", but no, with the same >> toolchain and with an c++ source, i can create a working binary with >> this compiler switch: "-msoft-float". >> >> so, how can i implement this "software floating point" behavoir in my >> FPC binary? But a couple of days ago I sent him a binary of a "do-nothing" program, and via mail he tells me that -----8<----- # chmod +x donothing # ./donothing -bash: ./donothing: cannot execute binary file # chmod +x test # ./test -bash: ./test: cannot execute binary file i think i have a big endian system... ----->8----- Would an empty program give this error if it were an FP issue (and for test purposes, can it be compiled so as not to)? Since he's got a working C compiler I pointed him at a program that somebody'd written to check endianness, but have had no response. Also he's not run FPC -i to check what the compiler thinks it is or run file on some of the systems's own binaries.

i have answerd your email, your binaries are for MIPSel, my system is a MIPS system, big endien. so thats invald binary.

greez & thx,
sky...

Reply by email

Mark Morgan Lloyd
to SkyDiablo
SkyDiablo wrote 25 lines
> But a couple of days ago I sent him a binary of a "do-nothing" > program, and via mail he tells me that > > -----8<----- > # chmod +x donothing > # ./donothing > -bash: ./donothing: cannot execute binary file > > # chmod +x test > # ./test > -bash: ./test: cannot execute binary file > > i think i have a big endian system... > ----->8----- > > Would an empty program give this error if it were an FP issue (and for > test purposes, can it be compiled so as not to)? Since he's got a > working C compiler I pointed him at a program that somebody'd written > to check endianness, but have had no response. Also he's not run FPC > -i to check what the compiler thinks it is or run file on some of > the systems's own binaries. > i have answerd your email, your binaries are for MIPSel, my system is a MIPS system, big endien. so thats invald binary.

You said you thought you might have, but you didn't confirm it: you didn't run the test program I pointed you at, or run the file command on e.g. your system's copy of ld. Also we don't know whether that toolchain you're using targets mipsel or mipseb. And the only thing you've said in this list is that you thought it was a floating point problem.

My Qemu/mipsel system is currently acting up; I've still not got a big-endian system running here, but would hope to have one in a few days. Could anybody comment on the preparedness of the MIPS port for tweak for mipseb: it looks to me as though it's mostly RTL stuff.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote
My Qemu/mipsel system is currently acting up; I've still not got a big-endian system running here, but would hope to have one in a few days. Could anybody comment on the preparedness of the MIPS port for tweak for mipseb: it looks to me as though it's mostly RTL stuff.

The compiler and RTL appear to build OK for MIPS (big-endian), giving me a cross compiler which describes itself as expected and a native compiler which looks OK "from the outside". I've made no attempt as yet to run the native compiler either on a "real system" or on a Qemu emulation.

http://wiki.lazarus.freepascal.org/Native_MIPS_Systems#Big-endian_subarchitecture

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email