Patch for multi-sim.exp to find libgomp.so

Robert Suchanek <[email protected]>
Newsgroups gmane.comp.sysutils.dejagnu.general
Message-ID <[email protected]>
Hi,

The patch attached is necessary to find libgomp.so in the build
tree if one configured GCC with --enable-libgomp and wants to
run C, C++ and/or Fortran tests. 

Regards,
Robert

	* baseboards/multi-sim.exp (rpath_flags): Add libgomp.so check.
---
 baseboards/multi-sim.exp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/baseboards/multi-sim.exp b/baseboards/multi-sim.exp
index 0f33242..c057ccd 100644
--- a/baseboards/multi-sim.exp
+++ b/baseboards/multi-sim.exp
@@ -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"
     }
-- 
2.4.5
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.