summaryrefslogtreecommitdiffstats
path: root/0025-enable-libcilkrts.patch
blob: 5ae7c9d0896d4493e89c1c1ee7c4a6d999178b15 (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
--- origsrc/gcc-5.3.0/config/target-posix	2014-11-13 08:03:17.000000000 -0600
+++ src/gcc-5.3.0/config/target-posix	2016-02-02 01:03:56.491336700 -0600
@@ -5,7 +5,7 @@
       ;;
   *-*-solaris2* | *-*-hpux11*)
       ;;
-  *-*-darwin* | *-*-aix*)
+  *-*-darwin* | *-*-aix* | *-*-cygwin*)
       ;;
   *)
       UNSUPPORTED=1 ;;
--- origsrc/gcc-5.3.0/libcilkrts/Makefile.am	2014-08-12 06:06:44.000000000 -0500
+++ src/gcc-5.3.0/libcilkrts/Makefile.am	2016-02-02 01:35:16.332546200 -0600
@@ -107,7 +107,7 @@
 
 
 # Hack for Cygwin
-libcilkrts_la_LDFLAGS += -no-undefined
+libcilkrts_la_LDFLAGS += $(lt_host_flags)
 
 # C/C++ header files for Cilk.
 # cilkincludedir = $(includedir)/cilk
--- origsrc/gcc-5.3.0/libcilkrts/Makefile.in	2014-08-12 06:06:44.000000000 -0500
+++ src/gcc-5.3.0/libcilkrts/Makefile.in	2016-02-02 01:35:52.560646600 -0600
@@ -312,6 +312,7 @@
 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@
@@ -396,7 +397,7 @@
 
 # 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
--- origsrc/gcc-5.3.0/libcilkrts/aclocal.m4	2015-12-04 04:47:53.000000000 -0600
+++ src/gcc-5.3.0/libcilkrts/aclocal.m4	2016-02-02 01:36:07.265013900 -0600
@@ -970,6 +970,7 @@
 
 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])
--- origsrc/gcc-5.3.0/libcilkrts/configure	2015-01-26 16:54:31.000000000 -0600
+++ src/gcc-5.3.0/libcilkrts/configure	2016-02-02 01:38:32.848000500 -0600
@@ -610,6 +610,7 @@
 lt_cv_dlopen_libs
 toolexeclibdir
 toolexecdir
+lt_host_flags
 CXXCPP
 OTOOL64
 OTOOL
@@ -9032,7 +9033,7 @@
 	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
 
@@ -11060,7 +11061,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11063 "configure"
+#line 11064 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11166,7 +11167,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11169 "configure"
+#line 11170 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13518,7 +13519,7 @@
     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*)
@@ -14420,6 +14421,28 @@
 
 
 
+
+
+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
+
+
+
+
 
 
 
--- origsrc/gcc-5.3.0/libcilkrts/configure.ac	2015-01-26 16:54:31.000000000 -0600
+++ src/gcc-5.3.0/libcilkrts/configure.ac	2016-02-02 01:36:52.100207200 -0600
@@ -160,6 +160,7 @@
 
 AC_LIBTOOL_DLOPEN
 AM_PROG_LIBTOOL
+ACX_LT_HOST_FLAGS
 AC_SUBST(toolexecdir)
 AC_SUBST(toolexeclibdir)