[fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Bernd Mueller

Hello,

can anyone please tell me, how to compile the RTL for ARM-Linux since 
revision 8006?


I tried to verify the bug fix 8967 (thank you Yury Sidorov) on my 
system, but I am not able to compile the RTL anymore.
Adding the -Sg switch seems to be required to compile softfpu, but I get 
now:


PPU Loading ..\..\rtl\units\arm-linux\dos.ppu
Trying to use a unit which was compiled with a different FPU mode
objects.pp(734,9) Fatal: Can't find unit dos used by Objects
Fatal: Compilation aborted

I would like to compile with softfloat disabled.

So far, I used following make call:

make CPU_TAGET=arm OS_TARGET=linux PP=ppcrossarm OPT=-Tlinux -CX -Sg

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


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Yury Sidorov

From: Bernd Mueller [EMAIL PROTECTED]

Hello,

can anyone please tell me, how to compile the RTL for ARM-Linux 
since revision 8006?


I tried to verify the bug fix 8967 (thank you Yury Sidorov) on my 
system, but I am not able to compile the RTL anymore.
Adding the -Sg switch seems to be required to compile softfpu, but I 
get now:


PPU Loading ..\..\rtl\units\arm-linux\dos.ppu
Trying to use a unit which was compiled with a different FPU mode
objects.pp(734,9) Fatal: Can't find unit dos used by Objects
Fatal: Compilation aborted

I would like to compile with softfloat disabled.

So far, I used following make call:

make CPU_TAGET=arm OS_TARGET=linux PP=ppcrossarm 
OPT=-Tlinux -CX -Sg


Try to force hardware FPU mode by using -CfFPA switch.

Yury. 
___

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


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Bernd Mueller

Yury Sidorov wrote:

From: Bernd Mueller [EMAIL PROTECTED]

Hello,

can anyone please tell me, how to compile the RTL for ARM-Linux since 
revision 8006?


I tried to verify the bug fix 8967 (thank you Yury Sidorov) on my 
system, but I am not able to compile the RTL anymore.
Adding the -Sg switch seems to be required to compile softfpu, but I 
get now:


PPU Loading ..\..\rtl\units\arm-linux\dos.ppu
Trying to use a unit which was compiled with a different FPU mode
objects.pp(734,9) Fatal: Can't find unit dos used by Objects
Fatal: Compilation aborted

I would like to compile with softfloat disabled.

So far, I used following make call:

make CPU_TAGET=arm OS_TARGET=linux PP=ppcrossarm OPT=-Tlinux -CX -Sg


Try to force hardware FPU mode by using -CfFPA switch.


no, it does not help. I get exactly the same error. Perhaps something 
changed in the build process for the cross compiler? I still use FPC 
2.0.4 as starting compiler to build the cross compiler.


I am building the cross compiler with following make call:
make clean
make PPC_TARGET=arm

Regards, Bernd.

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


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Marco van de Voort
  So far, I used following make call:
 
  make CPU_TAGET=arm OS_TARGET=linux PP=ppcrossarm OPT=-Tlinux -CX -Sg
  
  Try to force hardware FPU mode by using -CfFPA switch.
 
 no, it does not help. I get exactly the same error. Perhaps something 
 changed in the build process for the cross compiler? I still use FPC 
 2.0.4 as starting compiler to build the cross compiler.
 
 I am building the cross compiler with following make call:
 make clean
 make PPC_TARGET=arm

Did you also recompile the RTL with soft support?
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Bernd Mueller

Marco van de Voort wrote:

So far, I used following make call:

make CPU_TAGET=arm OS_TARGET=linux PP=ppcrossarm OPT=-Tlinux -CX -Sg

Try to force hardware FPU mode by using -CfFPA switch.
no, it does not help. I get exactly the same error. Perhaps something 
changed in the build process for the cross compiler? I still use FPC 
2.0.4 as starting compiler to build the cross compiler.


I am building the cross compiler with following make call:
make clean
make PPC_TARGET=arm


Did you also recompile the RTL with soft support?


this compiles without errors. But I would like to get a hardfloat 
enabled RTL again.


Thank you for your help.

Regards, Bernd.


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


Re: [fpc-devel] Comparison FPC 2.2 - Delphi 7

2007-07-10 Thread Martin Schreiber
On Thursday 05 July 2007 10.18, Jonas Maebe wrote:
 On 05 Jul 2007, at 10:15, Florian Klaempfl wrote:
  For build related crashes it is accepted if it can be reproduced by a
  few simple steps like get this source, compile with that command,
  touch
  that file, rebuild.

 Indeed. At least Peter and I have already fixed quite a few MSEIde-
 related build crashes which were reported this way iirc.

I erred, sorry. Since I deleted all *.ppu files in the FPC and MSEgui source 
trees the FPC 2.2 compiler crashes without -B vanished.
Good work, thanks.  :-)

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


[fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Martin Schreiber
Hi,
Every program compiled with fixes_2_2 rev. 8006 crashes
in gdb:

GNU gdb 6.6
Copyright (C) 2006 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 i686-pc-mingw32...
(gdb) run
Starting program: G:\testcase\mse\console/console.exe
Loaded symbols for C:\WINNT\system32\KERNEL32.DLL
Loaded symbols for C:\WINNT\system32\OLEAUT32.DLL
Loaded symbols for C:\WINNT\system32\OLE32.DLL
Loaded symbols for C:\WINNT\system32\rpcrt4.dll
Loaded symbols for C:\WINNT\system32\ADVAPI32.DLL
Loaded symbols for C:\WINNT\system32\GDI32.DLL
Loaded symbols for C:\WINNT\system32\USER32.DLL

Program received signal SIGILL, Illegal instruction.
0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
(gdb) bt
#0  0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
#1  0x0040a504 in SYSTEM_init ()
#2  0x00406114 in fpc_initializeunits ()
#3  0x7ffdf000 in ?? ()
#4  0x in ?? ()
(gdb)

The programs work without gdb.
System: win2000, PII.
The problem seems not to exist on another PC with win2000 and an AMD Athlon.
Any hints?

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread vsnijders


- Original Message -
From: Martin Schreiber [EMAIL PROTECTED]
Date: Tuesday, July 10, 2007 2:38 pm
Subject: [fpc-devel] win32 debugging broken in fixes_2_2?

 Hi,
 Every program compiled with fixes_2_2 rev. 8006 crashes
 in gdb:
 
 GNU gdb 6.6
 Copyright (C) 2006 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 i686-pc-mingw32...
 (gdb) run
 Starting program: G:\testcase\mse\console/console.exe
 Loaded symbols for C:\WINNT\system32\KERNEL32.DLL
 Loaded symbols for C:\WINNT\system32\OLEAUT32.DLL
 Loaded symbols for C:\WINNT\system32\OLE32.DLL
 Loaded symbols for C:\WINNT\system32\rpcrt4.dll
 Loaded symbols for C:\WINNT\system32\ADVAPI32.DLL
 Loaded symbols for C:\WINNT\system32\GDI32.DLL
 Loaded symbols for C:\WINNT\system32\USER32.DLL
 
 Program received signal SIGILL, Illegal instruction.
 0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
 (gdb) bt
 #0  0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
 #1  0x0040a504 in SYSTEM_init ()
 #2  0x00406114 in fpc_initializeunits ()
 #3  0x7ffdf000 in ?? ()
 #4  0x in ?? ()
 (gdb)
 
 The programs work without gdb.
 System: win2000, PII.
 The problem seems not to exist on another PC with win2000 and an 
 AMD Athlon.
 Any hints?

It has to to with SSE2 detection. AFAIK the only reliable way to detect it, is 
execute a SSE2 instruction and capture the exection which it causes if it is 
not supported.

I don't know, how it can be circumvented (except for using a newer processor).

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Jonas Maebe


On 10 Jul 2007, at 14:38, Martin Schreiber wrote:


Every program compiled with fixes_2_2 rev. 8006 crashes
in gdb:
Program received signal SIGILL, Illegal instruction.
0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
(gdb) bt
#0  0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
#1  0x0040a504 in SYSTEM_init ()
#2  0x00406114 in fpc_initializeunits ()
#3  0x7ffdf000 in ?? ()
#4  0x in ?? ()
(gdb)

The programs work without gdb.
System: win2000, PII.
The problem seems not to exist on another PC with win2000 and an  
AMD Athlon.

Any hints?


The rtl checks on startup whether or not your cpu supports SSE. It  
does so by executing an SSE instruction, catching the illegal  
instruction exception if it occurs and if so, setting a boolean to  
false.


So just type continue in gdb to continue the program.


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


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Yury Sidorov

From: Bernd Mueller [EMAIL PROTECTED]

Marco van de Voort wrote:

So far, I used following make call:

make CPU_TAGET=arm OS_TARGET=linux PP=ppcrossarm 
OPT=-Tlinux -CX -Sg

Try to force hardware FPU mode by using -CfFPA switch.
no, it does not help. I get exactly the same error. Perhaps 
something changed in the build process for the cross compiler? I 
still use FPC 2.0.4 as starting compiler to build the cross 
compiler.


I am building the cross compiler with following make call:
make clean
make PPC_TARGET=arm


Did you also recompile the RTL with soft support?


this compiles without errors. But I would like to get a hardfloat 
enabled RTL again.


What host OS do you use?

Yury. 
___

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Yury Sidorov

From: Martin Schreiber [EMAIL PROTECTED]

Hi,
Every program compiled with fixes_2_2 rev. 8006 crashes
in gdb:

GNU gdb 6.6
Copyright (C) 2006 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 i686-pc-mingw32...
(gdb) run
Starting program: G:\testcase\mse\console/console.exe
Loaded symbols for C:\WINNT\system32\KERNEL32.DLL
Loaded symbols for C:\WINNT\system32\OLEAUT32.DLL
Loaded symbols for C:\WINNT\system32\OLE32.DLL
Loaded symbols for C:\WINNT\system32\rpcrt4.dll
Loaded symbols for C:\WINNT\system32\ADVAPI32.DLL
Loaded symbols for C:\WINNT\system32\GDI32.DLL
Loaded symbols for C:\WINNT\system32\USER32.DLL

Program received signal SIGILL, Illegal instruction.
0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
(gdb) bt
#0  0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
#1  0x0040a504 in SYSTEM_init ()
#2  0x00406114 in fpc_initializeunits ()
#3  0x7ffdf000 in ?? ()
#4  0x in ?? ()
(gdb)

The programs work without gdb.
System: win2000, PII.
The problem seems not to exist on another PC with win2000 and an AMD 
Athlon.

Any hints?


If CPU have no SSE support an exception occurs, but it handled 
properly by program. If running under gdb, it catches this exception.


Maybe other way to detect SSE support exists...

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


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Bernd Mueller


this compiles without errors. But I would like to get a hardfloat 
enabled RTL again.


What host OS do you use?

I am using Windows 98SE for cross compiling.

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Vinzent Hoefler
On Tuesday 10 July 2007 12:40, Yury Sidorov wrote:

 Maybe other way to detect SSE support exists...

CPUID?


Vinzent.

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


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Yury Sidorov

From: Bernd Mueller [EMAIL PROTECTED]


this compiles without errors. But I would like to get a hardfloat 
enabled RTL again.


What host OS do you use?

I am using Windows 98SE for cross compiling.


Where arm-linux cross binutils for win32 can be downloaded?

Yury. 
___

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Vinzent Hoefler
On Tuesday 10 July 2007 09:58, Vinzent Hoefler wrote:
 On Tuesday 10 July 2007 12:40, Yury Sidorov wrote:
  Maybe other way to detect SSE support exists...

 CPUID?

To be more precise, the way recommended by Intel:

To make this check, execute the CPUID instruction with an argument of 1 
in the EAX register, and check that bit 25 (SSE) and/or bit 26 (SSE2) 
are set to 1.

  -- IA32 Software Developer's Manual,
 Volume 3: System Programming Guide

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


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Bernd Mueller

Yury Sidorov wrote:

From: Bernd Mueller [EMAIL PROTECTED]


this compiles without errors. But I would like to get a hardfloat 
enabled RTL again.


What host OS do you use?

I am using Windows 98SE for cross compiling.


Where arm-linux cross binutils for win32 can be downloaded?
I lost the source ;-( but I am going to seek for the download location 
again.


Shall I upload/mail (2.5 MB zipped) the binutils somewhere?

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Martin Schreiber
On Tuesday 10 July 2007 14.53, [EMAIL PROTECTED] wrote:
  And what should I do in MSEide? Disable SIGILL reporting by gdb?
  How does Lazarus handle the problem?

 It does not handle it. If you handle it in MSEIDE, please let us know how
 you did it.

The IDE must check where the SIGILL is created, prevent error reporting and 
restart the program if the SIGILL is raised in the FPC SSE checking code...

Question to the FPC developers:
Is there really no other method to check for SSE support?

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Jonas Maebe


On 10 Jul 2007, at 15:11, Martin Schreiber wrote:


Question to the FPC developers:
Is there really no other method to check for SSE support?


According to the comments of Florian in the code, there is no other  
way which works everywhere.



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


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Yury Sidorov

From: Bernd Mueller [EMAIL PROTECTED]

Yury Sidorov wrote:

From: Bernd Mueller [EMAIL PROTECTED]


this compiles without errors. But I would like to get a 
hardfloat enabled RTL again.


What host OS do you use?

I am using Windows 98SE for cross compiling.


Where arm-linux cross binutils for win32 can be downloaded?
I lost the source ;-( but I am going to seek for the download 
location again.


Shall I upload/mail (2.5 MB zipped) the binutils somewhere?


I compiled binutils myself and yes, the problem is present.
It does not happen when doing make cycle on real arm-linux box.
I will fix this issue.

Yury. 
___

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Martin Schreiber
On Tuesday 10 July 2007 15.13, Jonas Maebe wrote:
 On 10 Jul 2007, at 15:11, Martin Schreiber wrote:
  Question to the FPC developers:
  Is there really no other method to check for SSE support?

 According to the comments of Florian in the code, there is no other
 way which works everywhere.

Are there other places where SIGILL for checking purposes could be raised out 
of SYSTEM_FPC_CPUCODEINIT?
Are there other possible signals which must be handled by the IDE?

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


[fpc-devel] Re: win32 debugging broken in fixes_2_2?

2007-07-10 Thread David Fuchs
Here's a partial work-around:  First, check if CPUID says there's SSE hardware 
support.  If and only if it says yes, then check for OS support by executing 
an SSE instruction.  This will fix support for systems that don't have SSE 
support in hardware; and it also works for systems with full SSE support.  It 
only leaves problems for systems with SSE hardware support but no OS support 
and a faulty GDB.  That should be a relative minority.
   
  -David Fuchs

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