summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorJack Howarth <howarth.at.gcc@gmail.com>2015-01-28 21:23:14 +0000
committerMike Stump <mrs@gcc.gnu.org>2015-01-28 21:23:14 +0000
commitb5f7a6ca5c5bdebdea7c3e38aca2c15108e8a3cb (patch)
tree184f01104b6f7c1b0e1f0834f1f1caba8376a5e5 /libgomp
parentc761dca15efdd733a1488be40dfccc5a55811c04 (diff)
downloadgcc-b5f7a6ca5c5bdebdea7c3e38aca2c15108e8a3cb.tar.gz
re PR libgomp/64635 (darwin produces libgomp-plugin-host_nonshm.1.dylib but tries to load libgomp-plugin-host_nonshm.so.1)
2015-01-28 Jack Howarth <howarth.at.gcc@gmail.com> PR libgomp/64635 * configure.tgt (*-*-aix*): Use config_path "aix posix". (*-*-darwin*): Use config_path "bsd darwin posix". (*-*-hpux*): Use config_path "hpux posix". * target.c: Add include of plugin-suffix.h and use SONAME_SUFFIX macro. * config/aix/plugin-suffix.h: New file. * config/darwin/plugin-suffix.h: New file. * config/hpux/plugin-suffix.h: New file. * config/posix/plugin-suffix.h: New file. From-SVN: r220218
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog13
-rw-r--r--libgomp/config/darwin/plugin-suffix.h26
-rw-r--r--libgomp/config/hpux/plugin-suffix.h26
-rw-r--r--libgomp/config/posix/plugin-suffix.h26
-rw-r--r--libgomp/configure.tgt7
-rw-r--r--libgomp/target.c3
6 files changed, 99 insertions, 2 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index b58d1c6cdaf..7e7c36ba55b 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,16 @@
+2015-01-28 Jack Howarth <howarth.at.gcc@gmail.com>
+
+ PR libgomp/64635
+ * configure.tgt (*-*-aix*): Use config_path "aix posix".
+ (*-*-darwin*): Use config_path "bsd darwin posix".
+ (*-*-hpux*): Use config_path "hpux posix".
+ * target.c: Add include of plugin-suffix.h and use
+ SONAME_SUFFIX macro.
+ * config/aix/plugin-suffix.h: New file.
+ * config/darwin/plugin-suffix.h: New file.
+ * config/hpux/plugin-suffix.h: New file.
+ * config/posix/plugin-suffix.h: New file.
+
2015-01-23 Jakub Jelinek <jakub@redhat.com>
PR middle-end/64734
diff --git a/libgomp/config/darwin/plugin-suffix.h b/libgomp/config/darwin/plugin-suffix.h
new file mode 100644
index 00000000000..e329b04bcc4
--- /dev/null
+++ b/libgomp/config/darwin/plugin-suffix.h
@@ -0,0 +1,26 @@
+/* Copyright (C) 2015 Free Software Foundation, Inc.
+ Contributed by Jack Howarth <howarth.at.gcc@gmail.com>
+
+ This file is part of the GNU Offloading and Multi Processing Library
+ (libgomp).
+
+ Libgomp is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define SONAME_SUFFIX(n) ("." #n ".dylib")
diff --git a/libgomp/config/hpux/plugin-suffix.h b/libgomp/config/hpux/plugin-suffix.h
new file mode 100644
index 00000000000..2709e0e1a66
--- /dev/null
+++ b/libgomp/config/hpux/plugin-suffix.h
@@ -0,0 +1,26 @@
+/* Copyright (C) 2015 Free Software Foundation, Inc.
+ Contributed by Jack Howarth <howarth.at.gcc@gmail.com>
+
+ This file is part of the GNU Offloading and Multi Processing Library
+ (libgomp).
+
+ Libgomp is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define SONAME_SUFFIX(n) (".sl." #n)
diff --git a/libgomp/config/posix/plugin-suffix.h b/libgomp/config/posix/plugin-suffix.h
new file mode 100644
index 00000000000..31a7ce196d9
--- /dev/null
+++ b/libgomp/config/posix/plugin-suffix.h
@@ -0,0 +1,26 @@
+/* Copyright (C) 2015 Free Software Foundation, Inc.
+ Contributed by Jack Howarth <howarth.at.gcc@gmail.com>
+
+ This file is part of the GNU Offloading and Multi Processing Library
+ (libgomp).
+
+ Libgomp is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define SONAME_SUFFIX(n) (".so." #n)
diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt
index 2ef49264e54..7c06450e0db 100644
--- a/libgomp/configure.tgt
+++ b/libgomp/configure.tgt
@@ -113,6 +113,7 @@ fi
case "${target}" in
*-*-hpux*)
+ config_path="hpux posix"
case "${target}" in
*-*-hpux11*)
# HPUX v11.x requires -lrt to resolve sem_init in libgomp.la
@@ -132,7 +133,7 @@ case "${target}" in
;;
*-*-darwin*)
- config_path="bsd posix"
+ config_path="bsd darwin posix"
;;
*-*-freebsd*)
@@ -140,6 +141,10 @@ case "${target}" in
XLDFLAGS="${XLDFLAGS} -lpthread"
;;
+ *-*-aix*)
+ config_path="aix posix"
+ ;;
+
*)
;;
diff --git a/libgomp/target.c b/libgomp/target.c
index ebff55e4727..73e757a9ec1 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -38,6 +38,7 @@
#ifdef PLUGIN_SUPPORT
#include <dlfcn.h>
+#include "plugin-suffix.h"
#endif
static void gomp_target_init (void);
@@ -1054,7 +1055,7 @@ static void
gomp_target_init (void)
{
const char *prefix ="libgomp-plugin-";
- const char *suffix = ".so.1";
+ const char *suffix = SONAME_SUFFIX (1);
const char *cur, *next;
char *plugin_name;
int i, new_num_devices;