summaryrefslogtreecommitdiff
path: root/compiler/options.pas
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-02-23 22:48:02 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-02-23 22:48:02 +0000
commita51d825e95fc9e2e1f6f4efd3b6516d2048f1d42 (patch)
tree517cfafeb9f1732a7bd2ac3d114c2556e79e8682 /compiler/options.pas
parent1543a20c2de3380a54a12d0e39cbc57a1c32b402 (diff)
downloadfpc-a51d825e95fc9e2e1f6f4efd3b6516d2048f1d42.tar.gz
* only prepend the sysroot path to -Fl paths if these paths are absolute;
if they are not, they should be interpreted relative to the current directory instead (solves compiling tests that depend on a library when cross-testing for a platform with a sysroot) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@29825 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/options.pas')
-rw-r--r--compiler/options.pas12
1 files changed, 9 insertions, 3 deletions
diff --git a/compiler/options.pas b/compiler/options.pas
index 0fe03f34e4..5dc6c691e5 100644
--- a/compiler/options.pas
+++ b/compiler/options.pas
@@ -1473,10 +1473,16 @@ begin
Message2(option_obsolete_switch_use_new,'-Fg','-Fl');
'l' :
begin
- if ispara then
- ParaLibraryPath.AddPath(sysrootpath,More,false)
+ if path_absolute(More) then
+ if ispara then
+ ParaLibraryPath.AddPath(sysrootpath,More,false)
+ else
+ LibrarySearchPath.AddPath(sysrootpath,More,true)
else
- LibrarySearchPath.AddPath(sysrootpath,More,true);
+ if ispara then
+ ParaLibraryPath.AddPath('',More,false)
+ else
+ LibrarySearchPath.AddPath('',More,true);
end;
'L' :
begin