Files
MSYS2-packages/gcc/0025-enable-libcilkrts-V2.patch
JPeterMugaas aa64260bff GCC 7.3.0 - https://gcc.gnu.org/gcc-7/
Rekeyed patches for MSYS2
Use Cygwin patches for 7.3.0

Note that this drops gcj, libjava, classlib, and bohem-gcc.
2018-04-16 14:09:52 -04:00

113 lines
3.1 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 2a0fcad..6fa2607 100644
--- a/libcilkrts/Makefile.am
+++ b/libcilkrts/Makefile.am
@@ -133,7 +133,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 a89960d..0042b80 100644
--- a/libcilkrts/Makefile.in
+++ b/libcilkrts/Makefile.in
@@ -366,6 +366,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@
@@ -465,7 +466,7 @@ CILK_REVISION = 4467
# 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 4bb1d43..978ffe1 100644
--- a/libcilkrts/aclocal.m4
+++ b/libcilkrts/aclocal.m4
@@ -991,6 +991,7 @@ AC_SUBST([am__untar])
m4_include([../config/acx.m4])
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 3cc8c99..7454900 100644
--- a/libcilkrts/configure
+++ b/libcilkrts/configure
@@ -611,6 +611,7 @@ XCFLAGS
lt_cv_dlopen_libs
toolexeclibdir
toolexecdir
+lt_host_flags
CXXCPP
OTOOL64
OTOOL
@@ -15303,6 +15304,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 9cf9052..2651444 100644
--- a/libcilkrts/configure.ac
+++ b/libcilkrts/configure.ac
@@ -183,6 +183,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)