瀏覽代碼

Merged revisions 3233-3235 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

........
r3233 | jonas | 2006-04-16 20:25:20 +0200 (Sun, 16 Apr 2006) | 3 lines

* don't write individual names of all assembler files when generating
a smart linkable unit with -ap

........
r3234 | jonas | 2006-04-16 20:42:15 +0200 (Sun, 16 Apr 2006) | 2 lines

* made ar'ing of smartlinked libraries a lot faster

........
r3235 | jonas | 2006-04-16 20:43:28 +0200 (Sun, 16 Apr 2006) | 2 lines

* made ar'ing of smartlinked libraries a lot faster

........

git-svn-id: branches/fixes_2_0@4163 -

Jonas Maebe 19 年之前
父節點
當前提交
be1d7291f1
共有 3 個文件被更改,包括 20 次插入5 次删除
  1. 7 1
      compiler/assemble.pas
  2. 10 2
      compiler/link.pas
  3. 3 2
      compiler/systems.pas

+ 7 - 1
compiler/assemble.pas

@@ -596,7 +596,13 @@ Implementation
 {$ifdef hasunix}
         if DoPipe then
          begin
-           Message1(exec_i_assembling_pipe,asmfile);
+           if SmartAsm then
+            begin
+              if (SmartFilesCount<=1) then
+               Message1(exec_i_assembling_smart,name);
+            end
+           else
+             Message1(exec_i_assembling_pipe,asmfile);
            POpen(outfile,FindAssembler+' '+MakeCmdLine,'W');
          end
         else

+ 10 - 2
compiler/link.pas

@@ -660,6 +660,13 @@ begin
     nextcmd := cmdstr;
   until (not assigned(current)) or (not success);
 
+  if (target_ar.arfinishcmd <> '') then
+    begin
+      SplitBinCmd(target_ar.arfinishcmd,binstr,cmdstr);
+      Replace(cmdstr,'$LIB',maybequoted(current_module.staticlibfilename^));
+      success:=DoExec(binstr,cmdstr,false,true);
+    end;
+
 { Clean up }
   if not(cs_asm_leave in aktglobalswitches) then
    if not(cs_link_extern in aktglobalswitches) then
@@ -789,8 +796,9 @@ end;
     const
       ar_gnu_ar_info : tarinfo =
           (
-            id    : ar_gnu_ar;
-            arcmd : 'ar rs $LIB $FILES'
+            id          : ar_gnu_ar;
+            arcmd       : 'ar qS $LIB $FILES';
+            arfinishcmd : 'ar s $LIB'
           );
 
 initialization

+ 3 - 2
compiler/systems.pas

@@ -225,8 +225,9 @@ interface
 
        parinfo = ^tarinfo;
        tarinfo = record
-          id      : tar;
-          arcmd   : string[50];
+          id          : tar;
+          arcmd       : string[50];
+          arfinishcmd : string[10];
        end;
 
        presinfo = ^tresinfo;