summaryrefslogtreecommitdiff
path: root/compiler/systems
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2019-11-09 10:59:39 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2019-11-09 10:59:39 +0000
commitf1b796b03b684f68738665f74dd49d2cd700ec48 (patch)
tree6c1bbe4b46ced82631da253528a90d766cd4052a /compiler/systems
parent33cb093a96eb15a21c8766dec93b73e252f2a6e6 (diff)
downloadfpc-f1b796b03b684f68738665f74dd49d2cd700ec48.tar.gz
--- Merging r43279 into '.':
U compiler/cfileutl.pas U compiler/options.pas U compiler/systems/t_bsd.pas C compiler/systems/t_linux.pas --- Merging r43302 into '.': G compiler/cfileutl.pas --- Merging r43306 into '.': G compiler/cfileutl.pas --- Merging r43312 into '.': G compiler/cfileutl.pas G compiler/options.pas U compiler/scandir.pas U compiler/systems/t_aix.pas U compiler/systems/t_beos.pas G compiler/systems/t_bsd.pas U compiler/systems/t_haiku.pas C compiler/systems/t_linux.pas U compiler/systems/t_macos.pas U compiler/systems/t_sunos.pas git-svn-id: https://svn.freepascal.org/svn/fpc/branches/fixes_3_2@43421 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/systems')
-rw-r--r--compiler/systems/t_aix.pas4
-rw-r--r--compiler/systems/t_beos.pas9
-rw-r--r--compiler/systems/t_bsd.pas6
-rw-r--r--compiler/systems/t_haiku.pas22
-rw-r--r--compiler/systems/t_linux.pas48
-rw-r--r--compiler/systems/t_macos.pas2
-rw-r--r--compiler/systems/t_sunos.pas4
7 files changed, 45 insertions, 50 deletions
diff --git a/compiler/systems/t_aix.pas b/compiler/systems/t_aix.pas
index eb57095ad1..796b5669ad 100644
--- a/compiler/systems/t_aix.pas
+++ b/compiler/systems/t_aix.pas
@@ -101,9 +101,9 @@ begin
Inherited Create;
if not Dontlinkstdlibpath then
if not(cs_profile in current_settings.moduleswitches) then
- LibrarySearchPath.AddPath(sysrootpath,'/usr/lib;/usr/X11R6/lib;/opt/freeware/lib',true)
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib;=/usr/X11R6/lib;=/opt/freeware/lib',true)
else
- LibrarySearchPath.AddPath(sysrootpath,'/usr/lib/profiled;/usr/X11R6/lib;/opt/freeware/lib',true)
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/profiled;=/usr/X11R6/lib;=/opt/freeware/lib',true)
end;
diff --git a/compiler/systems/t_beos.pas b/compiler/systems/t_beos.pas
index df06787792..9765f6fadb 100644
--- a/compiler/systems/t_beos.pas
+++ b/compiler/systems/t_beos.pas
@@ -176,14 +176,15 @@ begin
Inherited Create;
s:=GetEnvironmentVariable('BELIBRARIES');
{ convert to correct format in case under unix system }
- for i:=1 to length(s) do
- if s[i] = ':' then
- s[i] := ';';
+ Replace(s,':',';=');
+ Insert('=',s,1);
+ if s[length(s)]='=' then
+ setlength(s,length(s)-1);
{ just in case we have a single path : add the ending ; }
{ since that is what the compiler expects. }
if pos(';',s) = 0 then
s:=s+';';
- LibrarySearchPath.AddPath(sysrootpath,s,true); {format:'path1;path2;...'}
+ LibrarySearchPath.AddLibraryPath(sysrootpath,s,true); {format:'path1;path2;...'}
end;
diff --git a/compiler/systems/t_bsd.pas b/compiler/systems/t_bsd.pas
index 5a3397542e..deaa06dfce 100644
--- a/compiler/systems/t_bsd.pas
+++ b/compiler/systems/t_bsd.pas
@@ -152,11 +152,11 @@ begin
if not Dontlinkstdlibpath Then
if target_info.system in systems_darwin then
{ Mac OS X doesn't have a /lib }
- LibrarySearchPath.AddPath(sysrootpath,'/usr/lib',true)
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib',true)
else if target_info.system in systems_openbsd then
- LibrarySearchPath.AddPath(sysrootpath,'/usr/lib;$OPENBSD_X11BASE/lib;$OPENBSD_LOCALBASE/lib',true)
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib;=$OPENBSD_X11BASE/lib;=$OPENBSD_LOCALBASE/lib',true)
else
- LibrarySearchPath.AddPath(sysrootpath,'/lib;/usr/lib;/usr/X11R6/lib',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib;=/usr/lib;=/usr/X11R6/lib',true);
end;
diff --git a/compiler/systems/t_haiku.pas b/compiler/systems/t_haiku.pas
index 8fc322260e..9860ecf342 100644
--- a/compiler/systems/t_haiku.pas
+++ b/compiler/systems/t_haiku.pas
@@ -172,11 +172,11 @@ end;
Constructor TLinkerHaiku.Create;
const
- HomeNonPackagedDevLib = '/boot/home/config/non-packaged/develop/lib';
- HomeDevLib = '/boot/home/config/develop/lib';
- CommonNonPackagedDevLib = '/boot/common/non-packaged/develop/lib';
- CommonDevLib = '/boot/common/develop/lib';
- SystemDevLib = '/boot/system/develop/lib';
+ HomeNonPackagedDevLib = '=/boot/home/config/non-packaged/develop/lib';
+ HomeDevLib = '=/boot/home/config/develop/lib';
+ CommonNonPackagedDevLib = '=/boot/common/non-packaged/develop/lib';
+ CommonDevLib = '=/boot/common/develop/lib';
+ SystemDevLib = '=/boot/system/develop/lib';
var
s : string;
i : integer;
@@ -195,13 +195,13 @@ begin
// Under Haiku with package management, BELIBRARIES is empty by default
// We have to look at those system paths, in this order.
// User can still customize BELIBRARIES. That is why it is looked at first.
- LibrarySearchPath.AddPath(sysrootpath,s,true); {format:'path1;path2;...'}
+ LibrarySearchPath.AddLibraryPath(sysrootpath,s,true); {format:'path1;path2;...'}
- LibrarySearchPath.AddPath(sysrootpath, HomeNonPackagedDevLib, false);
- LibrarySearchPath.AddPath(sysrootpath, HomeDevLib, false);
- LibrarySearchPath.AddPath(sysrootpath, CommonNonPackagedDevLib, false);
- LibrarySearchPath.AddPath(sysrootpath, CommonDevLib, false);
- LibrarySearchPath.AddPath(sysrootpath, SystemDevLib, false);
+ LibrarySearchPath.AddLibraryPath(sysrootpath, HomeNonPackagedDevLib, false);
+ LibrarySearchPath.AddLibraryPath(sysrootpath, HomeDevLib, false);
+ LibrarySearchPath.AddLibraryPath(sysrootpath, CommonNonPackagedDevLib, false);
+ LibrarySearchPath.AddLibraryPath(sysrootpath, CommonDevLib, false);
+ LibrarySearchPath.AddLibraryPath(sysrootpath, SystemDevLib, false);
end;
diff --git a/compiler/systems/t_linux.pas b/compiler/systems/t_linux.pas
index 535fe23483..e076fa408a 100644
--- a/compiler/systems/t_linux.pas
+++ b/compiler/systems/t_linux.pas
@@ -127,29 +127,23 @@ begin
begin
{$ifdef x86_64}
{ some linuxes might not have the lib64 variants (Arch, LFS }
- if PathExists('/usr/X11R6/lib64',true) then
- LibrarySearchPath.AddPath(sysrootpath,'/usr/X11R6/lib64',true)
- else if PathExists('/usr/X11R6/lib',true) then
- LibrarySearchPath.AddPath(sysrootpath,'/usr/X11R6/lib',true);
-
- if PathExists('/usr/lib64',true) then
- LibrarySearchPath.AddPath(sysrootpath,'/usr/lib64',true)
- else if PathExists('/usr/lib',true) then
- LibrarySearchPath.AddPath(sysrootpath,'/usr/lib',true);
-
+ { don't use PathExists checks, as we need to take sysroots and
+ cross-compiling into account }
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/X11R6/lib',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/X11R6/lib64',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib64',true);
{ /lib64 should be the really first, so add it before everything else }
- if PathExists('/lib64',true) then
- LibrarySearchPath.AddPath(sysrootpath,'/lib64',true)
- else if PathExists('/lib',true) then
- LibrarySearchPath.AddPath(sysrootpath,'/lib',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib64',true);
{$else}
{$ifdef powerpc64}
if target_info.abi<>abi_powerpc_elfv2 then
- LibrarySearchPath.AddPath(sysrootpath,'/lib64;/usr/lib64;/usr/X11R6/lib64',true)
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib64;=/usr/lib64;=/usr/X11R6/lib64',true)
else
- LibrarySearchPath.AddPath(sysrootpath,'/lib64;/usr/lib/powerpc64le-linux-gnu;/usr/X11R6/powerpc64le-linux-gnu',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib64;=/usr/lib/powerpc64le-linux-gnu;=/usr/X11R6/powerpc64le-linux-gnu',true);
{$else powerpc64}
- LibrarySearchPath.AddPath(sysrootpath,'/lib;/usr/lib;/usr/X11R6/lib',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib;=/usr/lib;=/usr/X11R6/lib',true);
{$endif powerpc64}
{$endif x86_64}
@@ -157,35 +151,35 @@ begin
{ some newer Debian have the crt*.o files at uncommon locations,
for other arm flavours, this cannot hurt }
{$ifdef FPC_ARMHF}
- LibrarySearchPath.AddPath(sysrootpath,'/usr/lib/arm-linux-gnueabihf',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/arm-linux-gnueabihf',true);
{$endif FPC_ARMHF}
{$ifdef FPC_ARMEL}
- LibrarySearchPath.AddPath(sysrootpath,'/usr/lib/arm-linux-gnueabi',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/arm-linux-gnueabi',true);
{$endif}
{$endif arm}
{$ifdef x86_64}
- LibrarySearchPath.AddPath(sysrootpath,'/usr/lib/x86_64-linux-gnu',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/x86_64-linux-gnu',true);
{$endif x86_64}
{$ifdef i386}
- LibrarySearchPath.AddPath(sysrootpath,'/usr/lib/i386-linux-gnu',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/i386-linux-gnu',true);
{$endif i386}
{$ifdef aarch64}
- LibrarySearchPath.AddPath(sysrootpath,'/usr/lib/aarch64-linux-gnu',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/aarch64-linux-gnu',true);
{$endif aarch64}
{$ifdef powerpc}
- LibrarySearchPath.AddPath(sysrootpath,'/usr/lib/powerpc-linux-gnu',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/powerpc-linux-gnu',true);
{$endif powerpc}
{$ifdef m68k}
- LibrarySearchPath.AddPath(sysrootpath,'/usr/lib/m68k-linux-gnu',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/m68k-linux-gnu',true);
{$endif m68k}
{$ifdef mipsel}
- LibrarySearchPath.AddPath(sysrootpath,'/usr/lib/mipsel-linux-gnu',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/mipsel-linux-gnu',true);
{$endif mipsel}
{$ifdef mips}
- LibrarySearchPath.AddPath(sysrootpath,'/usr/lib/mips-linux-gnu',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/mips-linux-gnu',true);
{$endif mips}
{$ifdef sparc64}
- LibrarySearchPath.AddPath(sysrootpath,'/usr/lib/sparc64-linux-gnu',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/sparc64-linux-gnu',true);
{$endif sparc64}
end;
end;
diff --git a/compiler/systems/t_macos.pas b/compiler/systems/t_macos.pas
index a195bb2930..e13fd2c406 100644
--- a/compiler/systems/t_macos.pas
+++ b/compiler/systems/t_macos.pas
@@ -88,7 +88,7 @@ implementation
Constructor TLinkerMPW.Create;
begin
Inherited Create;
- //LibrarySearchPath.AddPath(sysrootpath,'/lib;/usr/lib;/usr/X11R6/lib',true);
+ //LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib;=/usr/lib;=/usr/X11R6/lib',true);
end;
diff --git a/compiler/systems/t_sunos.pas b/compiler/systems/t_sunos.pas
index fc1e31a04d..1e9cde25a8 100644
--- a/compiler/systems/t_sunos.pas
+++ b/compiler/systems/t_sunos.pas
@@ -108,9 +108,9 @@ begin
use_gnu_ld:=true;
if NOT Dontlinkstdlibpath Then
{$ifdef x86_64}
- LibrarySearchPath.AddPath(sysrootpath,'/lib/64;/usr/lib/64;/usr/X11R6/lib/64;/opt/sfw/lib/64',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib/64;=/usr/lib/64;=/usr/X11R6/lib/64;=/opt/sfw/lib/64',true);
{$else not x86_64}
- LibrarySearchPath.AddPath(sysrootpath,'/lib;/usr/lib;/usr/X11R6/lib;/opt/sfw/lib',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib;=/usr/lib;=/usr/X11R6/lib;=/opt/sfw/lib',true);
{$endif not x86_64}
{$ifdef LinkTest}
if (cs_link_staticflag in current_settings.globalswitches) then WriteLN('ForceLinkStaticFlag');