Browse Source

* urgent fix.

marco 23 years ago
parent
commit
1f5b2f26ba
1 changed files with 12 additions and 4 deletions
  1. 12 4
      compiler/targets/t_fbsd.pas

+ 12 - 4
compiler/targets/t_fbsd.pas

@@ -258,6 +258,8 @@ Var
   s,s1,s2      : string;
   s,s1,s2      : string;
   linkdynamic,
   linkdynamic,
   linklibc     : boolean;
   linklibc     : boolean;
+  Fl1,Fl2      : Boolean;
+
 begin
 begin
   WriteResponseFile:=False;
   WriteResponseFile:=False;
 { set special options for some targets }
 { set special options for some targets }
@@ -381,12 +383,15 @@ begin
   { objects which must be at the end }
   { objects which must be at the end }
   if linklibc then
   if linklibc then
    begin
    begin
-     if librarysearchpath.FindFile('crtend.o',s1) or
-        librarysearchpath.FindFile('crtn.o',s2) then
+     Fl1:=librarysearchpath.FindFile('crtend.o',s1)
+     Fl2:=librarysearchpath.FindFile('crtn.o',s2)
+     if Fl1 or Fl2 then
       begin
       begin
         LinkRes.Add('INPUT(');
         LinkRes.Add('INPUT(');
+         If Fl1 Then 
         LinkRes.AddFileName(s1);
         LinkRes.AddFileName(s1);
-        LinkRes.AddFileName(s2);
+        If Fl2 Then
+         LinkRes.AddFileName(s2);
         LinkRes.Add(')');
         LinkRes.Add(')');
       end;
       end;
    end;
    end;
@@ -707,7 +712,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.22  2002-07-01 18:46:34  peter
+  Revision 1.23  2002-07-24 13:10:22  marco
+   * urgent fix.
+
+  Revision 1.22  2002/07/01 18:46:34  peter
     * internal linker
     * internal linker
     * reorganized aasm layer
     * reorganized aasm layer