diff --git a/compiler/fpcdefs.inc b/compiler/fpcdefs.inc index f710a4e93c..50c9a3c64e 100644 --- a/compiler/fpcdefs.inc +++ b/compiler/fpcdefs.inc @@ -94,9 +94,13 @@ {$define cpuneedsdiv32helper} {$define cputargethasfixedstack} { inherit FPC_ARMEL? } - {$if defined(CPUARMEL) and not(defined(FPC_OARM))} + {$if defined(CPUARMEL) and not(defined(FPC_OARM)) and not(defined(FPC_ARMEB))} {$define FPC_ARMEL} {$endif} + { inherit FPC_ARMEB? } + {$if defined(CPUARMEB) and not(defined(FPC_OARM)) and not(defined(FPC_ARMEL))} + {$define FPC_ARMEB} + {$endif} {$endif arm} {$ifdef m68k} diff --git a/compiler/pp.pas b/compiler/pp.pas index 9349845924..6fc8bcf334 100644 --- a/compiler/pp.pas +++ b/compiler/pp.pas @@ -40,8 +40,9 @@ program pp; EXTERN_MSG Don't compile the msgfiles in the compiler, always use external messagefiles, default for TP FPC_ARMEL create an arm eabi compiler + FPC_ARMEB create an arm big endian compiler FPC_OARM create an arm oabi compiler, only needed when the host - compiler is ARMEL + compiler is ARMEL or ARMEB ----------------------------------------------------------------- cpuflags The target processor has status flags (on by default) cpufpemu The target compiler will also support emitting software diff --git a/compiler/systems/i_linux.pas b/compiler/systems/i_linux.pas index 652c4dea3e..a4f9e43fa7 100644 --- a/compiler/systems/i_linux.pas +++ b/compiler/systems/i_linux.pas @@ -600,6 +600,70 @@ unit i_linux; abi : abi_eabi ); {$else FPC_ARMEL} +{$ifdef FPC_ARMEB} + system_arm_linux_info : tsysteminfo = + ( + system : system_arm_Linux; + name : 'Linux for ARMEB'; + shortname : 'Linux'; + flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive, + tf_use_function_relative_addresses,tf_requires_proper_alignment, + tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources]; + cpu : cpu_arm; + unit_env : 'LINUXUNITS'; + extradefines : 'UNIX;HASUNIX;CPUARMEB'; + exeext : ''; + defext : '.def'; + scriptext : '.sh'; + smartext : '.sl'; + unitext : '.ppu'; + unitlibext : '.ppl'; + asmext : '.s'; + objext : '.o'; + resext : '.res'; + resobjext : '.or'; + sharedlibext : '.so'; + staticlibext : '.a'; + staticlibprefix : 'libp'; + sharedlibprefix : 'lib'; + sharedClibext : '.so'; + staticClibext : '.a'; + staticClibprefix : 'lib'; + sharedClibprefix : 'lib'; + importlibprefix : 'libimp'; + importlibext : '.a'; + Cprefix : ''; + newline : #10; + dirsep : '/'; + assem : as_gas; + assemextern : as_gas; + link : nil; + linkextern : nil; + ar : ar_gnu_ar; + res : res_elf; + dbg : dbg_stabs; + script : script_unix; + endian : endian_big; + alignment : + ( + procalign : 4; + loopalign : 4; + jumpalign : 0; + constalignmin : 0; + constalignmax : 4; + varalignmin : 0; + varalignmax : 4; + localalignmin : 4; + localalignmax : 8; + recordalignmin : 0; + recordalignmax : 4; + maxCrecordalign : 4 + ); + first_parm_offset : 8; + stacksize : 8*1024*1024; + abi : abi_default + ); +{$else FPC_ARMEB} system_arm_linux_info : tsysteminfo = ( system : system_arm_Linux; @@ -662,6 +726,7 @@ unit i_linux; stacksize : 8*1024*1024; abi : abi_default ); +{$endif FPC_ARMEB} {$endif FPC_ARMEL} implementation