+ iphonesim/x86_64 target (64 bit iOS simulator)

git-svn-id: trunk@29970 -
This commit is contained in:
Jonas Maebe 2015-02-23 22:56:09 +00:00
parent f421e83c9a
commit 79a06b1514
11 changed files with 89 additions and 16 deletions

View File

@ -533,6 +533,7 @@ implementation
system_x86_64_darwin,
system_arm_darwin,
system_aarch64_darwin,
system_x86_64_iphonesim,
system_powerpc_aix,
system_powerpc64_aix:
begin

View File

@ -885,7 +885,7 @@ begin
if MacVersionSet then
exit;
{ check for deployment target set via environment variable }
if not(target_info.system in [system_i386_iphonesim,system_arm_darwin,system_aarch64_darwin]) then
if not(target_info.system in [system_i386_iphonesim,system_arm_darwin,system_aarch64_darwin,system_x86_64_iphonesim]) then
begin
envstr:=GetEnvironmentVariable('MACOSX_DEPLOYMENT_TARGET');
if envstr<>'' then
@ -929,7 +929,8 @@ begin
set_system_compvar('IPHONE_OS_VERSION_MIN_REQUIRED','30000');
iPhoneOSVersionMin:='3.0';
end;
system_aarch64_darwin:
system_aarch64_darwin,
system_x86_64_iphonesim:
begin
set_system_compvar('IPHONE_OS_VERSION_MIN_REQUIRED','70000');
iPhoneOSVersionMin:='7.0';
@ -2207,7 +2208,7 @@ begin
end;
'M':
begin
if (target_info.system in (systems_darwin-[system_i386_iphonesim,system_arm_darwin,system_aarch64_darwin])) and
if (target_info.system in (systems_darwin-[system_i386_iphonesim,system_arm_darwin,system_aarch64_darwin,system_x86_64_iphonesim])) and
ParseMacVersionMin(MacOSXVersionMin,iPhoneOSVersionMin,'MAC_OS_X_VERSION_MIN_REQUIRED',copy(More,2,255),false) then
begin
break;
@ -2240,7 +2241,7 @@ begin
end;
'P':
begin
if (target_info.system in [system_i386_iphonesim,system_arm_darwin,system_aarch64_darwin]) and
if (target_info.system in [system_i386_iphonesim,system_arm_darwin,system_aarch64_darwin,system_x86_64_iphonesim]) and
ParseMacVersionMin(iPhoneOSVersionMin,MacOSXVersionMin,'IPHONE_OS_VERSION_MIN_REQUIRED',copy(More,2,255),true) then
begin
break;

View File

@ -2772,6 +2772,7 @@ implementation
sc80real:
if target_info.system in [system_i386_darwin,
system_i386_iphonesim,system_x86_64_darwin,
system_x86_64_iphonesim,
system_x86_64_linux,system_x86_64_freebsd,
system_x86_64_openbsd,system_x86_64_netbsd,
system_x86_64_solaris,system_x86_64_embedded,
@ -7420,7 +7421,7 @@ implementation
begin
if assigned(objc_fastenumeration) then
exit;
if not(target_info.system in [system_arm_darwin,system_i386_iphonesim,system_aarch64_darwin]) then
if not(target_info.system in [system_arm_darwin,system_i386_iphonesim,system_aarch64_darwin,system_x86_64_iphonesim]) then
cocoaunit:='COCOAALL'
else
cocoaunit:='IPHONEALL';

View File

@ -167,7 +167,8 @@
system_i386_aros, { 83 }
system_x86_64_aros, { 84 }
system_x86_64_dragonfly, { 85 }
system_aarch64_darwin { 85 }
system_aarch64_darwin, { 85 }
system_x86_64_iphonesim { 86 }
);
type

View File

