From 86940dfb32d83df7f82dbf6d0a74dccbc2a5eb3e Mon Sep 17 00:00:00 2001 From: marcus Date: Sun, 6 Nov 2016 10:51:45 +0000 Subject: [PATCH] AROS: added arm-aros target to compiler and fpcmake git-svn-id: trunk@34805 - --- compiler/arm/agarmgas.pas | 2 +- compiler/arm/cpuelf.pas | 2 +- compiler/arm/cputarg.pas | 3 ++ compiler/systems.inc | 3 +- compiler/systems/i_aros.pas | 68 ++++++++++++++++++++++++++++++ compiler/systems/t_aros.pas | 4 ++ compiler/utils/ppuutils/ppudump.pp | 3 +- utils/fpcm/fpcmmain.pp | 2 +- 8 files changed, 82 insertions(+), 5 deletions(-) diff --git a/compiler/arm/agarmgas.pas b/compiler/arm/agarmgas.pas index 0187a07bfd..382c0da054 100644 --- a/compiler/arm/agarmgas.pas +++ b/compiler/arm/agarmgas.pas @@ -404,7 +404,7 @@ unit agarmgas; asmbin : 'as'; asmcmd : '-o $OBJ $EXTRAOPT $ASM'; supported_targets : [system_arm_linux,system_arm_wince,system_arm_gba,system_arm_palmos,system_arm_nds, - system_arm_embedded,system_arm_symbian,system_arm_android]; + system_arm_embedded,system_arm_symbian,system_arm_android,system_arm_aros]; flags : [af_needar,af_smartlink_sections]; labelprefix : '.L'; comment : '# '; diff --git a/compiler/arm/cpuelf.pas b/compiler/arm/cpuelf.pas index b503ddfc78..5d7a0c31f6 100644 --- a/compiler/arm/cpuelf.pas +++ b/compiler/arm/cpuelf.pas @@ -956,7 +956,7 @@ implementation asmcmd : ''; supported_targets : [system_arm_embedded,system_arm_darwin, system_arm_linux,system_arm_gba, - system_arm_nds]; + system_arm_nds,system_arm_aros]; flags : [af_outputbinary,af_smartlink_sections,af_supports_dwarf]; labelprefix : '.L'; comment : ''; diff --git a/compiler/arm/cputarg.pas b/compiler/arm/cputarg.pas index 8a98a3426e..7fe7c5d793 100644 --- a/compiler/arm/cputarg.pas +++ b/compiler/arm/cputarg.pas @@ -62,6 +62,9 @@ implementation {$ifndef NOTARGETBSD} ,t_bsd {$endif} + {$ifndef NOTARGETAROS} + ,t_aros + {$endif} {************************************** Assemblers diff --git a/compiler/systems.inc b/compiler/systems.inc index 744afcd685..e0ff83b5c6 100644 --- a/compiler/systems.inc +++ b/compiler/systems.inc @@ -172,7 +172,8 @@ system_x86_64_iphonesim, { 87 } system_aarch64_linux, { 88 } system_i8086_win16, { 89 } - system_i8086_embedded { 90 } + system_i8086_embedded, { 90 } + system_arm_aros { 91 } ); type diff --git a/compiler/systems/i_aros.pas b/compiler/systems/i_aros.pas index 23970f034a..af575f2718 100644 --- a/compiler/systems/i_aros.pas +++ b/compiler/systems/i_aros.pas @@ -154,6 +154,68 @@ unit i_aros; abi : abi_default; llvmdatalayout : 'todo'; ); + system_arm_aros_info : tsysteminfo = + ( + system : system_arm_aros; + name : 'AROS for ARM'; + shortname : 'AROS'; + flags : [tf_files_case_aware, tf_smartlink_library, tf_has_winlike_resources]; + cpu : cpu_arm; + unit_env : 'AROSUNITS'; + extradefines : 'HASAMIGA'; + exeext : ''; + defext : '.def'; + scriptext : '.sh'; + smartext : '.sl'; + unitext : '.ppu'; + unitlibext : '.ppl'; + asmext : '.s'; + objext : '.o'; + resext : '.res'; + resobjext : '.or'; + sharedlibext : '.library'; + staticlibext : '.a'; + staticlibprefix : 'libp'; + sharedlibprefix : ''; + sharedClibext : '.library'; + staticClibext : '.a'; + staticClibprefix : 'lib'; + sharedClibprefix : ''; + importlibprefix : 'libimp'; + importlibext : '.a'; + Cprefix : ''; + newline : #10; + dirsep : '/'; + assem : as_arm_elf32; + assemextern : as_gas; + link : ld_none; + linkextern : ld_aros; + ar : ar_gnu_ar; + res : res_elf; + dbg : dbg_stabs; + script : script_amiga; + endian : endian_little; + alignment : + ( + procalign : 16; + loopalign : 4; + jumpalign : 0; + constalignmin : 0; + constalignmax : 8; + varalignmin : 0; + varalignmax : 16; + localalignmin : 0; + localalignmax : 4; + recordalignmin : 0; + recordalignmax : 16; + maxCrecordalign : 4 + ); + first_parm_offset : 8; + stacksize : 262144; + stackalign : 4; + abi : abi_default; + llvmdatalayout : 'todo'; + ); implementation @@ -168,4 +230,10 @@ initialization set_source_info(system_x86_64_aros_info); {$endif AROS} {$endif CPUX86_64} +{$ifdef CPUARM} + {$ifdef AROS} + set_source_info(system_arm_aros_info); + {$endif AROS} +{$endif CPUX86_64} + end. diff --git a/compiler/systems/t_aros.pas b/compiler/systems/t_aros.pas index 366059f930..f0bb28ba19 100644 --- a/compiler/systems/t_aros.pas +++ b/compiler/systems/t_aros.pas @@ -260,5 +260,9 @@ initialization RegisterLinker(ld_aros,TLinkeraros); RegisterTarget(system_x86_64_aros_info); {$endif x86_64} +{$ifdef arm} + RegisterLinker(ld_aros,TLinkeraros); + RegisterTarget(system_arm_aros_info); +{$endif arm} RegisterRes(res_elf_info, TWinLikeResourceFile); end. diff --git a/compiler/utils/ppuutils/ppudump.pp b/compiler/utils/ppuutils/ppudump.pp index edda6661bd..1a58437617 100644 --- a/compiler/utils/ppuutils/ppudump.pp +++ b/compiler/utils/ppuutils/ppudump.pp @@ -174,7 +174,8 @@ const { 87 } 'iPhoneSim-x86-64', { 88 } 'Linux-AArch64', { 89 } 'Win16', - { 90 } 'Embedded-i8086' + { 90 } 'Embedded-i8086', + { 91 } 'AROS-arm' ); const diff --git a/utils/fpcm/fpcmmain.pp b/utils/fpcm/fpcmmain.pp index 295350e98d..af565975b9 100644 --- a/utils/fpcm/fpcmmain.pp +++ b/utils/fpcm/fpcmmain.pp @@ -149,7 +149,7 @@ interface { java } ( false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false), { android } ( true, false, false, false, false, true, false, false, false, false, false, true, false, false, true, false, false), { msdos } ( false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true , false), - { aros } ( true, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false), + { aros } ( true, false, false, false, true, true, false, false, false, false, false, false, false, false, false, false, false), {dragonfly} ( false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false), { win16 } ( false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true , false) );