mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-05 09:46:33 +02:00
+ some basic compiler support for sparc64-linux
git-svn-id: trunk@36418 -
This commit is contained in:
parent
229f615b59
commit
21e5f99faa
@ -251,7 +251,42 @@ implementation
|
|||||||
dollarsign: '$';
|
dollarsign: '$';
|
||||||
);
|
);
|
||||||
|
|
||||||
|
as_sparc64_as_info : tasminfo =
|
||||||
|
(
|
||||||
|
id : as_gas;
|
||||||
|
idtxt : 'AS';
|
||||||
|
asmbin : 'as';
|
||||||
|
{$ifdef FPC_SPARC_V8_ONLY}
|
||||||
|
asmcmd : '$PIC -o $OBJ $EXTRAOPT $ASM';
|
||||||
|
{$else}
|
||||||
|
asmcmd : '$ARCH $PIC -o $OBJ $EXTRAOPT $ASM';
|
||||||
|
{$endif}
|
||||||
|
supported_targets : [system_sparc64_linux];
|
||||||
|
flags : [af_needar,af_smartlink_sections];
|
||||||
|
labelprefix : '.L';
|
||||||
|
comment : '# ';
|
||||||
|
dollarsign: '$';
|
||||||
|
);
|
||||||
|
|
||||||
|
as_sparc64_gas_info : tasminfo =
|
||||||
|
(
|
||||||
|
id : as_ggas;
|
||||||
|
idtxt : 'GAS';
|
||||||
|
asmbin : 'gas';
|
||||||
|
asmcmd : '$ARCH $PIC -o $OBJ $EXTRAOPT $ASM';
|
||||||
|
supported_targets : [system_sparc64_linux];
|
||||||
|
flags : [af_needar,af_smartlink_sections];
|
||||||
|
labelprefix : '.L';
|
||||||
|
comment : '# ';
|
||||||
|
dollarsign: '$';
|
||||||
|
);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
{$ifdef SPARC}
|
||||||
RegisterAssembler(as_SPARC_as_info,TGasSPARC);
|
RegisterAssembler(as_SPARC_as_info,TGasSPARC);
|
||||||
RegisterAssembler(as_SPARC_gas_info,TGasSPARC);
|
RegisterAssembler(as_SPARC_gas_info,TGasSPARC);
|
||||||
|
{$else SPARC}
|
||||||
|
RegisterAssembler(as_SPARC64_as_info,TGasSPARC);
|
||||||
|
RegisterAssembler(as_SPARC64_gas_info,TGasSPARC);
|
||||||
|
{$endif SPARC}
|
||||||
end.
|
end.
|
||||||
|
@ -51,7 +51,8 @@
|
|||||||
cpu_jvm, { 14 }
|
cpu_jvm, { 14 }
|
||||||
cpu_i8086, { 15 }
|
cpu_i8086, { 15 }
|
||||||
cpu_aarch64, { 16 }
|
cpu_aarch64, { 16 }
|
||||||
cpu_wasm { 17 }
|
cpu_wasm, { 17 }
|
||||||
|
cpu_sparc64 { 18 }
|
||||||
);
|
);
|
||||||
|
|
||||||
tasmmode= (asmmode_none
|
tasmmode= (asmmode_none
|
||||||
@ -175,7 +176,8 @@
|
|||||||
system_i8086_win16, { 89 }
|
system_i8086_win16, { 89 }
|
||||||
system_i8086_embedded, { 90 }
|
system_i8086_embedded, { 90 }
|
||||||
system_arm_aros, { 91 }
|
system_arm_aros, { 91 }
|
||||||
system_wasm_wasm32 { 92 }
|
system_wasm_wasm32, { 92 }
|
||||||
|
system_sparc64_linux { 93 }
|
||||||
);
|
);
|
||||||
|
|
||||||
type
|
type
|
||||||
|
@ -229,7 +229,7 @@ interface
|
|||||||
systems_wince = [system_arm_wince,system_i386_wince];
|
systems_wince = [system_arm_wince,system_i386_wince];
|
||||||
systems_android = [system_arm_android, system_i386_android, system_mipsel_android];
|
systems_android = [system_arm_android, system_i386_android, system_mipsel_android];
|
||||||
systems_linux = [system_i386_linux,system_x86_64_linux,system_powerpc_linux,system_powerpc64_linux,
|
systems_linux = [system_i386_linux,system_x86_64_linux,system_powerpc_linux,system_powerpc64_linux,
|
||||||
system_arm_linux,system_sparc_linux,system_m68k_linux,
|
system_arm_linux,system_sparc_linux,system_sparc64_linux,system_m68k_linux,
|
||||||
system_x86_6432_linux,system_mipseb_linux,system_mipsel_linux,system_aarch64_linux];
|
system_x86_6432_linux,system_mipseb_linux,system_mipsel_linux,system_aarch64_linux];
|
||||||
systems_dragonfly = [system_x86_64_dragonfly];
|
systems_dragonfly = [system_x86_64_dragonfly];
|
||||||
systems_freebsd = [system_i386_freebsd,
|
systems_freebsd = [system_i386_freebsd,
|
||||||
@ -390,7 +390,7 @@ interface
|
|||||||
cpu2str : array[TSystemCpu] of string[10] =
|
cpu2str : array[TSystemCpu] of string[10] =
|
||||||
('','i386','m68k','alpha','powerpc','sparc','vm','ia64','x86_64',
|
('','i386','m68k','alpha','powerpc','sparc','vm','ia64','x86_64',
|
||||||
'mips','arm', 'powerpc64', 'avr', 'mipsel','jvm', 'i8086',
|
'mips','arm', 'powerpc64', 'avr', 'mipsel','jvm', 'i8086',
|
||||||
'aarch64', 'wasm');
|
'aarch64', 'wasm', 'sparc64');
|
||||||
|
|
||||||
abiinfo : array[tabi] of tabiinfo = (
|
abiinfo : array[tabi] of tabiinfo = (
|
||||||
(name: 'DEFAULT'; supported: true),
|
(name: 'DEFAULT'; supported: true),
|
||||||
@ -938,6 +938,20 @@ begin
|
|||||||
{$endif cpusparc}
|
{$endif cpusparc}
|
||||||
{$endif sparc}
|
{$endif sparc}
|
||||||
|
|
||||||
|
{$ifdef sparc64}
|
||||||
|
{$ifdef cpusparc64}
|
||||||
|
default_target(source_info.system);
|
||||||
|
{$else cpusparc64}
|
||||||
|
{$ifdef solaris}
|
||||||
|
{$define default_target_set}
|
||||||
|
default_target(system_sparc64_solaris);
|
||||||
|
{$endif}
|
||||||
|
{$ifndef default_target_set}
|
||||||
|
default_target(system_sparc64_linux);
|
||||||
|
{$endif ndef default_target_set}
|
||||||
|
{$endif cpusparc64}
|
||||||
|
{$endif sparc64}
|
||||||
|
|
||||||
{$ifdef arm}
|
{$ifdef arm}
|
||||||
{$ifdef cpuarm}
|
{$ifdef cpuarm}
|
||||||
default_target(source_info.system);
|
default_target(source_info.system);
|
||||||
|
@ -491,6 +491,73 @@ unit i_linux;
|
|||||||
llvmdatalayout : 'E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32-S64';
|
llvmdatalayout : 'E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32-S64';
|
||||||
);
|
);
|
||||||
|
|
||||||
|
system_sparc64_linux_info : tsysteminfo =
|
||||||
|
(
|
||||||
|
system : system_SPARC64_Linux;
|
||||||
|
name : 'Linux for SPARC64';
|
||||||
|
shortname : 'Linux';
|
||||||
|
flags : [tf_needs_symbol_size,tf_library_needs_pic,tf_smartlink_sections,
|
||||||
|
tf_needs_symbol_type,tf_files_case_sensitive,
|
||||||
|
tf_pic_uses_got,
|
||||||
|
tf_requires_proper_alignment,tf_safecall_exceptions, tf_safecall_clearstack,
|
||||||
|
tf_has_winlike_resources];
|
||||||
|
cpu : cpu_SPARC64;
|
||||||
|
unit_env : 'LINUXUNITS';
|
||||||
|
extradefines : 'UNIX;HASUNIX';
|
||||||
|
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 : ld_none;
|
||||||
|
linkextern : ld_linux;
|
||||||
|
ar : ar_gnu_ar;
|
||||||
|
res : res_elf;
|
||||||
|
dbg : dbg_stabs;
|
||||||
|
script : script_unix;
|
||||||
|
endian : endian_big;
|
||||||
|
alignment :
|
||||||
|
(
|
||||||
|
procalign : 16;
|
||||||
|
loopalign : 8;
|
||||||
|
jumpalign : 0;
|
||||||
|
constalignmin : 4;
|
||||||
|
constalignmax : 16;
|
||||||
|
varalignmin : 4;
|
||||||
|
varalignmax : 8;
|
||||||
|
localalignmin : 4;
|
||||||
|
localalignmax : 16;
|
||||||
|
recordalignmin : 0;
|
||||||
|
recordalignmax : 16;
|
||||||
|
maxCrecordalign : 16
|
||||||
|
);
|
||||||
|
first_parm_offset : 92;
|
||||||
|
stacksize : 16*1024*1024;
|
||||||
|
stackalign : 16;
|
||||||
|
abi : abi_default;
|
||||||
|
llvmdatalayout : 'E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32-S64';
|
||||||
|
);
|
||||||
|
|
||||||
{$ifdef FPC_ARMHF}
|
{$ifdef FPC_ARMHF}
|
||||||
system_arm_linux_info : tsysteminfo =
|
system_arm_linux_info : tsysteminfo =
|
||||||
(
|
(
|
||||||
@ -988,6 +1055,11 @@ initialization
|
|||||||
set_source_info(system_sparc_linux_info);
|
set_source_info(system_sparc_linux_info);
|
||||||
{$endif linux}
|
{$endif linux}
|
||||||
{$endif CPUSPARC}
|
{$endif CPUSPARC}
|
||||||
|
{$ifdef CPUSPARC64}
|
||||||
|
{$ifdef linux}
|
||||||
|
set_source_info(system_sparc64_linux_info);
|
||||||
|
{$endif linux}
|
||||||
|
{$endif CPUSPARC64}
|
||||||
{$ifdef CPUPOWERPC32}
|
{$ifdef CPUPOWERPC32}
|
||||||
{$ifdef linux}
|
{$ifdef linux}
|
||||||
set_source_info(system_powerpc_linux_info);
|
set_source_info(system_powerpc_linux_info);
|
||||||
|
@ -1829,6 +1829,11 @@ initialization
|
|||||||
RegisterExport(system_SPARC_linux,texportliblinux);
|
RegisterExport(system_SPARC_linux,texportliblinux);
|
||||||
RegisterTarget(system_SPARC_linux_info);
|
RegisterTarget(system_SPARC_linux_info);
|
||||||
{$endif SPARC}
|
{$endif SPARC}
|
||||||
|
{$ifdef SPARC64}
|
||||||
|
RegisterImport(system_SPARC64_linux,timportliblinux);
|
||||||
|
RegisterExport(system_SPARC64_linux,texportliblinux);
|
||||||
|
RegisterTarget(system_SPARC64_linux_info);
|
||||||
|
{$endif SPARC64}
|
||||||
{$ifdef ARM}
|
{$ifdef ARM}
|
||||||
RegisterImport(system_arm_linux,timportliblinux);
|
RegisterImport(system_arm_linux,timportliblinux);
|
||||||
RegisterExport(system_arm_linux,texportliblinux);
|
RegisterExport(system_arm_linux,texportliblinux);
|
||||||
|
Loading…
Reference in New Issue
Block a user