@ -243,7 +243,7 @@ interface
systems_darwin = [system_powerpc_darwin,system_i386_darwin,
system_powerpc64_darwin,system_x86_64_darwin,
system_arm_darwin,system_i386_iphonesim,
system_aarch64_darwin];
system_aarch64_darwin,system_x86_64_iphonesim];
{all solaris systems }
systems_solaris = [system_sparc_solaris, system_i386_solaris,
@ -286,7 +286,7 @@ interface
systems_objc_supported = systems_darwin;
{ systems using the non-fragile Objective-C ABI }
systems_objc_nfabi = [system_powerpc64_darwin,system_x86_64_darwin,system_arm_darwin,system_i386_iphonesim,system_aarch64_darwin];
systems_objc_nfabi = [system_powerpc64_darwin,system_x86_64_darwin,system_arm_darwin,system_i386_iphonesim,system_aarch64_darwin,system_x86_64_iphonesim];
{ systems supporting "blocks" }
systems_blocks_supported = systems_darwin;

View File

@ -952,6 +952,69 @@ unit i_bsd;
);
system_x86_64_iphonesim_info : tsysteminfo =
(
system : system_x86_64_iphonesim;
name : 'Darwin/iPhoneSim for x86_64';
shortname : 'iPhoneSim';
flags : [tf_p_ext_support,tf_files_case_sensitive,tf_smartlink_sections,tf_dwarf_relative_addresses,tf_dwarf_only_local_labels,tf_pic_default,tf_has_winlike_resources];
cpu : cpu_x86_64;
unit_env : 'BSDUNITS';
extradefines : 'UNIX;BSD;HASUNIX;DARWIN'; // also define darwin for code compatibility
exeext : '';
defext : '.def';
scriptext : '.sh';
smartext : '.sl';
unitext : '.ppu';
unitlibext : '.ppl';
asmext : '.s';
objext : '.o';
resext : '.res';
resobjext : '.or';
sharedlibext : '.dylib';
staticlibext : '.a';
staticlibprefix : 'libp';
sharedlibprefix : 'lib';
sharedClibext : '.dylib';
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '_';
newline : #10;
dirsep : '/';
assem : as_darwin;
assemextern : as_darwin;
link : ld_none;
linkextern : ld_bsd;
ar : ar_gnu_ar;
res : res_macho;
dbg : dbg_dwarf2;
script : script_unix;
endian : endian_little;
alignment :
(
procalign : 8;
loopalign : 4;
jumpalign : 0;
constalignmin : 0;
constalignmax : 8;
varalignmin : 0;
varalignmax : 16;
localalignmin : 4;
localalignmax : 16;
recordalignmin : 0;
recordalignmax : 16;
maxCrecordalign : 16
);
first_parm_offset : 16;
stacksize : 262144;
stackalign : 16;
abi : abi_default;
);
system_arm_darwin_info : tsysteminfo =
(
system : system_arm_darwin;

View File

@ -417,7 +417,8 @@ begin
LinkRes.Add('i386');
system_powerpc64_darwin:
LinkRes.Add('ppc64');
system_x86_64_darwin:
system_x86_64_darwin,
system_x86_64_iphonesim:
LinkRes.Add('x86_64');
system_arm_darwin:
{ current versions of the linker require the sub-architecture type
@ -938,6 +939,9 @@ initialization
RegisterImport(system_x86_64_darwin,timportlibdarwin);
RegisterExport(system_x86_64_darwin,texportlibdarwin);
RegisterTarget(system_x86_64_darwin_info);
RegisterImport(system_x86_64_iphonesim,timportlibdarwin);
RegisterExport(system_x86_64_iphonesim,texportlibdarwin);
RegisterTarget(system_x86_64_iphonesim_info);
{$endif}
{$ifdef i386}
RegisterImport(system_i386_freebsd,timportlibbsd);

View File

@ -169,7 +169,8 @@ const
{ 83 } 'AROS-i386',
{ 84 } 'AROS-x86-64',
{ 85 } 'DragonFly-x86-64',
{ 85 } 'Darwin-AArch64'
{ 85 } 'Darwin-AArch64',
{ 86 } 'iPhoneSim-x86-64'
);
const

View File

@ -512,7 +512,7 @@ interface
idtxt : 'AS-Darwin';
asmbin : 'as';
asmcmd : '-o $OBJ $EXTRAOPT $ASM -arch x86_64';
supported_targets : [system_x86_64_darwin];
supported_targets : [system_x86_64_darwin,system_x86_64_iphonesim];
flags : [af_needar,af_smartlink_sections,af_supports_dwarf];
labelprefix : 'L';
comment : '# ';

View File

@ -524,7 +524,7 @@ unit cgx86;
end
else
{ Always use RIP relative symbol addressing for Windows and Darwin targets. }
if (target_info.system in (systems_all_windows+[system_x86_64_darwin])) and (ref.base<>NR_RIP) then
if (target_info.system in (systems_all_windows+[system_x86_64_darwin,system_x86_64_iphonesim])) and (ref.base<>NR_RIP) then
begin
if (ref.refaddr=addr_no) and (ref.base=NR_NO) and (ref.index=NR_NO) then
begin
@ -827,7 +827,7 @@ unit cgx86;
reference_reset_symbol(r,sym,0,sizeof(pint));
if (cs_create_pic in current_settings.moduleswitches) and
{ darwin's assembler doesn't want @PLT after call symbols }
not(target_info.system in [system_x86_64_darwin,system_i386_iphonesim]) then
not(target_info.system in [system_x86_64_darwin,system_i386_iphonesim,system_x86_64_iphonesim]) then
begin
{$ifdef i386}
include(current_procinfo.flags,pi_needs_got);
@ -1065,7 +1065,7 @@ unit cgx86;
a_op_const_reg(list,OP_ADD,OS_ADDR,offset,r);
end
{$ifdef x86_64}
else if (target_info.system in (systems_all_windows+[system_x86_64_darwin]))
else if (target_info.system in (systems_all_windows+[system_x86_64_darwin,system_x86_64_iphonesim]))
or (cs_create_pic in current_settings.moduleswitches)
then
begin
@ -2707,7 +2707,8 @@ unit cgx86;
a_call_name(list,'MCOUNT',false);
end;
system_x86_64_linux,
system_x86_64_darwin:
system_x86_64_darwin,
system_x86_64_iphonesim:
begin
a_call_name(list,'mcount',false);
end;

View File

@ -476,7 +476,7 @@ unit cgcpu;
reference_reset_symbol(r,sym,0,sizeof(pint));
if (cs_create_pic in current_settings.moduleswitches) and
{ darwin/x86_64's assembler doesn't want @PLT after call symbols }
(target_info.system<>system_x86_64_darwin) then
not(target_info.system in systems_darwin) then
r.refaddr:=addr_pic
else
r.refaddr:=addr_full;