Sign in Join

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

Mailing lists / lazarus / 2012-06

Cross compile

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Antonio Fortuny

Hi all.

I've just installed onto a W7-win32 Lazarus 1.1 from daily snapshots. After installation I downloaded
Lazarus-1.1-37612-fpc-2.6.1-20120611-cross-arm-wince-win32.exe and ran it. in .\fpc\2.61.1\bin\i386-win32\ I find:
06/11/2012 05:15 AM 387,086 arm-wince-ar.exe 06/11/2012 05:16 AM 775,182 arm-wince-as.exe 06/11/2012 05:16 AM 421,390 arm-wince-dlltool.exe 06/11/2012 05:16 AM 2,099,712 arm-wince-gdb.exe 06/11/2012 05:16 AM 621,582 arm-wince-ld.exe 06/11/2012 05:16 AM 662,542 arm-wince-objdump.exe 06/11/2012 05:16 AM 11,264 arm-wince-pe-stub.exe 06/11/2012 05:16 AM 518,158 arm-wince-strip.exe 06/11/2012 05:16 AM 469,518 arm-wince-windres.exe plus a ppccrossarm.exe
and a new folder in C:\lazarus\fpc\2.6.1\units\arm-wince\ parallel to .\i386-win32
So far, so good.

Now I want to compile a package for both targets WIN32 and WINCE I change the options for the package and set
output directory for units: ..\lib\$(TargetCPU)-$(TargetOS) code genereation set
target OS: WinCE
target CPU: arm
disable optimizations
and do a clean compile
As a matter of result, the package is compiled without errors BUT:
1. the output units folder is .\i386-win32 and NOT arm-wince =-O looks like macros didn't work and win32 is still assumed
2. reverting to Win32 compilation I change the code generation options to target OS: Win32
target CPU: (default value)
leaving all other options as is.
Do a clean compile and :
the same output directory has been used,
the ouput objects avec been replaced
AND all have the same size >:o as for the compilation for WinCE It appears that compiling options to wince do not work as the only result I get is win32 target.

What did I miss ?

Antonio.

Reply by email

Mattias Gaertner
to Antonio Fortuny
Show quoted text 43 lines
Hi all. I've just installed onto a W7-win32 Lazarus 1.1 from daily snapshots. After installation I downloaded Lazarus-1.1-37612-fpc-2.6.1-20120611-cross-arm-wince-win32.exe and ran it. in .\fpc\2.61.1\bin\i386-win32\ I find: 06/11/2012 05:15 AM 387,086 arm-wince-ar.exe 06/11/2012 05:16 AM 775,182 arm-wince-as.exe 06/11/2012 05:16 AM 421,390 arm-wince-dlltool.exe 06/11/2012 05:16 AM 2,099,712 arm-wince-gdb.exe 06/11/2012 05:16 AM 621,582 arm-wince-ld.exe 06/11/2012 05:16 AM 662,542 arm-wince-objdump.exe 06/11/2012 05:16 AM 11,264 arm-wince-pe-stub.exe 06/11/2012 05:16 AM 518,158 arm-wince-strip.exe 06/11/2012 05:16 AM 469,518 arm-wince-windres.exe plus a ppccrossarm.exe and a new folder in C:\lazarus\fpc\2.6.1\units\arm-wince\ parallel to .\i386-win32 So far, so good. Now I want to compile a package for both targets WIN32 and WINCE I change the options for the package and set output directory for units: ..\lib\$(TargetCPU)-$(TargetOS) code genereation set target OS: WinCE target CPU: arm disable optimizations and do a clean compile As a matter of result, the package is compiled without errors BUT: 1. the output units folder is .\i386-win32 and NOT arm-wince =-O looks like macros didn't work and win32 is still assumed 2. reverting to Win32 compilation I change the code generation options to target OS: Win32 target CPU: (default value) leaving all other options as is. Do a clean compile and : the same output directory has been used, the ouput objects avec been replaced AND all have the same size >:o as for the compilation for WinCE It appears that compiling options to wince do not work as the only result I get is win32 target. What did I miss ?

The target OS and CPU is overridden by the project. Set the project's OS and CPU.

Mattias

Reply by email

Antonio Fortuny
to Mattias Gaertner

Le 11/06/2012 16:42, Mattias Gaertner a ?crit :

Show quoted text 48 lines
On Mon, 11 Jun 2012 16:19:31 +0200 Antonio Fortuny wrote: > Hi all. > > I've just installed onto a W7-win32 Lazarus 1.1 from daily snapshots. > After installation I downloaded > Lazarus-1.1-37612-fpc-2.6.1-20120611-cross-arm-wince-win32.exe and ran it. > in .\fpc\2.61.1\bin\i386-win32\ I find: > 06/11/2012 05:15 AM 387,086 arm-wince-ar.exe > 06/11/2012 05:16 AM 775,182 arm-wince-as.exe > 06/11/2012 05:16 AM 421,390 arm-wince-dlltool.exe > 06/11/2012 05:16 AM 2,099,712 arm-wince-gdb.exe > 06/11/2012 05:16 AM 621,582 arm-wince-ld.exe > 06/11/2012 05:16 AM 662,542 arm-wince-objdump.exe > 06/11/2012 05:16 AM 11,264 arm-wince-pe-stub.exe > 06/11/2012 05:16 AM 518,158 arm-wince-strip.exe > 06/11/2012 05:16 AM 469,518 arm-wince-windres.exe > plus a ppccrossarm.exe > and a new folder in C:\lazarus\fpc\2.6.1\units\arm-wince\ parallel to > .\i386-win32 > So far, so good. > > Now I want to compile a package for both targets WIN32 and WINCE > I change the options for the package and set > output directory for units: ..\lib\$(TargetCPU)-$(TargetOS) > code genereation set > target OS: WinCE > target CPU: arm > disable optimizations > and do a clean compile > As a matter of result, the package is compiled without errors BUT: > 1. the output units folder is .\i386-win32 and NOT arm-wince =-O > looks like macros didn't work and win32 is still assumed > 2. reverting to Win32 compilation I change the code generation options to > target OS: Win32 > target CPU: (default value) > leaving all other options as is. > Do a clean compile and : > the same output directory has been used, > the ouput objects avec been replaced > AND all have the same size>:o as for the compilation for WinCE > It appears that compiling options to wince do not work as the only > result I get is win32 target. > > What did I miss ? The target OS and CPU is overridden by the project. Set the project's OS and CPU.

Aaaaaaaaaaargh :'(
You are a king anyway, it works.
But I'm a little bit disappointed that the project and the package options are so intimately related.
Thanks anyway Mattias.

BTW, thanks to all other guys over there who are so patient with disgusting guys like me (and others of course) 8-)

Antonio.

Show quoted text 8 lines
Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Mattias Gaertner
to Antonio Fortuny
Show quoted text 7 lines
[...] > The target OS and CPU is overridden by the project. > Set the project's OS and CPU. Aaaaaaaaaaargh :'( You are a king anyway, it works. But I'm a little bit disappointed that the project and the package options are so intimately related.

TargetOS and CPU defines the used compiler, a lot of defines, search paths and IFDEFs.
You can not have two different Target OS/CPU settings active at a time. So the project's settings win.

The target OS/CPU settings should be removed/hidden on the package compiler options.
Feel free to create a feature request.

Mattias

Reply by email