diff --git a/compiler/systems/t_atari.pas b/compiler/systems/t_atari.pas index 9d29813e9f..4277d1c708 100644 --- a/compiler/systems/t_atari.pas +++ b/compiler/systems/t_atari.pas @@ -69,7 +69,7 @@ begin begin if not UseVLink then begin - ExeCmd[1]:='ld $DYNLINK $OPT $STRIP $MAP -d -n -o $EXE -T $RES'; + ExeCmd[1]:='ld $DYNLINK $FLAGS $OPT $STRIP $MAP -d -n -o $EXE -T $RES'; end else begin @@ -253,10 +253,16 @@ begin GCSectionsStr:=''; DynLinkStr:=''; MapStr:=''; - FlagsStr:='-tos-flags '+tostr(ataritos_exe_flags); + if UseVLink then + FlagsStr:='-tos-flags '+tostr(ataritos_exe_flags) + else + FlagsStr:='--mprg-flags '+tostr(ataritos_exe_flags); if (cs_link_map in current_settings.globalswitches) then - MapStr:='-M'+maybequoted(ScriptFixFileName(current_module.mapfilename)); + if UseVLink then + MapStr:='-M'+maybequoted(ScriptFixFileName(current_module.mapfilename)) + else + MapStr:='-Map '+maybequoted(ScriptFixFileName(current_module.mapfilename)); if (cs_link_strip in current_settings.globalswitches) then StripStr:='-s'; if rlinkpath<>'' then diff --git a/rtl/atari/system.pp b/rtl/atari/system.pp index 751f9c1453..d097c6eddf 100644 --- a/rtl/atari/system.pp +++ b/rtl/atari/system.pp @@ -56,7 +56,7 @@ const UnusedHandle = $ffff; StdInputHandle = 0; StdOutputHandle = 1; - StdErrorHandle = $ffff; + StdErrorHandle = 2; var args: PChar;