summaryrefslogtreecommitdiffstats
path: root/0008-libatomic-libtool-fixes-for-Cygwin.patch
blob: 2300af33f7dadffc538eaa5c43e51fe2b16586a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
From ea6218eb8afa21b0b4dcf90a2f0eab7c024242e9 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 09:08:37 +0800
Subject: [PATCH 08/24] libatomic libtool fixes for Cygwin

---
 libatomic/Makefile.am   |  2 +-
 libatomic/Makefile.in   |  3 ++-
 libatomic/aclocal.m4    |  1 +
 libatomic/configure     | 27 +++++++++++++++++++++++++--
 libatomic/configure.ac  |  1 +
 libatomic/configure.tgt |  2 +-
 6 files changed, 31 insertions(+), 5 deletions(-)

diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
index 47f25df..56e1c34 100644
--- a/libatomic/Makefile.am
+++ b/libatomic/Makefile.am
@@ -66,7 +66,7 @@ libatomic_version_dep =
 endif
 libatomic_version_info = -version-info $(libtool_VERSION)
 
-libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script)
+libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags)
 libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \
 	fenv.c
 
diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
index 22c384b..9c510db 100644
--- a/libatomic/Makefile.in
+++ b/libatomic/Makefile.in
@@ -244,6 +244,7 @@ libexecdir = @libexecdir@
 libtool_VERSION = @libtool_VERSION@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 multi_basedir = @multi_basedir@
@@ -285,7 +286,7 @@ noinst_LTLIBRARIES = libatomic_convenience.la
 @LIBAT_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = $(top_srcdir)/libatomic.map
 @LIBAT_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = libatomic.map-sun
 libatomic_version_info = -version-info $(libtool_VERSION)
-libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script)
+libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags)
 libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \
 	fenv.c
 
diff --git a/libatomic/aclocal.m4 b/libatomic/aclocal.m4
index 48f5ef5..26dd3f4 100644
--- a/libatomic/aclocal.m4
+++ b/libatomic/aclocal.m4
@@ -994,6 +994,7 @@ m4_include([../config/acx.m4])
 m4_include([../config/depstand.m4])
 m4_include([../config/lead-dot.m4])
 m4_include([../config/multi.m4])
+m4_include([../config/lthostflags.m4])
 m4_include([../config/override.m4])
 m4_include([../config/stdint.m4])
 m4_include([../ltoptions.m4])
diff --git a/libatomic/configure b/libatomic/configure
index d707b09..58e1338 100755
--- a/libatomic/configure
+++ b/libatomic/configure
@@ -627,6 +627,7 @@ MAINTAINER_MODE_FALSE
 MAINTAINER_MODE_TRUE
 enable_static
 enable_shared
+lt_host_flags
 CPP
 OTOOL64
 OTOOL
@@ -11106,7 +11107,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11109 "configure"
+#line 11110 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11212,7 +11213,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11215 "configure"
+#line 11216 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11452,6 +11453,28 @@ CC="$lt_save_CC"
 
 
 
+case $host in
+  *-cygwin* | *-mingw*)
+    # 'host' will be top-level target in the case of a target lib,
+    # we must compare to with_cross_host to decide if this is a native
+    # or cross-compiler and select where to install dlls appropriately.
+    if test -n "$with_cross_host" &&
+	test x"$with_cross_host" != x"no"; then
+      lt_host_flags='-no-undefined -bindir "$(toolexeclibdir)"';
+    else
+      lt_host_flags='-no-undefined -bindir "$(bindir)"';
+    fi
+    ;;
+  *)
+    lt_host_flags=
+    ;;
+esac
+
+
+
+
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
     # Check whether --enable-maintainer-mode was given.
diff --git a/libatomic/configure.ac b/libatomic/configure.ac
index 9e8678d..f5db090 100644
--- a/libatomic/configure.ac
+++ b/libatomic/configure.ac
@@ -143,6 +143,7 @@ AC_PROG_INSTALL
 
 # Configure libtool
 AM_PROG_LIBTOOL
+ACX_LT_HOST_FLAGS
 AC_SUBST(enable_shared)
 AC_SUBST(enable_static)
 AM_MAINTAINER_MODE
diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
index a3757ef..63db8ca 100644
--- a/libatomic/configure.tgt
+++ b/libatomic/configure.tgt
@@ -103,7 +103,7 @@ case "${target}" in
   *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu \
   | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
   | *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \
-  | *-*-darwin* | *-*-aix*)
+  | *-*-darwin* | *-*-aix* | *-*-cygwin* )
 	# POSIX system.  The OS is supported.
 	config_path="${config_path} posix"
 	;;
-- 
2.1.1