MantisBT - CMake
View Issue Details
0014083CMakeModulespublic2013-04-15 09:472014-03-05 09:58
Jan Hudec 
Patrick R. Gansterer 
normalminoralways
closedfixed 
 
CMake 2.8.12 
0014083: WinCE generators should not default to THUMB for ARMV4 SDKs
I've tested the new Windows CE support and noticed it forces /MACHINE:THUMB for all ARM machines. But this does not seem to be correct for SDKs targeting just ARMV4 rather than ARMV4I, such as "Pocket PC 2003 (ARMV4)" pre-installed with Visual Studio 2008, because ARMV4 does not have to have THUMB mode.

The WinCE support patch I was using so far (git://gitorious.org/~paroga/cmake/parogas-cmake.git#wince [^]) uses the logic I described above.

The "correct" approach is to test the "INSTRUCTIONSET" macro from the WCE.VCPlatform.config, but it is always included in the SDK name, so matching on that should do.
Use "Visual Studio 9 2008 Pocket PC 2003 (ARMV4)" generator or other WinCE 4.2 SDK.

The default machine should be ARM, but will be THUMB.
I suspect similar problem might apply to the substitution of SH4 for SH, but we are not compiling for any SH target, so I am not sure.
No tags attached.
related to 0007919closed Brad King Patch for Windows Platform files to add WinCE support with NMake 
related to 0014436closed Patrick R. Gansterer Missing ARCHFAM preprocessor definition in WinCE Visual Studio generators (armv41) 
Issue History
2013-04-15 09:47Jan HudecNew Issue
2013-04-15 09:49Jan HudecNote Added: 0032835
2013-04-15 09:49Brad KingRelationship addedrelated to 0007919
2013-04-15 09:50Brad KingAssigned To => Patrick R. Gansterer
2013-04-15 09:50Brad KingStatusnew => assigned
2013-04-15 09:50Jan HudecNote Edited: 0032835bug_revision_view_page.php?bugnote_id=32835#r1111
2013-08-05 14:33Patrick R. GanstererNote Added: 0033669
2013-08-06 17:19Patrick R. GanstererNote Added: 0033671
2013-08-06 17:19Patrick R. GanstererStatusassigned => resolved
2013-08-06 17:19Patrick R. GanstererResolutionopen => fixed
2013-08-06 17:19Patrick R. GanstererFixed in Version => CMake 2.8.12
2013-09-24 11:19Brad KingRelationship addedrelated to 0014436
2014-03-05 09:58Robert MaynardNote Added: 0035266
2014-03-05 09:58Robert MaynardStatusresolved => closed

Notes
(0032835)
Jan Hudec   
2013-04-15 09:49   
(edited on: 2013-04-15 09:50)
I would add relation to 0007919, but I don't seem to be able to. Nor am I able to add comment there to mention that I've added this one.

(0033669)
Patrick R. Gansterer   
2013-08-05 14:33   
I've pushed a solution at http://cmake.org/gitweb?p=stage/cmake.git;h=refs/heads/peheader. [^]
The /machine flag is now read from the COFF header of the inital generated binary. This binary is generated by the _default_ configuration of the selected SDK (see Modules/CompilerId/VS-7.vcproj.in). On my machine it detects THUMB (not ARM) when used with "Visual Studio 8 2005 Pocket PC 2003 (ARMV4)", but the /machine:THUMB for linker generates no error.
Do you get any error? Does it make a difference if ARM or THUMB is used on your device?
(0033671)
Patrick R. Gansterer   
2013-08-06 17:19   
Merged into master: http://cmake.org/gitweb?p=cmake.git;a=commit;h=5b141a7b293bc26b35fc1b3320931f8cc16901a1 [^]
(0035266)
Robert Maynard   
2014-03-05 09:58   
Closing resolved issues that have not been updated in more than 4 months