Browse Source

o fix wince compilation:
* apparently, wince (or GNU AS for it) does not support blx imm
* set FPC_IN_SYSTEM directive, so assembler code in divide.inc is compiled right

git-svn-id: trunk@29779 -

florian 10 years ago
parent
commit
80cc09e350
2 changed files with 4 additions and 1 deletions
  1. 3 1
      compiler/arm/cgcpu.pas
  2. 1 0
      rtl/wince/system.pp

+ 3 - 1
compiler/arm/cgcpu.pas

@@ -640,7 +640,9 @@ unit cgcpu;
         sym : TAsmSymbol;
       begin
         { check not really correct: should only be used for non-Thumb cpus }
-        if CPUARM_HAS_BLX_LABEL in cpu_capabilities[current_settings.cputype] then
+        if (CPUARM_HAS_BLX_LABEL in cpu_capabilities[current_settings.cputype]) and
+          { WinCE GNU AS (not sure if this applies in general) does not support BLX imm }
+          (target_info.system<>system_arm_wince) then
           branchopcode:=A_BLX
         else
           branchopcode:=A_BL;

+ 1 - 0
rtl/wince/system.pp

@@ -17,6 +17,7 @@ unit System;
 
 interface
 
+{$define FPC_IS_SYSTEM}
 {$ifdef SYSTEMDEBUG}
   {$define SYSTEMEXCEPTIONDEBUG}
 {$endif SYSTEMDEBUG}