* Enabled -Xm switch for NDS and GBA and switched from abi_default to abi_eabi

* Fixed NDS libfat linking

git-svn-id: trunk@13664 -
This commit is contained in:
Legolas 2009-09-06 18:47:22 +00:00
parent 1e5b89049a
commit 00a3dae729
5 changed files with 39 additions and 28 deletions

View File

@ -34,8 +34,8 @@ unit i_gba;
system : system_arm_gba;
name : 'GameBoy Advance';
shortname : 'gba';
flags : [tf_needs_symbol_size,tf_files_case_sensitive,tf_use_function_relative_addresses
,tf_smartlink_sections,tf_requires_proper_alignment];
flags : [tf_needs_symbol_size,tf_files_case_sensitive,
tf_use_function_relative_addresses,tf_requires_proper_alignment,tf_smartlink_sections];
cpu : cpu_arm;
unit_env : '';
extradefines : '';
@ -88,7 +88,7 @@ unit i_gba;
);
first_parm_offset : 8;
stacksize : 16384;
abi : abi_default
abi : abi_eabi
);
implementation

View File

@ -1,5 +1,5 @@
{
This unit implements support information structures for GameBoy Advance
This unit implements support information structures for Nintendo DS
Copyright (c) 1998-2002 by Peter Vreman
@ -34,8 +34,8 @@ unit i_nds;
system : system_arm_nds;
name : 'Nintendo DS';
shortname : 'nds';
flags : [tf_needs_symbol_size,tf_files_case_sensitive,tf_use_function_relative_addresses
,tf_requires_proper_alignment,tf_smartlink_sections];
flags : [tf_needs_symbol_size,tf_files_case_sensitive,
tf_use_function_relative_addresses,tf_requires_proper_alignment,tf_smartlink_sections];
cpu : cpu_arm;
unit_env : '';
extradefines : '';
@ -88,7 +88,7 @@ unit i_nds;
);
first_parm_offset : 8;
stacksize : $3CFF; //15615? or 16384?;
abi : abi_default
abi : abi_eabi
);
implementation

View File

@ -30,6 +30,7 @@ interface
implementation
uses
aasmbase,
SysUtils,
cutils,cfileutl,cclasses,
globtype,globals,systems,verbose,script,fmodule,i_gba,link;
@ -554,14 +555,22 @@ var
StaticStr,
GCSectionsStr,
DynLinkStr,
MapStr,
StripStr: string;
begin
{ for future use }
StaticStr:='';
StripStr:='';
DynLinkStr:='';
MapStr:='';
GCSectionsStr:='--gc-sections';
if (cs_link_strip in current_settings.globalswitches) and
not(cs_link_separate_dbg_file in current_settings.globalswitches) then
StripStr:='-s';
if (cs_link_map in current_settings.globalswitches) then
StripStr:='-Map '+maybequoted(ChangeFileExt(current_module.exefilename^,'.map'));
if create_smartlink_sections then
GCSectionsStr:='--gc-sections';
//if not(cs_link_extern in current_settings.globalswitches) then
if not(cs_link_nolink in current_settings.globalswitches) then
Message1(exec_i_linking,current_module.exefilename^);
@ -572,24 +581,15 @@ begin
{ Call linker }
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
Replace(cmdstr,'$OPT',Info.ExtraOptions);
if not(cs_link_on_target in current_settings.globalswitches) then
begin
Replace(cmdstr,'$EXE',(maybequoted(ScriptFixFileName(ChangeFileExt(current_module.exefilename^,'.elf')))));
Replace(cmdstr,'$RES',(maybequoted(ScriptFixFileName(outputexedir+Info.ResName))));
Replace(cmdstr,'$STATIC',StaticStr);
Replace(cmdstr,'$STRIP',StripStr);
Replace(cmdstr,'$GCSECTIONS',GCSectionsStr);
Replace(cmdstr,'$DYNLINK',DynLinkStr);
end
else
begin
Replace(cmdstr,'$EXE',maybequoted(ScriptFixFileName(ChangeFileExt(current_module.exefilename^,'.elf'))));
Replace(cmdstr,'$RES',maybequoted(ScriptFixFileName(outputexedir+Info.ResName)));
Replace(cmdstr,'$STATIC',StaticStr);
Replace(cmdstr,'$STRIP',StripStr);
Replace(cmdstr,'$GCSECTIONS',GCSectionsStr);
Replace(cmdstr,'$DYNLINK',DynLinkStr);
end;
Replace(cmdstr,'$EXE',(maybequoted(ScriptFixFileName(ChangeFileExt(current_module.exefilename^,'.elf')))));
Replace(cmdstr,'$RES',(maybequoted(ScriptFixFileName(outputexedir+Info.ResName))));
Replace(cmdstr,'$STATIC',StaticStr);
Replace(cmdstr,'$STRIP',StripStr);
Replace(cmdstr,'$GCSECTIONS',GCSectionsStr);
Replace(cmdstr,'$MAP',MapStr);
Replace(cmdstr,'$DYNLINK',DynLinkStr);
success:=DoExec(FindUtil(utilsprefix+BinStr),cmdstr,true,false);
{ Remove ReponseFile }

View File

@ -1,6 +1,6 @@
{
This unit implements support import,export,link routines
for the (arm) GameBoy Advance target
for the (arm) Nintendo DS target
Copyright (c) 2001-2002 by Peter Vreman
@ -30,6 +30,7 @@ interface
implementation
uses
aasmbase,
SysUtils,
cutils,cfileutl,cclasses,
globtype,globals,systems,verbose,script,fmodule,i_nds,link;
@ -705,19 +706,27 @@ var
StaticStr,
GCSectionsStr,
DynLinkStr,
MapStr,
StripStr: string;
preName: string;
begin
{ for future use }
StaticStr:='';
StripStr:='';
MapStr:='';
DynLinkStr:='';
case apptype of
app_arm9: preName:='.nef';
app_arm7: preName:='.nlf';
end;
GCSectionsStr:='--gc-sections';
if (cs_link_strip in current_settings.globalswitches) and
not(cs_link_separate_dbg_file in current_settings.globalswitches) then
StripStr:='-s';
if (cs_link_map in current_settings.globalswitches) then
StripStr:='-Map '+maybequoted(ChangeFileExt(current_module.exefilename^,'.map'));
if create_smartlink_sections then
GCSectionsStr:='--gc-sections';
if not(cs_link_nolink in current_settings.globalswitches) then
Message1(exec_i_linking,current_module.exefilename^);
@ -733,6 +742,7 @@ begin
Replace(cmdstr,'$STATIC',StaticStr);
Replace(cmdstr,'$STRIP',StripStr);
Replace(cmdstr,'$GCSECTIONS',GCSectionsStr);
Replace(cmdstr,'$MAP',MapStr);
Replace(cmdstr,'$DYNLINK',DynLinkStr);
success:=DoExec(FindUtil(utilsprefix+BinStr),cmdstr,true,false);

View File

@ -14,6 +14,7 @@ uses
ctypes, nds9;
{$linklib filesystem}
{$linklib fat}
{$linklib nds9}
{$linklib c}