瀏覽代碼

* fixed rtl package building

git-svn-id: trunk@1763 -
florian 20 年之前
父節點
當前提交
f9b05b2cdf
共有 3 個文件被更改,包括 24 次插入9 次删除
  1. 1 1
      compiler/cresstr.pas
  2. 20 6
      compiler/utils/ppumove.pp
  3. 3 2
      compiler/x86/nx86cnv.pas

+ 1 - 1
compiler/cresstr.pas

@@ -198,7 +198,7 @@ begin
      R:=TResourceStringItem(R.Next);
    end;
   asmlist[al_resourcestrings].concat(tai_symbol_end.createname(
-    current_module.modulename^+'_'+'RESOURCESTRINGLIST'));
+    make_mangledname('RESOURCESTRINGLIST',current_module.localsymtable,'')));
 end;
 
 

+ 20 - 6
compiler/utils/ppumove.pp

@@ -80,6 +80,7 @@ Var
   Buffer      : Pointer;
   ObjFiles    : PLinkOEnt;
   BatchFile   : Text;
+  Libs        : ansistring;
 
 {*****************************************************************************
                                  Helpers
@@ -372,10 +373,22 @@ begin
   { don't write ibend, that's written automaticly }
     if b<>ibend then
      begin
-       repeat
-         inppu.getdatabuf(buffer^,bufsize,l);
-         outppu.putdata(buffer^,l);
-       until l<bufsize;
+       if b=iblinkothersharedlibs then
+         begin
+           while not inppu.endofentry do
+             begin
+               s:=inppu.getstring;
+               m:=inppu.getlongint;
+               libs:=libs+' -l'+s;
+               outppu.putstring(s);
+               outppu.putlongint(m);
+             end;
+         end
+       else
+         repeat
+           inppu.getdatabuf(buffer^,bufsize,l);
+           outppu.putdata(buffer^,l);
+         until l<bufsize;
        outppu.writeentry(b);
      end;
   until b=ibend;
@@ -458,13 +471,13 @@ begin
      exit;
    end;
   If not Quiet then
-   WriteLn(names);
+    WriteLn(names+Libs);
 { Run ar or ld to create the lib }
   If MakeStatic then
    Err:=Shell(arbin+' rs '+outputfile+' '+names)<>0
   else
    begin
-     Err:=Shell(ldbin+' -shared -o '+OutputFile+' '+names)<>0;
+     Err:=Shell(ldbin+' -shared -o '+OutputFile+' '+names+' '+libs)<>0;
      if not Err then
       Shell(stripbin+' --strip-unneeded '+OutputFile);
    end;
@@ -545,6 +558,7 @@ end;
 var
   i : longint;
 begin
+  Libs:='';
   ProcessOpts;
 { Write Header }
   if not Quiet then

+ 3 - 2
compiler/x86/nx86cnv.pas

@@ -255,7 +255,7 @@ implementation
                        asmlist[al_typedconsts].concat(Tai_const.Create_32bit(0));
                        asmlist[al_typedconsts].concat(Tai_const.Create_32bit($43f00000));
                        { simplify for PIC }
-                       cg.make_simple_ref(exprasmlist,href);
+                       tcgx86(cg).make_simple_ref(exprasmlist,href);
                        exprasmlist.concat(taicpu.op_ref_reg(A_ADDSD,S_NO,href,location.register));
                      end
                    else if is_single(resulttype.def) then
@@ -263,7 +263,7 @@ implementation
                        { single(2^64) }
                        asmlist[al_typedconsts].concat(Tai_const.Create_32bit($5f800000));
                        { simplify for PIC }
-                       cg.make_simple_ref(exprasmlist,href);
+                       tcgx86(cg).make_simple_ref(exprasmlist,href);
                        exprasmlist.concat(taicpu.op_ref_reg(A_ADDSS,S_NO,href,location.register));
                      end
                    else
@@ -369,6 +369,7 @@ implementation
                    asmlist[al_typedconsts].concat(Tai_const.Create_32bit(longint ($80000000)));
                    asmlist[al_typedconsts].concat(Tai_const.Create_32bit($0000403f));
                    reference_reset_symbol(href,l1,0);
+                   tcgx86(cg).make_simple_ref(exprasmlist,href);
                    exprasmlist.concat(Taicpu.Op_ref(A_FLD,S_FX,href));
                    exprasmlist.concat(Taicpu.Op_reg_reg(A_FADDP,S_NO,NR_ST,NR_ST1));
                    cg.a_label(exprasmlist,l2);