Преглед изворни кода

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

r1588 (jonas)
* use an absolute output path for the linker when creating shared libraries,
so they can be used regardless where the executable is located

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

Jonas Maebe пре 20 година
родитељ
комит
b85c59d9f7
1 измењених фајлова са 13 додато и 0 уклоњено
  1. 13 0
      compiler/systems/t_bsd.pas

+ 13 - 0
compiler/systems/t_bsd.pas

@@ -35,6 +35,11 @@ implementation
     gdb,
 {$endif gdb}
     cutils,cclasses,
+{$ifdef USE_SYSUTILS}
+    sysutils,
+{$else USE_SYSUTILS}
+    dos,
+{$endif USE_SYSUTILS}
     verbose,systems,globtype,globals,
     symconst,script,
     fmodule,aasmbase,aasmtai,aasmcpu,cpubase,symsym,symdef,
@@ -587,7 +592,15 @@ begin
 
 { Call linker }
   SplitBinCmd(Info.DllCmd[1],binstr,cmdstr);
+{$ifndef darwin}
   Replace(cmdstr,'$EXE',maybequoted(current_module.sharedlibfilename^));
+{$else darwin}
+{$ifdef USE_SYSUTILS}
+  Replace(cmdstr,'$EXE',maybequoted(ExpandFileName(current_module.sharedlibfilename^)));
+{$else USE_SYSUTILS}
+  Replace(cmdstr,'$EXE',maybequoted(FExpand(current_module.sharedlibfilename^)));
+{$endif USE_SYSUTILS}
+{$endif darwin}
   Replace(cmdstr,'$OPT',Info.ExtraOptions);
   Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
   Replace(cmdstr,'$INIT',InitStr);