mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 20:39:34 +02:00
* support for creating smartlinkable files under darwin. Don't turn on
smartlinking (-XX) yet though, it doesn't work because of bugs in the current darwin linker regarding dealing with multiple symbols referring to the same address. git-svn-id: trunk@4613 -
This commit is contained in:
parent
51259b697b
commit
17e61456c6
@ -1062,6 +1062,10 @@ implementation
|
||||
AsmWriteLn(target_asm.comment+'End asmlist '+AsmlistTypeStr[hal]);
|
||||
end;
|
||||
|
||||
if (cs_create_smart in aktmoduleswitches) and
|
||||
(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
|
||||
AsmWriteLn(#9'.subsections_via_symbols');
|
||||
|
||||
AsmLn;
|
||||
{$ifdef EXTDEBUG}
|
||||
if assigned(current_module.mainsource) then
|
||||
|
@ -397,7 +397,7 @@ unit i_bsd;
|
||||
system : system_powerpc_darwin;
|
||||
name : 'Darwin for PowerPC';
|
||||
shortname : 'Darwin';
|
||||
flags : [tf_p_ext_support,tf_files_case_sensitive];
|
||||
flags : [tf_p_ext_support,tf_files_case_sensitive,tf_smartlink_sections];
|
||||
cpu : cpu_powerpc;
|
||||
unit_env : 'BSDUNITS';
|
||||
extradefines : 'UNIX;BSD;HASUNIX';
|
||||
@ -458,7 +458,7 @@ unit i_bsd;
|
||||
system : system_i386_darwin;
|
||||
name : 'Darwin for i386';
|
||||
shortname : 'Darwin';
|
||||
flags : [tf_p_ext_support,tf_files_case_sensitive];
|
||||
flags : [tf_p_ext_support,tf_files_case_sensitive,tf_smartlink_sections];
|
||||
cpu : cpu_i386;
|
||||
unit_env : 'BSDUNITS';
|
||||
extradefines : 'UNIX;BSD;HASUNIX';
|
||||
|
@ -519,7 +519,11 @@ begin
|
||||
|
||||
if (cs_link_smart in aktglobalswitches) and
|
||||
(tf_smartlink_sections in target_info.flags) then
|
||||
GCSectionsStr:='--gc-sections';
|
||||
if not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
|
||||
GCSectionsStr:='--gc-sections'
|
||||
else
|
||||
// warning: this option only exists for 32 bit under Mac OS X, maybe the default for 64 bit?
|
||||
GCSectionsStr:='-dead_strip';
|
||||
|
||||
If (cs_profile in aktmoduleswitches) or
|
||||
((Info.DynamicLinker<>'') and (not SharedLibFiles.Empty)) then
|
||||
|
Loading…
Reference in New Issue
Block a user