Jelajahi Sumber

Add a new target flag which determines whether the target supports dynamic packages or not.

systems.pas:
  + new flag tf_supports_packages
pmodules.pas, proc_package:
  * error out when flag tf_supports_packages is not set for the current target
msg/errore.msg:
  + error message for when tf_supports_packages is missing and a package file is compiled

git-svn-id: branches/svenbarth/packages@28237 -
svenbarth 11 tahun lalu
induk
melakukan
09582ceb7e
5 mengubah file dengan 390 tambahan dan 383 penghapusan
  1. 3 0
      compiler/msg/errore.msg
  2. 3 2
      compiler/msgidx.inc
  3. 377 380
      compiler/msgtxt.inc
  4. 3 0
      compiler/pmodules.pas
  5. 4 1
      compiler/systems.pas

+ 3 - 0
compiler/msg/errore.msg

@@ -1528,6 +1528,9 @@ parser_w_ptr_type_ignored=03338_W_Pointer type "$1" ignored
 % The specified pointer type modifier is ignored, because it is not supported on
 % the current platform. This happens, for example, when a far pointer is
 % declared on a non-x86 platform.
+parser_e_packages_not_supported=03339_E_Dynamic packages not supported for target OS
+% Support for dynamic packages is not implemented for the specified target OS
+% or it is at least not tested and thus disabled.
 %
 %
 %

+ 3 - 2
compiler/msgidx.inc

@@ -440,6 +440,7 @@ const
   parser_e_overloaded_have_same_mangled_name=03336;
   parser_e_default_value_val_const=03337;
   parser_w_ptr_type_ignored=03338;
+  parser_e_packages_not_supported=03339;
   type_e_mismatch=04000;
   type_e_incompatible_types=04001;
   type_e_not_equal_types=04002;
@@ -994,9 +995,9 @@ const
   option_info=11024;
   option_help_pages=11025;
 
-  MsgTxtSize = 72030;
+  MsgTxtSize = 72083;
 
   MsgIdxMax : array[1..20] of longint=(
-    26,99,339,123,89,57,126,27,202,64,
+    26,99,340,123,89,57,126,27,202,64,
     58,20,1,1,1,1,1,1,1,1
   );

File diff ditekan karena terlalu besar
+ 377 - 380
compiler/msgtxt.inc


+ 3 - 0
compiler/pmodules.pas

@@ -1604,6 +1604,9 @@ type
          init_procinfo:=nil;
          finalize_procinfo:=nil;}
 
+         if not (tf_supports_packages in target_info.flags) then
+           message1(parser_e_packages_not_supported,target_info.name);
+
          if not RelocSectionSetExplicitly then
            RelocSection:=true;
 

+ 4 - 1
compiler/systems.pas

@@ -144,7 +144,10 @@ interface
               this is usefull for architectures which require a small code footprint }
             tf_no_objectfiles_when_smartlinking,
             { indicates that the default value of the ts_cld target switch is 'on' for this target }
-            tf_cld
+            tf_cld,
+            { indicates that this target can use dynamic packages otherwise an
+              error will be generated if a package file is compiled }
+            tf_supports_packages
        );
 
        psysteminfo = ^tsysteminfo;

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini