Browse Source

atari: pass tos exe flags also to ld

Thorsten Otto 3 years ago
parent
commit
41d4e181ea
2 changed files with 10 additions and 4 deletions
  1. 9 3
      compiler/systems/t_atari.pas
  2. 1 1
      rtl/atari/system.pp

+ 9 - 3
compiler/systems/t_atari.pas

@@ -69,7 +69,7 @@ begin
    begin
    begin
     if not UseVLink then
     if not UseVLink then
      begin
      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
      end
     else
     else
      begin
      begin
@@ -253,10 +253,16 @@ begin
   GCSectionsStr:='';
   GCSectionsStr:='';
   DynLinkStr:='';
   DynLinkStr:='';
   MapStr:='';
   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
   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
   if (cs_link_strip in current_settings.globalswitches) then
     StripStr:='-s';
     StripStr:='-s';
   if rlinkpath<>'' then
   if rlinkpath<>'' then

+ 1 - 1
rtl/atari/system.pp

@@ -56,7 +56,7 @@ const
     UnusedHandle    = $ffff;
     UnusedHandle    = $ffff;
     StdInputHandle  = 0;
     StdInputHandle  = 0;
     StdOutputHandle = 1;
     StdOutputHandle = 1;
-    StdErrorHandle  = $ffff;
+    StdErrorHandle  = 2;
 
 
 var
 var
     args: PChar;
     args: PChar;