Sfoglia il codice sorgente

AROS: improved version of the previous commit, pass the stripping option to the linker instead, seems to work.

git-svn-id: trunk@28466 -
Károly Balogh 11 anni fa
parent
commit
03a0f7b409
1 ha cambiato i file con 5 aggiunte e 17 eliminazioni
  1. 5 17
      compiler/systems/t_aros.pas

+ 5 - 17
compiler/systems/t_aros.pas

@@ -93,8 +93,7 @@ begin
     {       properly when calling the underlying GNU LD. (FIXME?)       }
     { This means paths with spaces in them are not supported for now on AROS.   }
     { So for example no Ram Disk: usage for anything which must be linked. (KB) }
-    ExeCmd[1]:='collect-aros $OPT -d -n -o $EXE $RES';
-    ExeCmd[2]:='strip --strip-unneeded $EXE';
+    ExeCmd[1]:='collect-aros $OPT $STRIP -d -n -o $EXE $RES';
     //ExeCmd[1]:='ld $OPT -d -n -o $EXE $RES';
   end;
 end;
@@ -223,35 +222,24 @@ end;
 
 function TLinkeraros.Makearos386Exe: boolean;
 var
-  success: boolean;
   BinStr,
   CmdStr  : TCmdStr;
   StripStr: string[40];
 begin
   StripStr:='';
+  if (cs_link_strip in current_settings.globalswitches) then StripStr:='-s';
 
   { Call linker }
   SplitBinCmd(Info.ExeCmd[1],BinStr,CmdStr);
   Replace(cmdstr,'$OPT',Info.ExtraOptions);
   Replace(cmdstr,'$EXE',maybequoted(ScriptFixFileName(current_module.exefilename)));
   Replace(cmdstr,'$RES',maybequoted(ScriptFixFileName(outputexedir+Info.ResName)));
+  Replace(cmdstr,'$STRIP',StripStr);
 
   { Replace(cmdstr,'$EXE',Unix2AmigaPath(maybequoted(ScriptFixFileName(current_module.exefilename^))));
-    Replace(cmdstr,'$RES',Unix2AmigaPath(maybequoted(ScriptFixFileName(outputexedir+Info.ResName))));
-    Replace(cmdstr,'$STRIP',StripStr); }
-
-  success:=DoExec(FindUtil(utilsprefix+BinStr),CmdStr,true,false);
-
-  { AROS seems to need a separate strip command, it may be possible to do it
-    in the linking command, but this works so fine for now. (KB) }
-  if success and (cs_link_strip in current_settings.globalswitches) then
-    begin
-      SplitBinCmd(Info.ExeCmd[2],binstr,cmdstr);
-      Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename));
-      success:=DoExec(FindUtil(utilsprefix+binstr),cmdstr,true,false);
-    end;
+    Replace(cmdstr,'$RES',Unix2AmigaPath(maybequoted(ScriptFixFileName(outputexedir+Info.ResName))));}
 
-  Makearos386Exe:=success;
+  Makearos386Exe:=DoExec(FindUtil(utilsprefix+BinStr),CmdStr,true,false);
 end;