浏览代码

* ignore PIC directive on windows and warn about it

git-svn-id: trunk@5479 -
florian 18 年之前
父节点
当前提交
d47dc38f2c
共有 4 个文件被更改,包括 253 次插入243 次删除
  1. 3 0
      compiler/msg/errore.msg
  2. 3 2
      compiler/msgidx.inc
  3. 242 240
      compiler/msgtxt.inc
  4. 5 1
      compiler/scandir.pas

+ 3 - 0
compiler/msg/errore.msg

@@ -345,6 +345,9 @@ scanner_e_illegal_warn_state=02079_E_Illegal state for $WARN directive
 % Only ON and OFF can be used as state with a \$warn compiler directive
 scan_e_only_packset=02080_E_Illegal set packing value
 % Only 0, 1, 2, 4, 8, DEFAULT and NORMAL are allowed as packset parameter
+scan_w_pic_ignored=02081_W_PIC directive ignored
+% Several targets like windows doesn't support and need the PIC directive so
+% it is ignored.
 % \end{description}
 #
 # Parser

+ 3 - 2
compiler/msgidx.inc

@@ -101,6 +101,7 @@ const
   scan_w_maxstacksize_not_support=02078;
   scanner_e_illegal_warn_state=02079;
   scan_e_only_packset=02080;
+  scan_w_pic_ignored=02081;
   parser_e_syntax_error=03000;
   parser_e_dont_nest_interrupt=03004;
   parser_w_proc_directive_ignored=03005;
@@ -703,9 +704,9 @@ const
   option_info=11024;
   option_help_pages=11025;
 
-  MsgTxtSize = 41721;
+  MsgTxtSize = 41751;
 
   MsgIdxMax : array[1..20] of longint=(
-    24,81,226,79,62,47,102,22,135,60,
+    24,82,226,79,62,47,102,22,135,60,
     41,1,1,1,1,1,1,1,1,1
   );

文件差异内容过多而无法显示
+ 242 - 240
compiler/msgtxt.inc


+ 5 - 1
compiler/scandir.pas

@@ -843,7 +843,11 @@ implementation
 
     procedure dir_pic;
       begin
-        do_moduleswitch(cs_create_pic);
+        { windows doesn't need/support pic }
+        if not(target_info.system in system_windows+system_wince) then
+          do_moduleswitch(cs_create_pic)
+        else
+          message(scan_w_pic_ignored);
       end;
 
     procedure dir_pop;

部分文件因为文件数量过多而无法显示