Re: [fpc-devel] fpc 2.6.2 gives AV on arm

2013-08-23 Thread Joost van der Sluis

On 08/15/2013 12:16 PM, Mattias Gaertner wrote:

On Thu, 15 Aug 2013 11:45:38 +0200
Jonas Maebe  wrote:



On 15 Aug 2013, at 11:26, Mattias Gaertner wrote:


On Fri, 09 Aug 2013 23:10:05 +0200
Florian Klämpfl  wrote:



Where did you get the CROSSOPT=-dFPC_ARMEL from? It is not needed at all.


It's on the wiki:
http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Building_the_compiler_yourself_in_Linux


It only mentions OPT=-dFPC_ARMEL, not CROSSOPT=-dFPC_ARMEL.


You are right. I misread the mails and misunderstood Joost
statement. Sorry.


I think I got confused and mixed the two. Probably because of some other 
things I've tried with other CROSSOPT options.


Joost.


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fpc 2.6.2 gives AV on arm

2013-08-15 Thread Mattias Gaertner
On Thu, 15 Aug 2013 11:45:38 +0200
Jonas Maebe  wrote:

> 
> On 15 Aug 2013, at 11:26, Mattias Gaertner wrote:
> 
> > On Fri, 09 Aug 2013 23:10:05 +0200
> > Florian Klämpfl  wrote:
> > 
> >> 
> >> Where did you get the CROSSOPT=-dFPC_ARMEL from? It is not needed at all.
> > 
> > It's on the wiki:
> > http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Building_the_compiler_yourself_in_Linux
> 
> It only mentions OPT=-dFPC_ARMEL, not CROSSOPT=-dFPC_ARMEL.

You are right. I misread the mails and misunderstood Joost
statement. Sorry.

Mattias
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fpc 2.6.2 gives AV on arm

2013-08-15 Thread Jonas Maebe

On 15 Aug 2013, at 11:26, Mattias Gaertner wrote:

> On Fri, 09 Aug 2013 23:10:05 +0200
> Florian Klämpfl  wrote:
> 
>> 
>> Where did you get the CROSSOPT=-dFPC_ARMEL from? It is not needed at all.
> 
> It's on the wiki:
> http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Building_the_compiler_yourself_in_Linux

It only mentions OPT=-dFPC_ARMEL, not CROSSOPT=-dFPC_ARMEL.


Jonas___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fpc 2.6.2 gives AV on arm

2013-08-15 Thread Mattias Gaertner
On Fri, 09 Aug 2013 23:10:05 +0200
Florian Klämpfl  wrote:

>[...]
> > Which is the revision to switch to armel by default.
> > 
> > I had to add OPT=-dFPC_ARMEL, CROSSOPT=-dFPC_ARMEL alone was not enough.
> 
> Where did you get the CROSSOPT=-dFPC_ARMEL from? It is not needed at all.

It's on the wiki:
http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Building_the_compiler_yourself_in_Linux

Mattias
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fpc 2.6.2 gives AV on arm

2013-08-10 Thread peter green

Joost van der Sluis wrote:

On 08/09/2013 07:07 PM, Jonas Maebe wrote:


On 09 Aug 2013, at 18:46, Joost van der Sluis wrote:

Thing is that I'm trying to get fpc 2.6.2 working on the new 
arm-target of Fedora (armv7, hardware float, little endian).


The EABI with hardfloat is not supported at all in 2.6.2.


That's good to know. But in that case it should still work with 
soft-float, no?
Things will break if you try and link with C libraries but building the 
compiler itself with softfloat options should work. If you want patches 
for hardfloat with 2.6.2 you can find them at 
https://code.google.com/p/bollin/source/browse/#svn%2Ffpc%2Ftrunk%2Fdebian%2Fpatches 
the hardfloat releated patches are armhf.diff armhf-linker-path.diff 
armhf-build-with-2.6.0.diff (only needed if bootstrapping with 2.6.0) 
and regenerate_messages.diff


Once the patches are applied use -dFPC_ARMHF instead of -dFPC_ARMEL to 
get a hardlfoat build.


What linker are you using? the gnu gold linker is known to break 
freepascal.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fpc 2.6.2 gives AV on arm

2013-08-09 Thread Florian Klämpfl
Am 09.08.2013 22:54, schrieb Joost van der Sluis:
> On 08/09/2013 06:46 PM, Joost van der Sluis wrote:
>> Hi all,
>>
>> I've cross-compiled a ppcarm, and now I try to use that compiler on qemu
>> to build fpc (2.6.2).
>>
>> But the compiler crashes on compiling the system-unit. But with trunk
>> (2.7.1) this all works.
>>
>> Thing is that I'm trying to get fpc 2.6.2 working on the new arm-target
>> of Fedora (armv7, hardware float, little endian). Maybe someone knows in
>> which revision this could have been fixed, so that I can apply that fix
>> to 2.6.2 on Fedora?
> 
> Hard to do a bisect when you have to cross-compile and copy the binary
> to another machine each time... but it was r19562.
> 
> Which is the revision to switch to armel by default.
> 
> I had to add OPT=-dFPC_ARMEL, CROSSOPT=-dFPC_ARMEL alone was not enough.

Where did you get the CROSSOPT=-dFPC_ARMEL from? It is not needed at all.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fpc 2.6.2 gives AV on arm

2013-08-09 Thread Joost van der Sluis

On 08/09/2013 06:46 PM, Joost van der Sluis wrote:

Hi all,

