diff --git a/compiler/msg/errore.msg b/compiler/msg/errore.msg index 1d1460b7c1..51f303bb7f 100644 --- a/compiler/msg/errore.msg +++ b/compiler/msg/errore.msg @@ -413,7 +413,7 @@ scan_e_illegal_hugepointernormalization=02098_E_Illegal argument for HUGEPOINTER # # Parser # -# 03343 is the last used one +# 03344 is the last used one # % \section{Parser messages} % This section lists all parser messages. The parser takes care of the @@ -1544,6 +1544,9 @@ parser_e_no_genfuncs_in_interfaces=03342_E_Generic methods are not allowed in in parser_e_genfuncs_cannot_be_virtual=03343_E_Generic methods can not be virtual % Generic methods can not be declared as virtual as there'd need to be a VMT entry for each % specialization. This is however not possible with a static VMT. +parser_e_packages_not_supported=03344_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. % % % \end{description} diff --git a/compiler/pmodules.pas b/compiler/pmodules.pas index 806e60754c..81c5b459b7 100644 --- a/compiler/pmodules.pas +++ b/compiler/pmodules.pas @@ -1666,6 +1666,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; diff --git a/compiler/systems.pas b/compiler/systems.pas index 069e08f10c..89c67e7f78 100644 --- a/compiler/systems.pas +++ b/compiler/systems.pas @@ -148,7 +148,10 @@ interface { indicates that the default value of the ts_cld target switch is 'on' for this target } tf_cld, { indicates that the default value of the ts_x86_far_procs_push_odd_bp target switch is 'on' for this target } - tf_x86_far_procs_push_odd_bp + tf_x86_far_procs_push_odd_bp, + { 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;