diff --git a/compiler/fpcdefs.inc b/compiler/fpcdefs.inc index 5963cec0ed..ad2a8fb6bd 100644 --- a/compiler/fpcdefs.inc +++ b/compiler/fpcdefs.inc @@ -151,6 +151,7 @@ {$define cpumm} {$define cpurox} {$define cpurefshaveindexreg} + {$define SUPPORT_SAFECALL} {$define SUPPORT_GET_FRAME} {$endif powerpc} @@ -163,6 +164,7 @@ {$define cpurox} {$define cpurefshaveindexreg} {$define cpuno32bitops} + {$define SUPPORT_SAFECALL} {$endif powerpc64} {$ifdef arm} diff --git a/compiler/powerpc/cpuinfo.pas b/compiler/powerpc/cpuinfo.pas index 90e050eaeb..2330eacb41 100644 --- a/compiler/powerpc/cpuinfo.pas +++ b/compiler/powerpc/cpuinfo.pas @@ -78,6 +78,7 @@ Const supported_calling_conventions : tproccalloptions = [ pocall_internproc, pocall_stdcall, + pocall_safecall, { the difference to stdcall is only the name mangling } pocall_cdecl, { the difference to stdcall is only the name mangling } diff --git a/compiler/powerpc64/cpuinfo.pas b/compiler/powerpc64/cpuinfo.pas index ef0040940a..b435387be3 100644 --- a/compiler/powerpc64/cpuinfo.pas +++ b/compiler/powerpc64/cpuinfo.pas @@ -74,6 +74,7 @@ Const supported_calling_conventions: tproccalloptions = [ pocall_internproc, pocall_stdcall, + pocall_safecall, { the difference to stdcall is only the name mangling } pocall_cdecl, { the difference to stdcall is only the name mangling } diff --git a/compiler/systems/i_linux.pas b/compiler/systems/i_linux.pas index a09a3d3376..e1fc334984 100644 --- a/compiler/systems/i_linux.pas +++ b/compiler/systems/i_linux.pas @@ -248,7 +248,7 @@ unit i_linux; system : system_powerpc_LINUX; name : 'Linux for PowerPC'; shortname : 'Linux'; - flags : [tf_needs_symbol_size,tf_smartlink_sections, + flags : [tf_needs_symbol_size,tf_smartlink_sections,tf_safecall_exceptions, tf_needs_symbol_type,tf_files_case_sensitive, tf_has_winlike_resources,tf_supports_hidden_symbols]; cpu : cpu_powerpc; @@ -317,7 +317,7 @@ unit i_linux; name : 'Linux for PowerPC64'; shortname : 'Linux'; flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive, - tf_requires_proper_alignment,tf_smartlink_sections,tf_has_winlike_resources, + tf_requires_proper_alignment,tf_safecall_exceptions,tf_smartlink_sections,tf_has_winlike_resources, tf_supports_hidden_symbols]; cpu : cpu_powerpc64; unit_env : ''; @@ -603,7 +603,7 @@ unit i_linux; name : 'Linux for ARMHF'; shortname : 'Linux'; flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive, - tf_requires_proper_alignment, + tf_requires_proper_alignment,tf_safecall_exceptions, {$ifdef tls_threadvars} tf_section_threadvars, {$endif tls_threadvars} @@ -679,7 +679,7 @@ unit i_linux; name : 'Linux for ARMEL'; shortname : 'Linux'; flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive, - tf_requires_proper_alignment, + tf_requires_proper_alignment,tf_safecall_exceptions, {$ifdef tls_threadvars} tf_section_threadvars, {$endif tls_threadvars} @@ -752,7 +752,7 @@ unit i_linux; name : 'Linux for ARMEB'; shortname : 'Linux'; flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive, - tf_requires_proper_alignment, + tf_requires_proper_alignment,tf_safecall_exceptions, tf_smartlink_sections,tf_pic_uses_got, tf_has_winlike_resources,tf_supports_hidden_symbols]; cpu : cpu_arm; @@ -821,7 +821,7 @@ unit i_linux; name : 'Linux for ARM'; shortname : 'Linux'; flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive, - tf_requires_proper_alignment, + tf_requires_proper_alignment,tf_safecall_exceptions, tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols]; cpu : cpu_arm; unit_env : 'LINUXUNITS'; @@ -894,7 +894,7 @@ unit i_linux; flags : [tf_needs_symbol_size, tf_needs_symbol_type, tf_files_case_sensitive, - tf_requires_proper_alignment, + tf_requires_proper_alignment,tf_safecall_exceptions, tf_smartlink_sections,tf_pic_uses_got, tf_has_winlike_resources {$ifdef llvm}