* baseboards/multi-sim.exp (rpath_flags): Add libgomp.so check.
authorRobert Suchanek <Robert.Suchanek@imgtec.com>
Thu, 10 Sep 2015 03:08:07 +0000 (13:08 +1000)
committerBen Elliston <bje@gnu.org>
Thu, 10 Sep 2015 03:08:07 +0000 (13:08 +1000)
Signed-off-by: Ben Elliston <bje@gnu.org>
ChangeLog
baseboards/multi-sim.exp

index 0bdaeb9..996015e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-10  Robert Suchanek  <Robert.Suchanek@imgtec.com>
+
+       * baseboards/multi-sim.exp (rpath_flags): Add libgomp.so check.
+
 2015-07-30  Pedro Alves  <palves@redhat.com>
 
        * lib/remote.exp (close_wait_program): New procedure.
index 0f33242..c057ccd 100644 (file)
@@ -70,7 +70,7 @@ proc rpath_flags { args } {
   set mflags "[board_info $board multilib_flags] [libgloss_include_flags] [newlib_include_flags] [libgloss_link_flags] [libgloss_link_flags]"
   set rpathflags ""
   set gccpath [get_multilibs]
-  foreach i {libgcc_s.so  libstdc++.so libgfortran.so libatomic.so} {
+  foreach i {libgcc_s.so  libstdc++.so libgfortran.so libatomic.so libgomp.so} {
     set result [remote_exec host "$compiler $mflags --print-file-name=$i"]
     set output [lindex $result 1]
     set rpathdir [file dirname $output]
@@ -94,6 +94,11 @@ proc rpath_flags { args } {
         set rpathflags "$rpathflags -Wl,-rpath=$gccpath/libatomic/.libs"
        }
       }
+      if [string match $i "libgomp.so"] {
+       if [file exists "$gccpath/libgomp/.libs/libgomp.so"] {
+        set rpathflags "$rpathflags -Wl,-rpath=$gccpath/libgomp/.libs"
+       }
+      }
     } else {
       set rpathflags "$rpathflags -Wl,-rpath=$rpathdir"
     }