mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-20 05:09:22 +02:00
* Fix getlibraryfilename: do not add .so if output already contains it, do not add lib prefix if output already contains it. Take care of -o option
This commit is contained in:
parent
06ea6bc29c
commit
22dcf79ac7
@ -9898,11 +9898,20 @@ end;
|
||||
|
||||
|
||||
function TTarget.GetBinFileBase: String;
|
||||
|
||||
var
|
||||
S : String;
|
||||
|
||||
begin
|
||||
if FExeName <> '' then
|
||||
Result := FExeName
|
||||
else
|
||||
begin
|
||||
Result:=Name;
|
||||
for S in Options do
|
||||
if Copy(S,1,2)='-o' then
|
||||
Result:=Copy(S,3);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -9919,9 +9928,12 @@ end;
|
||||
|
||||
function TTarget.GetLibraryFileName(AOS : TOS): String;
|
||||
begin
|
||||
result := AddLibraryExtension(GetBinFileBase, AOS);
|
||||
Result:=GetBinFileBase;
|
||||
if ExtractFileExt(Result)='' then
|
||||
result := AddLibraryExtension(Result, AOS);
|
||||
if aOS in AllUnixOSes then
|
||||
Result:='lib'+Result;
|
||||
if Copy(Result,1,3)<>'lib' then
|
||||
Result:='lib'+Result;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user