Files
MSYS2-packages/gcc/0025-enable-libcilkrts.patch
2017-01-24 15:43:18 +03:00

131 lines
4.6 KiB
Diff

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)