MSYS2-packages/msys2-runtime-3.4/0001-Add-MSYS2-triplet.patch
Christoph Reiter 14e5524bed Add msys2-runtime-3.4
This will be the msys2-runtime variant that still works on Win7.
2024-03-15 17:55:50 +01:00

850 lines
30 KiB
Diff

From ea4541258abac6b47a0dfaf0ed48e07cc7d19caa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?=
=?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= <alexey.pawlow@gmail.com>
Date: Sun, 14 Apr 2019 20:40:45 +0300
Subject: [PATCH 01/N] Add MSYS2 triplet
---
compile | 4 ++--
config.guess | 3 +++
config.rpath | 8 +++----
config/dfp.m4 | 3 ++-
config/elf.m4 | 2 +-
config/lthostflags.m4 | 2 +-
config/mmap.m4 | 4 ++--
config/picflag.m4 | 2 ++
config/tcl.m4 | 4 ++--
configure | 22 +++++++++---------
configure.ac | 20 ++++++++---------
libtool.m4 | 36 +++++++++++++++++-------------
ltmain.sh | 52 +++++++++++++++++++++----------------------
ltoptions.m4 | 2 +-
newlib/configure | 2 +-
newlib/configure.host | 8 +++----
16 files changed, 93 insertions(+), 81 deletions(-)
diff --git a/compile b/compile
index a85b723..a4ecdb2 100755
--- a/compile
+++ b/compile
@@ -53,7 +53,7 @@ func_file_conv ()
MINGW*)
file_conv=mingw
;;
- CYGWIN*)
+ CYGWIN*|MSYS*)
file_conv=cygwin
;;
*)
@@ -67,7 +67,7 @@ func_file_conv ()
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
- cygwin/*)
+ cygwin/*|msys/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
diff --git a/config.guess b/config.guess
index 1972fda..a922fa3 100755
--- a/config.guess
+++ b/config.guess
@@ -914,6 +914,9 @@ EOF
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-pc-cygwin
exit ;;
+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
+ echo x86_64-unknown-msys
+ exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
exit ;;
diff --git a/config.rpath b/config.rpath
index 4dea759..4f12c27 100755
--- a/config.rpath
+++ b/config.rpath
@@ -109,7 +109,7 @@ hardcode_direct=no
hardcode_minus_L=no
case "$host_os" in
- cygwin* | mingw* | pw32*)
+ cygwin* | msys* | mingw* | pw32*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
@@ -149,7 +149,7 @@ if test "$with_gnu_ld" = yes; then
ld_shlibs=no
fi
;;
- cygwin* | mingw* | pw32*)
+ cygwin* | msys* | mingw* | pw32*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
@@ -268,7 +268,7 @@ else
;;
bsdi4*)
;;
- cygwin* | mingw* | pw32*)
+ cygwin* | msys* | mingw* | pw32*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -437,7 +437,7 @@ case "$host_os" in
;;
bsdi4*)
;;
- cygwin* | mingw* | pw32*)
+ cygwin* | msys* | mingw* | pw32*)
shrext=.dll
;;
darwin* | rhapsody*)
diff --git a/config/dfp.m4 b/config/dfp.m4
index 5b29089..b03bcf0 100644
--- a/config/dfp.m4
+++ b/config/dfp.m4
@@ -23,7 +23,8 @@ Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;;
powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
i?86*-*-elfiamcu | i?86*-*-gnu* | \
i?86*-*-mingw* | x86_64*-*-mingw* | \
- i?86*-*-cygwin* | x86_64*-*-cygwin*)
+ i?86*-*-cygwin* | x86_64*-*-cygwin* | \
+ i?86*-*-msys* | x86_64*-*-msys*)
enable_decimal_float=yes
;;
*)
diff --git a/config/elf.m4 b/config/elf.m4
index 5f5cd88..b8491de 100644
--- a/config/elf.m4
+++ b/config/elf.m4
@@ -15,7 +15,7 @@ AC_REQUIRE([AC_CANONICAL_TARGET])
target_elf=no
case $target in
- *-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \
+ *-darwin* | *-aix* | *-cygwin* | *-msys* | *-mingw* | *-aout* | *-*coff* | \
*-msdosdjgpp* | *-vms* | *-wince* | *-*-pe* | \
alpha*-dec-osf* | hppa[[12]]*-*-hpux* | \
nvptx-*-none)
diff --git a/config/lthostflags.m4 b/config/lthostflags.m4
index bc0f59e..ad977d4 100644
--- a/config/lthostflags.m4
+++ b/config/lthostflags.m4
@@ -13,7 +13,7 @@ AC_DEFUN([ACX_LT_HOST_FLAGS], [
AC_REQUIRE([AC_CANONICAL_SYSTEM])
case $host in
- *-cygwin* | *-mingw*)
+ *-cygwin* | *-msys* | *-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.
diff --git a/config/mmap.m4 b/config/mmap.m4
index fba0d9d..df2c778 100644
--- a/config/mmap.m4
+++ b/config/mmap.m4
@@ -42,7 +42,7 @@ else
# Systems known to be in this category are Windows (all variants),
# VMS, and Darwin.
case "$host_os" in
- *vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
+ *vms* | cygwin* | msys* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
gcc_cv_func_mmap_dev_zero=no ;;
*)
gcc_cv_func_mmap_dev_zero=yes;;
@@ -74,7 +74,7 @@ else
# above for use of /dev/zero.
# Systems known to be in this category are Windows, VMS, and SCO Unix.
case "$host_os" in
- *vms* | cygwin* | pe | mingw* | sco* | udk* )
+ *vms* | cygwin* | msys* | pe | mingw* | sco* | udk* )
gcc_cv_func_mmap_anon=no ;;
*)
gcc_cv_func_mmap_anon=yes;;
diff --git a/config/picflag.m4 b/config/picflag.m4
index 614421d..9d507ba 100644
--- a/config/picflag.m4
+++ b/config/picflag.m4
@@ -25,6 +25,8 @@ case "${$2}" in
;;
i[[34567]]86-*-cygwin* | x86_64-*-cygwin*)
;;
+ i[[34567]]86-*-msys* | x86_64-*-msys*)
+ ;;
i[[34567]]86-*-mingw* | x86_64-*-mingw*)
;;
i[[34567]]86-*-nto-qnx*)
diff --git a/config/tcl.m4 b/config/tcl.m4
index 4542a4b..209bd8d 100644
--- a/config/tcl.m4
+++ b/config/tcl.m4
@@ -33,7 +33,7 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
# First check to see if --with-tcl was specified.
case "${host}" in
- *-*-cygwin*) platDir="win" ;;
+ *-*-cygwin* | *-*-msys*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${with_tclconfig}" != x ; then
@@ -165,7 +165,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
# then check for a private Tk library
case "${host}" in
- *-*-cygwin*) platDir="win" ;;
+ *-*-cygwin* | *-*-msys*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${ac_cv_c_tkconfig}" = x ; then
diff --git a/configure b/configure
index eb0ba84..0badc34 100755
--- a/configure
+++ b/configure
@@ -3074,7 +3074,7 @@ fi
# Configure extra directories which are host specific
case "${host}" in
- *-cygwin*)
+ *-cygwin* | *-msys*)
configdirs="$configdirs libtermcap" ;;
esac
@@ -3595,7 +3595,7 @@ esac
# Disable the go frontend on systems where it is known to not work. Please keep
# this in sync with contrib/config-list.mk.
case "${target}" in
-*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
+*-*-darwin* | *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-aix*)
unsupported_languages="$unsupported_languages go"
;;
esac
@@ -3608,7 +3608,7 @@ if test x$enable_libgo = x; then
# PR 46986
noconfigdirs="$noconfigdirs target-libgo"
;;
- *-*-cygwin* | *-*-mingw*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw*)
noconfigdirs="$noconfigdirs target-libgo"
;;
*-*-aix*)
@@ -3880,7 +3880,7 @@ case "${target}" in
i[3456789]86-*-mingw*)
target_configdirs="$target_configdirs target-winsup"
;;
- *-*-cygwin*)
+ *-*-cygwin* | *-*-msys*)
target_configdirs="$target_configdirs target-libtermcap target-winsup"
noconfigdirs="$noconfigdirs target-libgloss"
# always build newlib if winsup directory is present.
@@ -4024,7 +4024,7 @@ case "${host}" in
i[3456789]86-*-msdosdjgpp*)
host_makefile_frag="config/mh-djgpp"
;;
- *-cygwin*)
+ *-cygwin* | *-msys*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if cat works as expected" >&5
$as_echo_n "checking to see if cat works as expected... " >&6; }
@@ -6192,7 +6192,7 @@ fi
target_elf=no
case $target in
- *-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \
+ *-darwin* | *-aix* | *-cygwin* | *-msys* | *-mingw* | *-aout* | *-*coff* | \
*-msdosdjgpp* | *-vms* | *-wince* | *-*-pe* | \
alpha*-dec-osf* | hppa[12]*-*-hpux* | \
nvptx-*-none)
@@ -6210,7 +6210,7 @@ if test $target_elf = yes; then :
else
if test x"$default_enable_lto" = x"yes" ; then
case $target in
- *-apple-darwin9* | *-cygwin* | *-mingw* | *djgpp*) ;;
+ *-apple-darwin9* | *-cygwin* | *-msys* | *-mingw* | *djgpp*) ;;
# On other non-ELF platforms, LTO has yet to be validated.
*) enable_lto=no ;;
esac
@@ -6221,7 +6221,7 @@ else
# warn during gcc/ subconfigure; unless you're bootstrapping with
# -flto it won't be needed until after installation anyway.
case $target in
- *-cygwin* | *-mingw* | *-apple-darwin* | *djgpp*) ;;
+ *-cygwin* | *-msys* | *-mingw* | *-apple-darwin* | *djgpp*) ;;
*) if test x"$enable_lto" = x"yes"; then
as_fn_error $? "LTO support is not enabled for this target." "$LINENO" 5
fi
@@ -6231,7 +6231,7 @@ else
# Among non-ELF, only Windows platforms support the lto-plugin so far.
# Build it unless LTO was explicitly disabled.
case $target in
- *-cygwin* | *-mingw*) build_lto_plugin=$enable_lto ;;
+ *-cygwin* | *-msys* | *-mingw*) build_lto_plugin=$enable_lto ;;
*) ;;
esac
@@ -7102,7 +7102,7 @@ rm -f conftest*
case "${host}" in
*-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
*-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
- *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
+ *-*-mingw* | *-*-cygwin | *-msys ) RPATH_ENVVAR=PATH ;;
*) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
esac
@@ -7620,7 +7620,7 @@ case " $target_configdirs " in
case " $target_configargs " in
*" --with-newlib "*)
case "$target" in
- *-cygwin*)
+ *-cygwin* | *-msys*)
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -isystem $$s/winsup/cygwin/include'
;;
esac
diff --git a/configure.ac b/configure.ac
index f1bb721..f7fc8e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -409,7 +409,7 @@ AC_ARG_ENABLE(compressed_debug_sections,
# Configure extra directories which are host specific
case "${host}" in
- *-cygwin*)
+ *-cygwin* | *-msys*)
configdirs="$configdirs libtermcap" ;;
esac
@@ -893,7 +893,7 @@ esac
# Disable the go frontend on systems where it is known to not work. Please keep
# this in sync with contrib/config-list.mk.
case "${target}" in
-*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
+*-*-darwin* | *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-aix*)
unsupported_languages="$unsupported_languages go"
;;
esac
@@ -906,7 +906,7 @@ if test x$enable_libgo = x; then
# PR 46986
noconfigdirs="$noconfigdirs target-libgo"
;;
- *-*-cygwin* | *-*-mingw*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw*)
noconfigdirs="$noconfigdirs target-libgo"
;;
*-*-aix*)
@@ -1178,7 +1178,7 @@ case "${target}" in
i[[3456789]]86-*-mingw*)
target_configdirs="$target_configdirs target-winsup"
;;
- *-*-cygwin*)
+ *-*-cygwin* | *-*-msys*)
target_configdirs="$target_configdirs target-libtermcap target-winsup"
noconfigdirs="$noconfigdirs target-libgloss"
# always build newlib if winsup directory is present.
@@ -1322,7 +1322,7 @@ case "${host}" in
i[[3456789]]86-*-msdosdjgpp*)
host_makefile_frag="config/mh-djgpp"
;;
- *-cygwin*)
+ *-cygwin* | *-msys*)
ACX_CHECK_CYGWIN_CAT_WORKS
host_makefile_frag="config/mh-cygwin"
;;
@@ -1809,7 +1809,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always.
build_lto_plugin=yes
],[if test x"$default_enable_lto" = x"yes" ; then
case $target in
- *-apple-darwin9* | *-cygwin* | *-mingw* | *djgpp*) ;;
+ *-apple-darwin9* | *-cygwin* | *-msys* | *-mingw* | *djgpp*) ;;
# On other non-ELF platforms, LTO has yet to be validated.
*) enable_lto=no ;;
esac
@@ -1820,7 +1820,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always.
# warn during gcc/ subconfigure; unless you're bootstrapping with
# -flto it won't be needed until after installation anyway.
case $target in
- *-cygwin* | *-mingw* | *-apple-darwin* | *djgpp*) ;;
+ *-cygwin* | *-msys*| *-mingw* | *-apple-darwin* | *djgpp*) ;;
*) if test x"$enable_lto" = x"yes"; then
AC_MSG_ERROR([LTO support is not enabled for this target.])
fi
@@ -1830,7 +1830,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always.
# Among non-ELF, only Windows platforms support the lto-plugin so far.
# Build it unless LTO was explicitly disabled.
case $target in
- *-cygwin* | *-mingw*) build_lto_plugin=$enable_lto ;;
+ *-cygwin* | *-msys* | *-mingw*) build_lto_plugin=$enable_lto ;;
*) ;;
esac
])
@@ -2644,7 +2644,7 @@ rm -f conftest*
case "${host}" in
*-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
*-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
- *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
+ *-*-mingw* | *-*-cygwin | *-*-msys ) RPATH_ENVVAR=PATH ;;
*) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
esac
@@ -3157,7 +3157,7 @@ case " $target_configdirs " in
case " $target_configargs " in
*" --with-newlib "*)
case "$target" in
- *-cygwin*)
+ *-cygwin* | *-msys*)
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -isystem $$s/winsup/cygwin/include'
;;
esac
diff --git a/libtool.m4 b/libtool.m4
index a216bb1..0d6d17a 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -1521,7 +1521,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=-1;
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | msys* | mingw* | cegcc*)
# On Win9x/ME, this test blows up -- it succeeds, but takes
# about 5 minutes as the teststring grows exponentially.
# Worse, since 9x/ME are not pre-emptively multitasking,
@@ -1763,7 +1763,7 @@ else
lt_cv_dlopen_libs=
;;
- cygwin*)
+ cygwin* | msys*)
lt_cv_dlopen="dlopen"
lt_cv_dlopen_libs=
;;
@@ -2234,14 +2234,14 @@ bsdi[[45]]*)
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
version_type=windows
shrext_cmds=".dll"
need_version=no
need_lib_prefix=no
case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*)
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
@@ -2262,6 +2262,12 @@ cygwin* | mingw* | pw32* | cegcc*)
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
+ ;;
+ msys*)
+ # Msys DLLs use 'msys-' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
m4_if([$1], [],[
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
;;
@@ -3021,7 +3027,7 @@ bsdi[[45]]*)
lt_cv_file_magic_test_file=/shlib/libc.so
;;
-cygwin*)
+cygwin* | msys*)
# func_win32_libid is a shell function defined in ltmain.sh
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
@@ -3307,7 +3313,7 @@ AC_DEFUN([LT_LIB_M],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
case $host in
-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-msys* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
# These system don't have libm, or don't need it
;;
*-ncr-sysv4.3*)
@@ -3382,7 +3388,7 @@ case $host_os in
aix*)
symcode='[[BCDT]]'
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
symcode='[[ABCDGISTW]]'
;;
hpux*)
@@ -3629,7 +3635,7 @@ m4_if([$1], [CXX], [
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -3942,7 +3948,7 @@ m4_if([$1], [CXX], [
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -4025,7 +4031,7 @@ m4_if([$1], [CXX], [
fi
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
m4_if([$1], [GCJ], [],
@@ -4258,7 +4264,7 @@ m4_if([$1], [CXX], [
pw32*)
_LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | msys* | mingw* | cegcc*)
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
;;
*)
@@ -4310,7 +4316,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
extract_expsyms_cmds=
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
@@ -4425,7 +4431,7 @@ _LT_EOF
fi
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs.
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
@@ -4798,7 +4804,7 @@ _LT_EOF
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -5742,7 +5748,7 @@ if test "$_lt_caught_CXX_error" != yes; then
esac
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs.
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
diff --git a/ltmain.sh b/ltmain.sh
index 9503ec8..307a339 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -976,7 +976,7 @@ func_enable_tag ()
case $host in
- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* )
+ *cygwin* | *msys* | *mingw* | *pw32* | *cegcc* | *solaris2* )
# don't eliminate duplications in $postdeps and $predeps
opt_duplicate_compiler_generated_deps=:
;;
@@ -1453,7 +1453,7 @@ func_mode_compile ()
# On Cygwin there's no "real" PIC flag so we must build both object types
case $host_os in
- cygwin* | mingw* | pw32* | os2* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | os2* | cegcc*)
pic_mode=default
;;
esac
@@ -2279,7 +2279,7 @@ func_mode_install ()
'exit $?'
tstripme="$stripme"
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
case $realname in
*.dll.a)
tstripme=""
@@ -2385,7 +2385,7 @@ func_mode_install ()
# Do a test to see if this is really a libtool program.
case $host in
- *cygwin* | *mingw*)
+ *cygwin* | *msys* | *mingw*)
if func_ltwrapper_executable_p "$file"; then
func_ltwrapper_scriptname "$file"
wrapper=$func_ltwrapper_scriptname_result
@@ -2460,7 +2460,7 @@ func_mode_install ()
# remove .exe since cygwin /usr/bin/install will append another
# one anyway
case $install_prog,$host in
- */usr/bin/install*,*cygwin*)
+ */usr/bin/install*,*cygwin*|*/usr/bin/install*,*msys*)
case $file:$destfile in
*.exe:*.exe)
# this is ok
@@ -2595,7 +2595,7 @@ extern \"C\" {
$RM $export_symbols
${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' < "$nlist" > "$export_symbols"
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *msys* | *mingw* | *cegcc* )
echo EXPORTS > "$output_objdir/$outputname.def"
cat "$export_symbols" >> "$output_objdir/$outputname.def"
;;
@@ -2607,7 +2607,7 @@ extern \"C\" {
$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T
$MV "$nlist"T "$nlist"
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *msys* | *mingw* | *cegcc* )
echo EXPORTS > "$output_objdir/$outputname.def"
cat "$nlist" >> "$output_objdir/$outputname.def"
;;
@@ -2663,7 +2663,7 @@ typedef struct {
} lt_dlsymlist;
"
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *msys* | *mingw* | *cegcc* )
echo >> "$output_objdir/$my_dlsyms" "\
/* DATA imports from DLLs on WIN32 con't be const, because
runtime relocations are performed -- see ld's documentation
@@ -2749,7 +2749,7 @@ static const void *lt_preloaded_setup() {
# Transform the symbol file into the correct name.
symfileobj="$output_objdir/${my_outputname}S.$objext"
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *msys* | *mingw* | *cegcc* )
if test -f "$output_objdir/$my_outputname.def"; then
compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
@@ -3192,7 +3192,7 @@ func_to_host_path ()
func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null |
$SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
;;
- *cygwin* )
+ *cygwin* | *msys* )
func_to_host_path_result=`cygpath -w "$1" |
$SED -e "$lt_sed_naive_backslashify"`
;;
@@ -3265,7 +3265,7 @@ func_to_host_pathlist ()
( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null |
$SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
;;
- *cygwin* )
+ *cygwin* | *msys* )
func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" |
$SED -e "$lt_sed_naive_backslashify"`
;;
@@ -3571,7 +3571,7 @@ main (int argc, char *argv[])
{
EOF
case "$host" in
- *mingw* | *cygwin* )
+ *mingw* | *cygwin* | *msys* )
# make stdout use "unix" line endings
echo " setmode(1,_O_BINARY);"
;;
@@ -4233,7 +4233,7 @@ func_mode_link ()
{
$opt_debug
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
# It is impossible to link a dll without this setting, and
# we shouldn't force the makefile maintainer to figure out
# which system we are compiling for in order to pass an extra
@@ -4713,7 +4713,7 @@ func_mode_link ()
;;
esac
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$dir:"*) ;;
@@ -4733,7 +4733,7 @@ func_mode_link ()
-l*)
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
# These systems don't actually have a C or math library (as such)
continue
;;
@@ -4813,7 +4813,7 @@ func_mode_link ()
-no-install)
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
# The PATH hackery in wrapper scripts is required on Windows
# and Darwin in order for the loader to find any dlls it needs.
func_warning "\`-no-install' is ignored for $host"
@@ -5772,7 +5772,7 @@ func_mode_link ()
if test -n "$library_names" &&
{ test "$use_static_libs" = no || test -z "$old_library"; }; then
case $host in
- *cygwin* | *mingw* | *cegcc*)
+ *cygwin* | *msys* | *mingw* | *cegcc*)
# No point in relinking DLLs because paths are not encoded
notinst_deplibs="$notinst_deplibs $lib"
need_relink=no
@@ -5842,7 +5842,7 @@ func_mode_link ()
elif test -n "$soname_spec"; then
# bleh windows
case $host in
- *cygwin* | mingw* | *cegcc*)
+ *cygwin* | msys* | mingw* | *cegcc*)
func_arith $current - $age
major=$func_arith_result
versuffix="-$major"
@@ -6693,7 +6693,7 @@ func_mode_link ()
if test "$build_libtool_libs" = yes; then
if test -n "$rpath"; then
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
# these systems don't actually have a c library (as such)!
;;
*-*-rhapsody* | *-*-darwin1.[012])
@@ -7194,7 +7194,7 @@ EOF
orig_export_symbols=
case $host_os in
- cygwin* | mingw* | cegcc*)
+ cygwin* | msys* | mingw* | cegcc*)
if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
# exporting using user supplied symfile
if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
@@ -7710,7 +7710,7 @@ EOF
prog)
case $host in
- *cygwin*) func_stripname '' '.exe' "$output"
+ *cygwin* | *msys*) func_stripname '' '.exe' "$output"
output=$func_stripname_result.exe;;
esac
test -n "$vinfo" && \
@@ -7823,7 +7823,7 @@ EOF
esac
fi
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
@@ -7901,7 +7901,7 @@ EOF
# Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
wrappers_required=no
;;
- *cygwin* | *mingw* )
+ *cygwin* | *msys* | *mingw* )
if test "$build_libtool_libs" != yes; then
wrappers_required=no
fi
@@ -8029,14 +8029,14 @@ EOF
esac
# test for cygwin because mv fails w/o .exe extensions
case $host in
- *cygwin*)
+ *cygwin* | *msys*)
exeext=.exe
func_stripname '' '.exe' "$outputname"
outputname=$func_stripname_result ;;
*) exeext= ;;
esac
case $host in
- *cygwin* | *mingw* )
+ *cygwin* | *msys* | *mingw* )
func_dirname_and_basename "$output" "" "."
output_name=$func_basename_result
output_path=$func_dirname_result
@@ -8343,7 +8343,7 @@ EOF
# tests/bindir.at for full details.
tdlname=$dlname
case $host,$output,$installed,$module,$dlname in
- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ *cygwin*,*lai,yes,no,*.dll | *msys*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
# If a -bindir argument was supplied, place the dll there.
if test "x$bindir" != x ;
then
diff --git a/ltoptions.m4 b/ltoptions.m4
index 5ef12ce..5e7bc34 100644
--- a/ltoptions.m4
+++ b/ltoptions.m4
@@ -126,7 +126,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
[enable_win32_dll=yes
case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
diff --git a/newlib/configure b/newlib/configure
index 0b6ec15..d3171b4 100755
--- a/newlib/configure
+++ b/newlib/configure
@@ -4269,7 +4269,7 @@ else
fi
-ac_ext=c
+:cn
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
diff --git a/newlib/configure.host b/newlib/configure.host
index 32d1436..4e4c393 100644
--- a/newlib/configure.host
+++ b/newlib/configure.host
@@ -194,7 +194,7 @@ case "${host_cpu}" in
shared_machine_dir=shared_x86
# Don't use for these since they provide their own setjmp.
case ${host} in
- *-*-sco* | *-*-cygwin*)
+ *-*-sco* | *-*-cygwin* | *-*-msys*)
;;
*)
mach_add_setjmp=true
@@ -399,7 +399,7 @@ fi
if [ "x${newlib_mb}" = "x" ]; then
case "${host}" in
- *-*-cygwin*)
+ *-*-cygwin*|*-*-msys*)
newlib_mb=yes
;;
esac
@@ -418,7 +418,7 @@ fi
# THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY.
case "${host}" in
- *-*-cygwin*)
+ *-*-cygwin* | *-*-msys*)
posix_dir=posix
xdr_dir=xdr
;;
@@ -578,7 +578,7 @@ esac
# THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY.
case "${host}" in
- *-*-cygwin*)
+ *-*-cygwin* | *-*-msys*)
test -z "$cygwin_srcdir" && cygwin_srcdir="${abs_newlib_basedir}/../winsup/cygwin"
export cygwin_srcdir
default_newlib_io_c99_formats="yes"