Files
MSYS2-packages/gcc/0011-Cygwin-libgomp-soname.patch
2020-10-26 15:45:42 +03:00

85 lines
2.8 KiB
Diff

From ad26a1b30066f612fdde56890c232fcfc91b7c6d Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Tue, 8 Sep 2020 15:05:44 +0200
Subject: [PATCH 11/18] Cygwin: libgomp soname
---
libgomp/config/cygwin/plugin-suffix.h | 2 ++
libgomp/config/darwin/plugin-suffix.h | 1 +
libgomp/config/hpux/plugin-suffix.h | 1 +
libgomp/config/posix/plugin-suffix.h | 1 +
libgomp/configure.tgt | 4 ++++
libgomp/target.c | 2 +-
6 files changed, 10 insertions(+), 1 deletion(-)
create mode 100644 libgomp/config/cygwin/plugin-suffix.h
diff --git a/libgomp/config/cygwin/plugin-suffix.h b/libgomp/config/cygwin/plugin-suffix.h
new file mode 100644
index 00000000000..7ea6e7241d9
--- /dev/null
+++ b/libgomp/config/cygwin/plugin-suffix.h
@@ -0,0 +1,2 @@
+#define SONAME_PREFIX "cyg"
+#define SONAME_SUFFIX(n) ("-" #n ".dll")
diff --git a/libgomp/config/darwin/plugin-suffix.h b/libgomp/config/darwin/plugin-suffix.h
index 171a7a8113e..c290b847a05 100644
--- a/libgomp/config/darwin/plugin-suffix.h
+++ b/libgomp/config/darwin/plugin-suffix.h
@@ -23,4 +23,5 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define SONAME_PREFIX "lib"
#define SONAME_SUFFIX(n) ("." #n ".dylib")
diff --git a/libgomp/config/hpux/plugin-suffix.h b/libgomp/config/hpux/plugin-suffix.h
index 29e1f12726c..7838cc5d184 100644
--- a/libgomp/config/hpux/plugin-suffix.h
+++ b/libgomp/config/hpux/plugin-suffix.h
@@ -23,4 +23,5 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define SONAME_PREFIX "lib"
#define SONAME_SUFFIX(n) (".sl." #n)
diff --git a/libgomp/config/posix/plugin-suffix.h b/libgomp/config/posix/plugin-suffix.h
index d111e529b84..135754ea37e 100644
--- a/libgomp/config/posix/plugin-suffix.h
+++ b/libgomp/config/posix/plugin-suffix.h
@@ -23,4 +23,5 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define SONAME_PREFIX "lib"
#define SONAME_SUFFIX(n) (".so." #n)
diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt
index 4790a31e394..6091f130c23 100644
--- a/libgomp/configure.tgt
+++ b/libgomp/configure.tgt
@@ -135,6 +135,10 @@ case "${target}" in
esac
;;
+ *-*-cygwin*)
+ config_path="cygwin posix"
+ ;;
+
*-*-mingw32*)
config_path="mingw32 posix"
;;
diff --git a/libgomp/target.c b/libgomp/target.c
index d6b3572c8d8..605f9f028c8 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -3135,7 +3135,7 @@ gomp_target_fini (void)
static void
gomp_target_init (void)
{
- const char *prefix ="libgomp-plugin-";
+ const char *prefix = SONAME_PREFIX "gomp-plugin-";
const char *suffix = SONAME_SUFFIX (1);
const char *cur, *next;
char *plugin_name;
--
2.28.0