Browse Source

* NEEDLIBRARY option to add -rpath to the linker for unix. This is
needed to test runtime library tests. The library needs the -FE.
option to place the .so in the correct directory

peter 22 years ago
parent
commit
36427d3ba6
1 changed files with 18 additions and 4 deletions
  1. 18 4
      tests/utils/dotest.pp

+ 18 - 4
tests/utils/dotest.pp

@@ -39,6 +39,7 @@ type
     ResultCode    : longint;
     ResultCode    : longint;
     KnownRunError : longint;
     KnownRunError : longint;
     NeedRecompile : boolean;
     NeedRecompile : boolean;
+    NeedLibrary   : boolean;
     IsInteractive : boolean;
     IsInteractive : boolean;
     IsKnown       : boolean;
     IsKnown       : boolean;
     NoRun         : boolean;
     NoRun         : boolean;
@@ -355,6 +356,9 @@ begin
               else
               else
                if GetEntry('NORUN') then
                if GetEntry('NORUN') then
                 r.NoRun:=true
                 r.NoRun:=true
+              else
+               if GetEntry('NEEDLIBRARY') then
+                r.NeedLibrary:=true
               else
               else
                if GetEntry('KNOWNRUNERROR') then
                if GetEntry('KNOWNRUNERROR') then
                 begin
                 begin
@@ -478,6 +482,11 @@ begin
   RunCompiler:=false;
   RunCompiler:=false;
   OutName:=ForceExtension(PPFile,'log');
   OutName:=ForceExtension(PPFile,'log');
   args:='-n -Fuunits';
   args:='-n -Fuunits';
+{$ifdef unix}
+  { Add runtime library path to current dir to find .so files }
+  if Config.NeedLibrary then
+   args:=args+' ''-k-rpath .''';
+{$endif unix}
   if Config.NeedOptions<>'' then
   if Config.NeedOptions<>'' then
    args:=args+' '+Config.NeedOptions;
    args:=args+' '+Config.NeedOptions;
   args:=args+' '+ppfile;
   args:=args+' '+ppfile;
@@ -805,16 +814,21 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.21  2002-12-05 16:03:34  pierre
+  Revision 1.22  2002-12-15 13:30:46  peter
+    * NEEDLIBRARY option to add -rpath to the linker for unix. This is
+      needed to test runtime library tests. The library needs the -FE.
+      option to place the .so in the correct directory
+
+  Revision 1.21  2002/12/05 16:03:34  pierre
    + -X option to disable UseComSpec
    + -X option to disable UseComSpec
 
 
   Revision 1.20  2002/11/18 16:42:43  pierre
   Revision 1.20  2002/11/18 16:42:43  pierre
    + KNOWNRUNERROR added
    + KNOWNRUNERROR added
 
 
   Revision 1.19  2002/11/18 01:31:07  pierre
   Revision 1.19  2002/11/18 01:31:07  pierre
-   + use -n option
-   + use -G- for only graph
-   + use -I- for only interactive
+   + use -n option
+   + use -G- for only graph
+   + use -I- for only interactive
    + use -K- for only known bugs.
    + use -K- for only known bugs.
 
 
   Revision 1.18  2002/11/14 10:36:12  pierre
   Revision 1.18  2002/11/14 10:36:12  pierre