Re: [fpc-devel] Help on building crosscompiler with fpc 2.3.1
On Fri, 2008-09-26 at 19:09 +0200, Lukas Gradl wrote: > Marco van de Voort schrieb: > > In our previous episode, Lukas Gradl said: > >> At the moment, I'm developing on a i386 Linux machine. For some servers > >> I need x86_64 binaries, so I have a second machine with x86_64 linux I > >> use just for compiling. > >> > >> It would be great to compile everything on one machine, so I tried to > >> build a crosscompiler for x86_64 on my i386 machine. The Wikipage on > >> http://wiki.lazarus.freepascal.org/Cross_compiling doesn't work anymore > >> - make is complaining about a missing ppcrossx86_64 almost immediatly. > > > > Please be more detailed. What command do you run in which directory, with > > what version as starting compiler? > > I have (for simplifying I use X86_64 to compile i386 as described in the > wiki): > fpc 2.3.1 built from svn running on a Kubuntu X86_64 machine > (Source got via svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc) > > I want: > compiling i386 binaries on that machine > > I did (according to http://wiki.lazarus.freepascal.org/Cross_compiling): > > created i386-linux-ld and i386-linux-as as described in the Wiki > > cd /path-to-fpc-source-root/ > > make all CPU_TARGET=i386 > > I get: > Makefile:129: *** Compiler ppcross386 not found. > > What I could not find was, how to create that ppcross386. I remember it > worked with a previous 2.2.0 install, but since I switched to 2.3.1 I > couldn't get it to work. > > regards > Lukas > For arm I needed to add FPC=fpc at end of command. make all CPU_TARGET=i386 FPC=[path to fpc executable] (if not in path). Seems it looks for the crosscompiler to exist first? because if it does you dont need this - but it will make a new one. go figure. Terry ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] Makefile deletion script
Hi Because I cross-compile svn for arm a lot I end up with Makefiles with revision numbers and littered with Mine through them from fpcmake -r -Tall etc. It takes time to manually delete each offending one and restore from svn so I have a script (attached) I have made it so that you can pass any file name as argument and it will recursively delete it without touching the .svn folders There is also a test (display) version if your scared of it ;) ./disp_files.sh Makefile - shows what it will delete, ./rm_files Makefile - will blitz them, svn up gets the correct ones back again Could this be useful in utils or tools? Terry disp_files.sh Description: application/shellscript rm_files.sh Description: application/shellscript ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Makefile deletion script
On Tue, 2008-09-30 at 22:54 +0200, Jonas Maebe wrote: > You can use "svn revert -R ." to restore all files in the current > directory and below to their checked out svn version (without having > to delete them first). This even does not require network access. > > > Jonas Thats cool. Do you know how long it took me to work out the bash script ;( One thing tho - "svn revert -R ." will nail any of my modified files that I want to keep different to trunk. Can you tell it to just revert Makefile? Terry ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] help with softfloat for arm big endian crosscompiler
Hi, questions... Is -CfSOFT supported on arm 2.0.5? Do I need to add/define something when I build the crosscompiler to get softfloat support? Is changing system_arm_linux_info.endian to endian_big in fpc/compiler/systems/i_linux.pas enough? I see in references to {$if defined(CPUARM) and defined(FPUFPA)} and {$ifdef FPC_LITTLE_ENDIAN} but no FPUSOFT or FPC_BIG_ENDIAN. I have successfully made a crosscompiler for big endian arm and it (ppcarm) compiles without problems and the resultant elf executes on the arm. But if I use any floating point it crashes out with... $ ppcarm -XParm-linux- -Xs -XX -CpARMV5 -CfSOFT -n -B -vewhli \ -Fu~/arm-linux-fpc.i386-linux/lib/fpc/2.0.5/units/arm-linux/rtl \ floattest Target OS: Linux for ARM Compiling floattest.pp 2 67/864 Kb Used floattest.pp(8,9) Fatal: Internal error 200308252 floattest.pp(8,9) Fatal: Compilation aborted This is with... program floattest; Var a, b, c: single; begin a := 1.5; b := 2.5; c := a * b; writeln(c); end. $ ppcarm -i Free Pascal Compiler version 2.0.5 Compiler Date : 2006/10/24 Compiler CPU Target: arm Supported targets: Linux for ARM Supported CPU instruction sets: ARMV3 ARMV4 ARMV5 Supported FPU instruction sets: SOFT LIBGCC FPA FPA10 FPA11 VFP Thanks for any help here. Terry ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] Re: help with softfloat for arm big endian crosscompiler
Digest mode... forgive the de-threading. I am using a Linksys NSLU2. The NSLU2 is based on an Intel XScale IXP420 processor, clocked at 266MHz.The device has 32MB of SDRAM, 8MB of NOR Flash, built-in 10/100 (not yet supported in litte-endian mode), and dual USB 2.0 ports. The Linksys firmware, bootloader, kernel, proprietary ethernet drivers are big endian. There is a debian LE OS but I will lose the ethernet port. I will try with fpc 2.1.x - but I have had no problems to date with the 2.0.4 or 2.0.5 armeb fpc other than the current issue with floating point. I am at 2440 lines of code - with the application talking to remote I/O and VFD screen via USB serial for machine control. If I compile with {E+} the code compiles but running it on the NSLU2 it just sits there. Running under qemu-armeb works either way. I am thinking that maybe I need to compile ppcarm with the gcc from the Optware crosstool toolchain... $ls ~/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin armv5b-softfloat-linux-addr2line armv5b-softfloat-linux-cpp armv5b-softfloat-linux-gcov armv5b-softfloat-linux-ranlib fix-embedded-paths armv5b-softfloat-linux-ar armv5b-softfloat-linux-g++ armv5b-softfloat-linux-ld armv5b-softfloat-linux-readelf armv5b-softfloat-linux-as armv5b-softfloat-linux-gcc armv5b-softfloat-linux-nm armv5b-softfloat-linux-size armv5b-softfloat-linux-c++armv5b-softfloat-linux-gcc-3.3.5 armv5b-softfloat-linux-objcopy armv5b-softfloat-linux-strings armv5b-softfloat-linux-c++filtarmv5b-softfloat-linux-gccbug armv5b-softfloat-linux-objdump armv5b-softfloat-linux-strip How would I do this if this is indeed my problem? ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] fpc armeb nslu2 got a bit further with float probs on 2.0.5
I have flashed the slug to SlugOS (still big endian) and got gdb on it. It appears that the issue is not so much the fpu or floating point but with the FloatStr, StrToFloat etc conversions which seem to get stuck in system.str. I have tried to chase the system.str function but got lost in the {$i } includes and header files :( Any hints on how to debug this further? Terry here is the session... [EMAIL PROTECTED]:/home/m50# gdb ./floattst dlopen failed on 'libthread_db.so.1' - libthread_db.so.1: cannot open shared object file: No such file or directory GDB will not be able to debug pthreads. GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "armeb-linux"... (gdb) start Breakpoint 1 at 0x813c: file floattst.pp, line 16. Starting program: /home/m50/floattst main () at floattst.pp:16 16 b := 2.7; (gdb) display a 1: A = 1.5 (gdb) display b 2: B = 0 (gdb) display c 3: C = 0 (gdb) display d 4: D = 0 (gdb) display s 5: S = (ANSISTRING) 0x0 (gdb) n 17 c := a * b; 5: S = (ANSISTRING) 0x0 4: D = 0 3: C = 0 2: B = 2.7005 1: A = 1.5 (gdb) n 18 Str(Single(c):0:3, s); 5: S = (ANSISTRING) 0x0 4: D = 0 3: C = 4.0519 2: B = 2.7005 1: A = 1.5 (gdb) n * it goes full CPU usage here and hangs Program received signal SIGINT, Interrupt. 0xedac in SYSTEM_STR_REAL$LONGINT$LONGINT$DOUBLE$TREAL_TYPE $OPENSTRING () 5: S = (ANSISTRING) 0x0 4: D = 0 3: C = 4.0519 2: B = 2.7005 1: A = 1.5 (gdb) n Single stepping until exit from function SYSTEM_STR_REAL$LONGINT$LONGINT $DOUBLE$TREAL_TYPE$OPENSTRING, which has no line number information. n Program received signal SIGINT, Interrupt. 0xede0 in SYSTEM_STR_REAL$LONGINT$LONGINT$DOUBLE$TREAL_TYPE $OPENSTRING () 5: S = (ANSISTRING) 0x0 4: D = 0 3: C = 4.0519 2: B = 2.7005 1: A = 1.5 (gdb) k Kill the program being debugged? (y or n) y (gdb) q ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] fpc 2.1.1 armeb nslu2
FYI Can't get any program to run with this version. programs segfault instantly... Anyone know of a revision that works with arm? (I think I have 5590 but I dont know how to check) Free Pascal Compiler version 2.1.1 Compiler Date : 2006/12/14 Compiler CPU Target: arm gdb session... [EMAIL PROTECTED]:/home/m50# gdb ./floattst This GDB was configured as "armeb-linux"... (gdb) start Breakpoint 1 at 0x812c: file floattst.pp, line 15. Starting program: /home/m50/floattst Program received signal SIGSEGV, Segmentation fault. 0x0001cc34 in fpc_ansistr_incr_ref () (gdb) n Single stepping until exit from function fpc_ansistr_incr_ref, which has no line number information. Program exited normally. (gdb) ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel