+ supported scripted sdcc-sdar

git-svn-id: branches/z80@45073 -
This commit is contained in:
nickysn 2020-04-25 15:39:46 +00:00
parent 8bd38e0e29
commit fdbf1f4b7f
3 changed files with 17 additions and 5 deletions

View File

@ -867,7 +867,8 @@ Implementation
scripted_ar:=(target_ar.id=ar_gnu_ar_scripted) or
(target_ar.id=ar_watcom_wlib_omf_scripted);
(target_ar.id=ar_watcom_wlib_omf_scripted) or
(target_ar.id=ar_sdcc_sdar_scripted);
if scripted_ar then
begin
@ -876,7 +877,7 @@ Implementation
Assign(script, scriptfile);
Rewrite(script);
try
if (target_ar.id=ar_gnu_ar_scripted) then
if (target_ar.id in [ar_gnu_ar_scripted,ar_sdcc_sdar_scripted]) then
writeln(script, 'CREATE ' + current_module.staticlibfilename)
else { wlib case }
writeln(script,'-q -fo -c -b '+
@ -884,13 +885,13 @@ Implementation
current := TCmdStrListItem(SmartLinkOFiles.First);
while current <> nil do
begin
if (target_ar.id=ar_gnu_ar_scripted) then
if (target_ar.id in [ar_gnu_ar_scripted,ar_sdcc_sdar_scripted]) then
writeln(script, 'ADDMOD ' + current.str)
else
writeln(script,'+' + current.str);
current := TCmdStrListItem(current.next);
end;
if (target_ar.id=ar_gnu_ar_scripted) then
if (target_ar.id in [ar_gnu_ar_scripted,ar_sdcc_sdar_scripted]) then
begin
writeln(script, 'SAVE');
writeln(script, 'END');
@ -1750,6 +1751,15 @@ Implementation
arfinishcmd : 'sdar s $LIB'
);
ar_sdcc_sdar_scripted_info : tarinfo =
(
id : ar_sdcc_sdar_scripted;
addfilecmd : '';
arfirstcmd : '';
arcmd : 'sdar -M < $SCRIPT';
arfinishcmd : ''
);
initialization
RegisterAr(ar_gnu_ar_info);
@ -1758,4 +1768,5 @@ initialization
RegisterAr(ar_watcom_wlib_omf_info);
RegisterAr(ar_watcom_wlib_omf_scripted_info);
RegisterAr(ar_sdcc_sdar_info);
RegisterAr(ar_sdcc_sdar_scripted_info);
end.

View File

@ -308,6 +308,7 @@
,ar_watcom_wlib_omf
,ar_watcom_wlib_omf_scripted
,ar_sdcc_sdar
,ar_sdcc_sdar_scripted
);
tres = (res_none

View File

@ -65,7 +65,7 @@ unit i_zxspectrum;
assemextern : as_sdcc_sdasz80;
link : ld_none;
linkextern : ld_zxspectrum;
ar : ar_sdcc_sdar;
ar : ar_sdcc_sdar_scripted;
res : res_none;
dbg : dbg_dwarf2;
script : script_unix;