summaryrefslogtreecommitdiffstats
path: root/0025-enable-libcilkrts.patch
blob: 8894d27b3ef5674c0e92266de843ce4b71fbde35 (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
diff --git a/config/target-posix b/config/target-posix
index 2fba066..314d4c1 100644
--- a/config/target-posix
+++ b/config/target-posix
@@ -5,7 +5,7 @@ case "${target}" in
       ;;
   *-*-solaris2* | *-*-hpux11*)
       ;;
-  *-*-darwin* | *-*-aix*)
+  *-*-darwin* | *-*-aix* | *-*-cygwin*)
       ;;
   *)
       UNSUPPORTED=1 ;;
diff --git a/libcilkrts/Makefile.am b/libcilkrts/Makefile.am
index 4f944dd..57256df 100644
--- a/libcilkrts/Makefile.am
+++ b/libcilkrts/Makefile.am
@@ -110,7 +110,7 @@ endif
 
 
 # Hack for Cygwin
-libcilkrts_la_LDFLAGS += -no-undefined
+libcilkrts_la_LDFLAGS += $(lt_host_flags)
 
 # C/C++ header files for Cilk.
 # cilkincludedir = $(includedir)/cilk
diff --git a/libcilkrts/Makefile.in b/libcilkrts/Makefile.in
index a25d1c6..cee2ee5 100644
--- a/libcilkrts/Makefile.in
+++ b/libcilkrts/Makefile.in
@@ -340,6 +340,7 @@ link_cilkrts = @link_cilkrts@
 localedir = @localedir@
 localstatedir = @localstatedir@
 lt_cv_dlopen_libs = @lt_cv_dlopen_libs@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 multi_basedir = @multi_basedir@
@@ -426,7 +427,7 @@ CILK_REVISION = 3902
 
 # Hack for Cygwin
 libcilkrts_la_LDFLAGS = -version-info 5:0:0 @lt_cv_dlopen_libs@ \
-	$(AM_LDFLAGS) $(am__append_1) $(am__append_2) -no-undefined
+	$(AM_LDFLAGS) $(am__append_1) $(am__append_2) $(lt_host_flags)
 
 # C/C++ header files for Cilk.
 # cilkincludedir = $(includedir)/cilk
diff --git a/libcilkrts/aclocal.m4 b/libcilkrts/aclocal.m4
index a468681..8a7ddf6 100644
--- a/libcilkrts/aclocal.m4
+++ b/libcilkrts/aclocal.m4
@@ -990,6 +990,7 @@ AC_SUBST([am__untar])
 
 m4_include([../config/depstand.m4])
 m4_include([../config/lead-dot.m4])
+m4_include([../config/lthostflags.m4])
 m4_include([../config/multi.m4])
 m4_include([../config/override.m4])
 m4_include([../libtool.m4])
diff --git a/libcilkrts/configure b/libcilkrts/configure
index 4e1d459..c8a7e3e 100644
--- a/libcilkrts/configure
+++ b/libcilkrts/configure
@@ -610,6 +610,7 @@ XCFLAGS
 lt_cv_dlopen_libs
 toolexeclibdir
 toolexecdir
+lt_host_flags
 CXXCPP
 OTOOL64
 OTOOL
@@ -9036,7 +9037,7 @@ _LT_EOF
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	else
-	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
@@ -13522,7 +13523,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
       export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     else
-      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     fi
     ;;
   pw32*)
@@ -14426,6 +14427,28 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+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
+
+
+
+
+
+
 
 
 # Check to see if -pthread or -lpthread is needed.  Prefer the former.
diff --git a/libcilkrts/configure.ac b/libcilkrts/configure.ac
index 8ad647e..af999a0 100644
--- a/libcilkrts/configure.ac
+++ b/libcilkrts/configure.ac
@@ -160,6 +160,7 @@ AM_CONDITIONAL(MAC_LINKER_SCRIPT, test "$mac_linker_script" = "yes")
 
 AC_LIBTOOL_DLOPEN
 AM_PROG_LIBTOOL
+ACX_LT_HOST_FLAGS
 AC_SUBST(toolexecdir)
 AC_SUBST(toolexeclibdir)