This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgomp/64635] darwin produces libgomp-plugin-host_nonshm.1.dylib but tries to load libgomp-plugin-host_nonshm.so.1
- From: "howarth at bromo dot med.uc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 17 Jan 2015 18:17:38 +0000
- Subject: [Bug libgomp/64635] darwin produces libgomp-plugin-host_nonshm.1.dylib but tries to load libgomp-plugin-host_nonshm.so.1
- Auto-submitted: auto-generated
- References: <bug-64635-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64635
--- Comment #3 from howarth at bromo dot med.uc.edu ---
The minimal fix would be...
Index: libgomp/configure.tgt
===================================================================
--- libgomp/configure.tgt (revision 219800)
+++ libgomp/configure.tgt (working copy)
@@ -133,6 +133,8 @@ case "${target}" in
*-*-darwin*)
config_path="bsd posix"
+ # Load plugin as dylib on darwin.
+ XCFLAGS="${XCFLAGS} -DDYLIB_SHLIBEXT"
;;
*-*-freebsd*)
Index: libgomp/target.c
===================================================================
--- libgomp/target.c (revision 219800)
+++ libgomp/target.c (working copy)
@@ -1055,7 +1055,11 @@ static void
gomp_target_init (void)
{
const char *prefix ="libgomp-plugin-";
+#ifdef DYLIB_SHLIBEXT
+ const char *suffix = ".1.dylib";
+#else
const char *suffix = ".so.1";
+#endif
const char *cur, *next;
char *plugin_name;
int i, new_num_devices;