I've cross-compiled a ppcarm, and now I try to use that compiler on qemu
to build fpc (2.6.2).

But the compiler crashes on compiling the system-unit. But with trunk
(2.7.1) this all works.

Thing is that I'm trying to get fpc 2.6.2 working on the new arm-target
of Fedora (armv7, hardware float, little endian). Maybe someone knows in
which revision this could have been fixed, so that I can apply that fix
to 2.6.2 on Fedora?


Hard to do a bisect when you have to cross-compile and copy the binary 
to another machine each time... but it was r19562.


Which is the revision to switch to armel by default.

I had to add OPT=-dFPC_ARMEL, CROSSOPT=-dFPC_ARMEL alone was not enough.

Joost.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fpc 2.6.2 gives AV on arm

2013-08-09 Thread Michel Catudal
Le 2013-08-09 13:07, Jonas Maebe a écrit :
> On 09 Aug 2013, at 18:46, Joost van der Sluis wrote:
>
>> Thing is that I'm trying to get fpc 2.6.2 working on the new arm-target of 
>> Fedora (armv7, hardware float, little endian).
> The EABI with hardfloat is not supported at all in 2.6.2.
>
>
> Jonas___
> fpc-devel maillist  -  fpc-devel@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
This is not true, with the proper patches it works beautifully.
Check catudodroid on sourceforge. If anyone is interested I can create one for 
Fedora on odroid. I have working fpc on both funtoo and ubuntu.

Michel

-- 
For Linux Software visit
http://home.comcast.net/~mcatudal

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fpc 2.6.2 gives AV on arm

2013-08-09 Thread Joost van der Sluis

On 08/09/2013 07:07 PM, Jonas Maebe wrote:


On 09 Aug 2013, at 18:46, Joost van der Sluis wrote:


Thing is that I'm trying to get fpc 2.6.2 working on the new arm-target of 
Fedora (armv7, hardware float, little endian).


The EABI with hardfloat is not supported at all in 2.6.2.


That's good to know. But in that case it should still work with 
soft-float, no?


If I explicitly add -Cfsoft it gives the exact same result. This is what 
I use to build the compiler:


make clean all CPU_TARGET=arm BINUTILSPREFIX=arm-linux-gnu- 
CROSSOPT="-O- -CaEABI -gl -dFPC_ARMEL -Cfsoft"


I did not add armv7, because if I do that, the ppcarm executable crashes 
immediately after startup.


Joost.



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fpc 2.6.2 gives AV on arm

2013-08-09 Thread Jonas Maebe

On 09 Aug 2013, at 18:46, Joost van der Sluis wrote:

> Thing is that I'm trying to get fpc 2.6.2 working on the new arm-target of 
> Fedora (armv7, hardware float, little endian).

The EABI with hardfloat is not supported at all in 2.6.2.


Jonas___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] fpc 2.6.2 gives AV on arm

2013-08-09 Thread Joost van der Sluis

Hi all,

I've cross-compiled a ppcarm, and now I try to use that compiler on qemu 
to build fpc (2.6.2).


But the compiler crashes on compiling the system-unit. But with trunk 
(2.7.1) this all works.


Thing is that I'm trying to get fpc 2.6.2 working on the new arm-target 
of Fedora (armv7, hardware float, little endian). Maybe someone knows in 
which revision this could have been fixed, so that I can apply that fix 
to 2.6.2 on Fedora?


Here's the stacktrace:

/home/joost/ppcarm -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix 
-Fiarm -FE. 
-FU/home/joost/rpmbuild/BUILD/fpcbuild-2.6.2/fpcsrc/rtl/units/arm-linux 
-k"--build-id" -gl -darm -dRELEASE -Us -Sg system.pp -dFPC_ARMEL

Fatal: Compilation aborted
An unhandled exception occurred at $0003CDD0 :
EAccessViolation : Access violation
  $0003CDD0  FINDGETFILEINFO,  line 711 of ../unix/sysutils.pp
  $0003D118  FINDNEXT,  line 774 of ../unix/sysutils.pp
  $0003D350  FINDFIRST,  line 816 of ../unix/sysutils.pp
  $0004B970  TCACHEDDIRECTORY__RELOAD,  line 266 of cfileutl.pas
  $0004B678  TCACHEDDIRECTORY__FORCEUSECACHE,  line 223 of cfileutl.pas
  $0004B624  TCACHEDDIRECTORY__TRYUSECACHE,  line 212 of cfileutl.pas
  $0004BE94  TCACHEDDIRECTORY__DIRECTORYEXISTS,  line 346 of cfileutl.pas
  $0004C464  TDIRECTORYCACHE__DIRECTORYEXISTS,  line 422 of cfileutl.pas
  $0004CF90  PATHEXISTS,  line 676 of cfileutl.pas
  $0004E6BC  TSEARCHPATHLIST__ADDPATH,  line 1120 of cfileutl.pas
  $0004DFC8  TSEARCHPATHLIST__ADDPATH,  line 975 of cfileutl.pas
  $000E0AB8  TOPTION__INTERPRET_OPTION,  line 1058 of options.pas
  $000E53C0  TOPTION__READ_PARAMETERS,  line 2280 of options.pas
  $000E6ACC  READ_ARGUMENTS,  line 2808 of options.pas
  $0002CE74  INITCOMPILER,  line 187 of compiler.pas
  $0002CF68  COMPILE,  line 234 of compiler.pas
  $8360  main,  line 223 of pp.pas
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel