Re: [fpc-devel] x86_64 Optimizer Overhaul

2018-12-16 Thread Ryan Joseph
> On Dec 16, 2018, at 10:57 PM, Marco van de Voort > wrote: > > I'm no expert, but afaik creating an object involves an exception frame, > which is afaik cheaper in Delphi with SEH, then FPC with setjmp. Even if there is no try..except block? I don’t use exceptions in FPC so shouldn’t this

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Nikolai Zhubr
16.12.2018 22:44, Florian Klämpfl: Well, problem is a little bit that arm is really a moving target. Yes, I know. Besides, the exact difference between the "arm-linux" target and "armv7-linux-gnueabi" target is afaics just nowhere explicitely documented.(Though, binutils is opensource, one

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Florian Klämpfl
Am 16.12.2018 um 20:47 schrieb Nikolai Zhubr: > Hi, > > Yes, "armv7-linux-gnueabi" did the trick for cross-compiling on windows as > well. I just had to manually rename binary > files of binutils so that thay match the naming pattern fpc build system > expacts. I can provide my ready-to-use >

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Florian Klämpfl
Am 16.12.2018 um 18:20 schrieb Nikolai Zhubr: > 16.12.2018 20:01, I wrote: >> Hi, >> >> 16.12.2018 17:10, I wrote: >>> I'm wondering what version of binutils was used to release fpc 3.0.4 for >>> arm? >> >> I've suddenly noticed that there is apparently no binary 3.0.4 release >> for arm! Well, at

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Nikolai Zhubr
Hi, Yes, "armv7-linux-gnueabi" did the trick for cross-compiling on windows as well. I just had to manually rename binary files of binutils so that thay match the naming pattern fpc build system expacts. I can provide my ready-to-use win32-to-arm binutils 2.31.1 zip if someone is interested.

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Nikolai Zhubr
Hi, It seems I've finally cracked this puzzle, somewhat. My self-built binutils were initially configured for "arm-linux" (That is, configure --target="arm-linux"). As soon as I changed this to "armv7-linux-gnueabi" (basically as a random guesswork) and rebuilt it all including the cross-fpc

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Yuriy Sydorov
On 12/16/2018 1:01 PM, Nikolai Zhubr wrote: And, I still see tons of "ARM BLX instruction ..." warnings from ld of this kind: C:\FPC\3.0.4\bin\i386-Win32\arm-linux-ld.exe: arm\units\arm-linux\rautils.o: warning: ARM BLX instruction targets ARM function

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread wkitty42
On 12/16/18 7:01 AM, Marco van de Voort wrote: Op 2018-12-15 om 22:27 schreef wkitt...@windstream.net: i'm guessing that VFP is Virtual Floating Point which i would understand as being emulated kinda like we used to do when a machine didn't have a math co-processor in it... >> No, VFP is

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Nikolai Zhubr
16.12.2018 20:01, I wrote: Hi, 16.12.2018 17:10, I wrote: I'm wondering what version of binutils was used to release fpc 3.0.4 for arm? I've suddenly noticed that there is apparently no binary 3.0.4 release for arm! Well, at least not officially presented on fpc website. The Not exactly

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Nikolai Zhubr
Hi, 16.12.2018 17:10, I wrote: I'm wondering what version of binutils was used to release fpc 3.0.4 for arm? I've suddenly noticed that there is apparently no binary 3.0.4 release for arm! Well, at least not officially presented on fpc website. The download link goes to 3.0.2 version

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Nikolai Zhubr
16.12.2018 18:13, Jonas Maebe: Which instructions does it show if you run the program in gdb and do "x/2i $pc-4" when it crashes? I made some additional steps in gdb in order to check if the program in question actually starts executing anything at all. Looks like it does: GNU gdb (GDB;

Re: [fpc-devel] x86_64 Optimizer Overhaul

2018-12-16 Thread Marco van de Voort
Op 2018-12-15 om 19:01 schreef Martok: memory manager in daily use. Doing that is a C++-ism that shouldn't exist in a sane environment ;-) I just tested something, and I'm a surprised by how big the difference is. This simple test is 1.5 times slower in FPC/trunk/win32 than Delphi 2007 and

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Jonas Maebe
On 16/12/18 15:59, Nikolai Zhubr wrote: 16.12.2018 17:03, Florian Klämpfl: [...] https://svn.freepascal.org/svn/fpcbuild/binaries/i386-win32/ ? They work for me with the command line you mentioned. However, we have to support newer ones, I'll look into this. With binutils from svn, the

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Nikolai Zhubr
16.12.2018 17:03, Florian Klämpfl: [...] https://svn.freepascal.org/svn/fpcbuild/binaries/i386-win32/ ? They work for me with the command line you mentioned. However, we have to support newer ones, I'll look into this. With binutils from svn, the cross-build itself succeeded for me out of

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Florian Klämpfl
Am 16.12.2018 um 15:18 schrieb Nikolai Zhubr: > Hi Florian, > > 16.12.2018 16:41, Florian Klämpfl: >> I followed the thread, but didn't find it: what binutils do you use? > > I've tried 3 version so far: > > * binutils-2.15.94 (prebuilt) from fpc website is unusable because assembler > refuses

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Nikolai Zhubr
Hi Florian, 16.12.2018 16:41, Florian Klämpfl: I followed the thread, but didn't find it: what binutils do you use? I've tried 3 version so far: * binutils-2.15.94 (prebuilt) from fpc website is unusable because assembler refuses some instructions (I've mentioned it earlier) *

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Nikolai Zhubr
Hi all, (Sorry for flooding so much, but I've done some more testing!) In order to isolate any possible wierd windows-specific issues, I've redone everything on x86_64-linux as a host, with the same 3.0.4 version starting compiler, same fpcbuild-3.0.4.zip as a source for cross-build, same

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Florian Klämpfl
Am 16.12.2018 um 12:01 schrieb Nikolai Zhubr: > Hi, > > 16.12.2018 13:51, I wrote: > [...] >> So inserting >> ASTARGET+=-mfpu=softvfp >> allowed full cross-build to succeed. I have yet to see if the generated >> binaries are actually usable. > > Ok, now the resulting elf executable has this

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Marco van de Voort
Op 2018-12-15 om 22:27 schreef wkitt...@windstream.net: i'm guessing that VFP is Virtual Floating Point which i would understand as being emulated kinda like we used to do when a machine didn't have a math co-processor in it... No, VFP is hard float support. The "V" stands for Vector not

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Nikolai Zhubr
Hi, 16.12.2018 13:51, I wrote: [...] So inserting ASTARGET+=-mfpu=softvfp allowed full cross-build to succeed. I have yet to see if the generated binaries are actually usable. Ok, now the resulting elf executable has this (supposedly correct) flag: private flags = 600: [APCS-32] [VFP float

Re: [fpc-devel] Building cross-compiler for arm-linux on win32

2018-12-16 Thread Nikolai Zhubr
Hi all, 16.12.2018 3:44, I wrote: [...] Got it, somewhat: -mfpu=softvfp is passed to arm-linux-as while compiling intermediate .s files (when using -Cfsoft), not sure if it is correct and intentional, and no special flags passed to arm-linux-as while compiling assembler sources. Hence the