Browse Source

* used ld directly rather than libtool to link dynamic libraries, because
libtool from Xcode 3.2 (Mac OS X 10.6) does not support all new linker
options (in particular -no_order_inits and -no_order_data, both of
which must be specified when compiling dynamic libraries with FPC and
Xcode 3.2)

git-svn-id: trunk@13645 -

Jonas Maebe 16 năm trước cách đây
mục cha
commit
6d0eda6e4a
1 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 5 2
      compiler/systems/t_bsd.pas

+ 5 - 2
compiler/systems/t_bsd.pas

@@ -166,7 +166,7 @@ begin
              ExeCmd[1]:='ld $PRTOBJ $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -no_dead_strip_inits_and_terms -multiply_defined suppress -L. -o $EXE `cat $RES`';
 {$endif ndef cpu64bitaddr}
              if (apptype<>app_bundle) then
-               DllCmd[1]:='libtool $PRTOBJ $OPT -no_dead_strip_inits_and_terms -dynamic -multiply_defined suppress -L. -o $EXE `cat $RES`'
+               DllCmd[1]:='ld $PRTOBJ $OPT -no_dead_strip_inits_and_terms -dynamic -dylib -multiply_defined suppress -L. -o $EXE `cat $RES`'
              else
                DllCmd[1]:='ld $PRTOBJ $OPT -no_dead_strip_inits_and_terms -dynamic -bundle -multiply_defined suppress -L. -o $EXE `cat $RES`'
            end
@@ -232,7 +232,10 @@ begin
             result:='/usr/lib/bundle1.o'
         end
       else
-        result:=''
+        begin
+          if not librarysearchpath.FindFile('dylib1.o',false,result) then
+            result:='/usr/lib/bundle1.o'
+        end;
     end;
 end;