mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 00:29:20 +02:00
* Fix for resolving libc-path on non-english Linux
git-svn-id: trunk@31906 -
This commit is contained in:
parent
239fc27c38
commit
5f46057eea
@ -2608,6 +2608,13 @@ function GetDefaultLibGCCDir(CPU : TCPU;OS: TOS; var ErrorMessage: string): stri
|
|||||||
{$ifdef HAS_UNIT_PROCESS}
|
{$ifdef HAS_UNIT_PROCESS}
|
||||||
ExecResult:=GetCompilerInfo(GccExecutable,'-v '+GCCParams, True);
|
ExecResult:=GetCompilerInfo(GccExecutable,'-v '+GCCParams, True);
|
||||||
libgccFilename:=Get4thWord(ExecResult);
|
libgccFilename:=Get4thWord(ExecResult);
|
||||||
|
// Use IsRelativePath to check if the 4th word is an (absolute) path.
|
||||||
|
// This depends on the language settings. In English the 4th word is
|
||||||
|
// empty, if this particular gcc version does not return the libgcc-
|
||||||
|
// filename on -v. But in other languages (e.g. Dutch) it may be another
|
||||||
|
// word.
|
||||||
|
if IsRelativePath(libgccFilename) then
|
||||||
|
libgccFilename:='';
|
||||||
if libgccFilename='' then
|
if libgccFilename='' then
|
||||||
libgccFilename:=GetCompilerInfo(GccExecutable,'--print-libgcc-file-name '+GCCParams, False);
|
libgccFilename:=GetCompilerInfo(GccExecutable,'--print-libgcc-file-name '+GCCParams, False);
|
||||||
result := ExtractFileDir(libgccFilename);
|
result := ExtractFileDir(libgccFilename);
|
||||||
|
Loading…
Reference in New Issue
Block a user