diff -Naur gdb-7.6.50.20130624-orig/bfd/acinclude.m4 gdb-7.6.50.20130624/bfd/acinclude.m4 --- gdb-7.6.50.20130624-orig/bfd/acinclude.m4 2012-12-17 20:55:37.000000000 +0400 +++ gdb-7.6.50.20130624/bfd/acinclude.m4 2013-07-29 17:16:00.024414100 +0400 @@ -23,7 +23,7 @@ [AC_REQUIRE([AC_CANONICAL_TARGET]) case "${host}" in changequote(,)dnl -*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) +*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-msys* | *-*-windows*) changequote([,])dnl AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;; esac])dnl diff -Naur gdb-7.6.50.20130624-orig/bfd/config.bfd gdb-7.6.50.20130624/bfd/config.bfd --- gdb-7.6.50.20130624-orig/bfd/config.bfd 2013-06-24 00:08:22.000000000 +0400 +++ gdb-7.6.50.20130624/bfd/config.bfd 2013-07-29 17:16:00.055664100 +0400 @@ -673,7 +673,7 @@ targ_archs="$targ_archs bfd_arm_arch" want64=true ;; - x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin) + x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin | x86_64-*-msys) targ_defvec=x86_64_pe_vec targ_selvecs="x86_64_pe_vec x86_64_pei_vec x86_64_pe_be_vec x86_64_elf64_vec l1om_elf64_vec k1om_elf64_vec i386_pe_vec i386_pei_vec i386_elf32_vec" want64=true @@ -725,7 +725,7 @@ targ_defvec=i386_elf32_vec targ_selvecs=i386_coff_vec ;; - i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe) + i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-msys* | i[3-7]86-*-winnt | i[3-7]86-*-pe) targ_defvec=i386_pe_vec targ_selvecs="i386_pe_vec i386_pei_vec i386_elf32_vec" targ_underscore=yes diff -Naur gdb-7.6.50.20130624-orig/bfd/configure gdb-7.6.50.20130624/bfd/configure --- gdb-7.6.50.20130624-orig/bfd/configure 2013-06-19 14:30:56.000000000 +0400 +++ gdb-7.6.50.20130624/bfd/configure 2013-07-29 17:16:00.071289100 +0400 @@ -5990,7 +5990,7 @@ 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, @@ -6332,7 +6332,7 @@ 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' @@ -6912,7 +6912,7 @@ aix*) symcode='[BCDT]' ;; -cygwin* | mingw* | pw32* | cegcc*) +cygwin* | msys* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) @@ -8490,7 +8490,7 @@ # PIC is the default for these OSes. ;; - mingw* | cygwin* | pw32* | os2* | cegcc*) + mingw* | msys* | cygwin* | 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 @@ -8572,7 +8572,7 @@ fi ;; - mingw* | cygwin* | pw32* | os2* | cegcc*) + mingw* | msys* | cygwin* | 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). lt_prog_compiler_pic='-DDLL_EXPORT' @@ -9034,7 +9034,7 @@ 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++. @@ -9149,7 +9149,7 @@ fi ;; - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | msys* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' @@ -9580,7 +9580,7 @@ export_dynamic_flag_spec=-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 @@ -10481,14 +10481,14 @@ # 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}`~ @@ -10512,6 +10512,12 @@ 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}' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' @@ -11148,7 +11154,7 @@ lt_cv_dlopen_libs= ;; - cygwin*) + cygwin* | msys*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; @@ -13655,7 +13661,7 @@ case "${host}" in -*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) +*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-msys* | *-*-windows*) $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h ;; @@ -14932,7 +14938,7 @@ 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*) @@ -15082,6 +15088,10 @@ SHARED_LDFLAGS="-no-undefined" SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" ;; + *-*-msys*) + SHARED_LDFLAGS="-no-undefined" + SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lmsys-2.0 -lkernel32" + ;; esac if test -n "$SHARED_LIBADD"; then diff -Naur gdb-7.6.50.20130624-orig/bfd/configure.in gdb-7.6.50.20130624/bfd/configure.in --- gdb-7.6.50.20130624-orig/bfd/configure.in 2013-06-19 14:30:56.000000000 +0400 +++ gdb-7.6.50.20130624/bfd/configure.in 2013-07-29 17:16:00.000000000 +0400 @@ -577,6 +577,10 @@ SHARED_LDFLAGS="-no-undefined" SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" ;; + *-*-msys*) + SHARED_LDFLAGS="-no-undefined" + SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lmsys-2.0 -lkernel32" + ;; esac if test -n "$SHARED_LIBADD"; then diff -Naur gdb-7.6.50.20130624-orig/config/dfp.m4 gdb-7.6.50.20130624/config/dfp.m4 --- gdb-7.6.50.20130624-orig/config/dfp.m4 2013-04-30 16:40:42.000000000 +0400 +++ gdb-7.6.50.20130624/config/dfp.m4 2013-07-29 17:16:48.387695300 +0400 @@ -23,6 +23,9 @@ i?86*-*-cygwin* | x86_64*-*-cygwin*) enable_decimal_float=yes ;; + i?86*-*-msys* | x86_64*-*-msys*) + enable_decimal_float=yes + ;; *) AC_MSG_WARN([decimal float is not supported for this target, ignored]) enable_decimal_float=no diff -Naur gdb-7.6.50.20130624-orig/config/elf.m4 gdb-7.6.50.20130624/config/elf.m4 --- gdb-7.6.50.20130624-orig/config/elf.m4 2011-07-18 14:15:06.000000000 +0400 +++ gdb-7.6.50.20130624/config/elf.m4 2013-07-29 17:16:00.133789100 +0400 @@ -13,7 +13,7 @@ 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* | *-interix* | hppa[[12]]*-*-hpux*) target_elf=no diff -Naur gdb-7.6.50.20130624-orig/config/lthostflags.m4 gdb-7.6.50.20130624/config/lthostflags.m4 --- gdb-7.6.50.20130624-orig/config/lthostflags.m4 2010-12-06 04:40:20.000000000 +0300 +++ gdb-7.6.50.20130624/config/lthostflags.m4 2013-07-29 17:16:00.133789100 +0400 @@ -13,7 +13,7 @@ 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 -Naur gdb-7.6.50.20130624-orig/config/mmap.m4 gdb-7.6.50.20130624/config/mmap.m4 --- gdb-7.6.50.20130624-orig/config/mmap.m4 2012-05-29 19:58:15.000000000 +0400 +++ gdb-7.6.50.20130624/config/mmap.m4 2013-07-29 17:16:00.149414100 +0400 @@ -42,7 +42,7 @@ # 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 @@ # 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 -Naur gdb-7.6.50.20130624-orig/config/picflag.m4 gdb-7.6.50.20130624/config/picflag.m4 --- gdb-7.6.50.20130624-orig/config/picflag.m4 2013-04-30 16:40:42.000000000 +0400 +++ gdb-7.6.50.20130624/config/picflag.m4 2013-07-29 17:17:26.590820300 +0400 @@ -19,6 +19,8 @@ ;; i[[34567]]86-*-cygwin* | x86_64-*-cygwin*) ;; + i[[34567]]86-*-msys* | x86_64-*-msys*) + ;; i[[34567]]86-*-mingw* | x86_64-*-mingw*) ;; i[[34567]]86-*-interix[[3-9]]*) diff -Naur gdb-7.6.50.20130624-orig/config/tcl.m4 gdb-7.6.50.20130624/config/tcl.m4 --- gdb-7.6.50.20130624-orig/config/tcl.m4 2012-05-29 19:58:15.000000000 +0400 +++ gdb-7.6.50.20130624/config/tcl.m4 2013-07-29 17:16:00.165039100 +0400 @@ -33,7 +33,7 @@ # 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 @@ # 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 -Naur gdb-7.6.50.20130624-orig/config.guess gdb-7.6.50.20130624/config.guess --- gdb-7.6.50.20130624-orig/config.guess 2013-04-29 19:13:53.000000000 +0400 +++ gdb-7.6.50.20130624/config.guess 2013-07-29 21:12:28.546875000 +0400 @@ -845,6 +845,9 @@ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; + amd64:MSYS*:*:* | x86_64:MSYS*:*:*) + echo x86_64-unknown-msys + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; diff -Naur gdb-7.6.50.20130624-orig/config.rpath gdb-7.6.50.20130624/config.rpath --- gdb-7.6.50.20130624-orig/config.rpath 2011-02-14 00:00:08.000000000 +0300 +++ gdb-7.6.50.20130624/config.rpath 2013-07-29 17:16:00.211914100 +0400 @@ -109,7 +109,7 @@ 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 @@ 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 @@ ;; 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 @@ ;; bsdi4*) ;; - cygwin* | mingw* | pw32*) + cygwin* | msys* | mingw* | pw32*) shrext=.dll ;; darwin* | rhapsody*) diff -Naur gdb-7.6.50.20130624-orig/configure gdb-7.6.50.20130624/configure --- gdb-7.6.50.20130624-orig/configure 2013-06-22 20:44:13.000000000 +0400 +++ gdb-7.6.50.20130624/configure 2013-07-29 17:16:00.227539100 +0400 @@ -3013,7 +3013,7 @@ # Configure extra directories which are host specific case "${host}" in - *-cygwin*) + *-cygwin* | *-msys*) configdirs="$configdirs libtermcap" ;; esac @@ -3423,7 +3423,7 @@ # PR 46986 noconfigdirs="$noconfigdirs target-libgo" ;; - *-*-cygwin* | *-*-mingw*) + *-*-cygwin* | *-*-mingw* | *-*-msys*) noconfigdirs="$noconfigdirs target-libgo" ;; *-*-aix*) @@ -3679,7 +3679,7 @@ 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. @@ -3814,7 +3814,7 @@ 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; } @@ -6180,7 +6180,7 @@ 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* | *-interix* | hppa[12]*-*-hpux*) target_elf=no @@ -6197,7 +6197,7 @@ else if test x"$default_enable_lto" = x"yes" ; then case $target in - *-apple-darwin9* | *-cygwin* | *-mingw*) ;; + *-apple-darwin9* | *-cygwin* | *-msys* | *-mingw*) ;; # On other non-ELF platforms, LTO has yet to be validated. *) enable_lto=no ;; esac @@ -6208,7 +6208,7 @@ # 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*) ;; + *-cygwin* | *-msys* | *-mingw* | *-apple-darwin*) ;; *) if test x"$enable_lto" = x"yes"; then as_fn_error "LTO support is not enabled for this target." "$LINENO" 5 fi @@ -6218,7 +6218,7 @@ # 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 @@ -7004,7 +7004,7 @@ 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 @@ -7451,7 +7451,7 @@ 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 -Naur gdb-7.6.50.20130624-orig/configure.ac gdb-7.6.50.20130624/configure.ac --- gdb-7.6.50.20130624-orig/configure.ac 2013-06-24 05:49:55.000000000 +0400 +++ gdb-7.6.50.20130624/configure.ac 2013-07-29 17:16:00.258789100 +0400 @@ -375,7 +375,7 @@ # Configure extra directories which are host specific case "${host}" in - *-cygwin*) + *-cygwin* | *-msys*) configdirs="$configdirs libtermcap" ;; esac @@ -762,7 +762,7 @@ # PR 46986 noconfigdirs="$noconfigdirs target-libgo" ;; - *-*-cygwin* | *-*-mingw*) + *-*-cygwin* | *-*-msys* | *-*-mingw*) noconfigdirs="$noconfigdirs target-libgo" ;; *-*-aix*) @@ -1018,7 +1018,7 @@ 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. @@ -1153,7 +1153,7 @@ i[[3456789]]86-*-msdosdjgpp*) host_makefile_frag="config/mh-djgpp" ;; - *-cygwin*) + *-cygwin* | *-msys*) ACX_CHECK_CYGWIN_CAT_WORKS host_makefile_frag="config/mh-cygwin" ;; @@ -1685,7 +1685,7 @@ build_lto_plugin=yes ],[if test x"$default_enable_lto" = x"yes" ; then case $target in - *-apple-darwin9* | *-cygwin* | *-mingw*) ;; + *-apple-darwin9* | *-cygwin* | *-msys* | *-mingw*) ;; # On other non-ELF platforms, LTO has yet to be validated. *) enable_lto=no ;; esac @@ -1696,7 +1696,7 @@ # 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*) ;; + *-cygwin* | *-msys* | *-mingw* | *-apple-darwin*) ;; *) if test x"$enable_lto" = x"yes"; then AC_MSG_ERROR([LTO support is not enabled for this target.]) fi @@ -1706,7 +1706,7 @@ # 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 ]) @@ -2439,7 +2439,7 @@ 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 @@ -2885,7 +2885,7 @@ 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 -Naur gdb-7.6.50.20130624-orig/gdb/config/i386/msys.mh gdb-7.6.50.20130624/gdb/config/i386/msys.mh --- gdb-7.6.50.20130624-orig/gdb/config/i386/msys.mh 1970-01-01 03:00:00.000000000 +0300 +++ gdb-7.6.50.20130624/gdb/config/i386/msys.mh 2013-07-29 17:16:00.290039100 +0400 @@ -0,0 +1,3 @@ +MH_CFLAGS= +NATDEPFILES= i386-nat.o windows-nat.o i386-windows-nat.o +XM_CLIBS= diff -Naur gdb-7.6.50.20130624-orig/gdb/config/i386/msys64.mh gdb-7.6.50.20130624/gdb/config/i386/msys64.mh --- gdb-7.6.50.20130624-orig/gdb/config/i386/msys64.mh 1970-01-01 03:00:00.000000000 +0300 +++ gdb-7.6.50.20130624/gdb/config/i386/msys64.mh 2013-07-29 17:16:00.290039100 +0400 @@ -0,0 +1,20 @@ +# Native config information for GDB on PowerPC systems running FreeBSD. +# +# Copyright (C) 2013 Free Software Foundation, Inc. +# +# This file is part of GDB. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . */ + +NATDEPFILES= i386-nat.o windows-nat.o amd64-windows-nat.o diff -Naur gdb-7.6.50.20130624-orig/gdb/configure gdb-7.6.50.20130624/gdb/configure --- gdb-7.6.50.20130624-orig/gdb/configure 2013-05-23 22:36:59.000000000 +0400 +++ gdb-7.6.50.20130624/gdb/configure 2013-07-29 17:16:00.321289100 +0400 @@ -6976,7 +6976,7 @@ # have a seperate termcap library, or no curses library at all. case $host_os in - cygwin*) + cygwin* | msys*) if test -d $srcdir/libtermcap; then LIBS="../libtermcap/libtermcap.a $LIBS" ac_cv_search_tgetent="../libtermcap/libtermcap.a" @@ -12571,7 +12571,7 @@ if test x$gdb_cv_os_cygwin = xyes; then WIN32LIBS="-luser32" case "${target}" in - *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" + *cygwin* | *msys*) WIN32LIBS="$WIN32LIBS -limagehlp" ;; esac fi @@ -13471,7 +13471,7 @@ case "${host}" in -*-*-cygwin* | *-*-mingw* ) +*-*-cygwin* | *-*-msys* | *-*-mingw* ) configdir="win" ;; *) @@ -13514,7 +13514,7 @@ # 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 @@ -13643,7 +13643,7 @@ # 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 -Naur gdb-7.6.50.20130624-orig/gdb/configure.ac gdb-7.6.50.20130624/gdb/configure.ac --- gdb-7.6.50.20130624-orig/gdb/configure.ac 2013-05-23 22:37:00.000000000 +0400 +++ gdb-7.6.50.20130624/gdb/configure.ac 2013-07-29 17:16:00.352539100 +0400 @@ -619,7 +619,7 @@ # have a seperate termcap library, or no curses library at all. case $host_os in - cygwin*) + cygwin* | msys*) if test -d $srcdir/libtermcap; then LIBS="../libtermcap/libtermcap.a $LIBS" ac_cv_search_tgetent="../libtermcap/libtermcap.a" @@ -2009,7 +2009,7 @@ if test x$gdb_cv_os_cygwin = xyes; then WIN32LIBS="-luser32" case "${target}" in - *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" + *cygwin* | *msys*) WIN32LIBS="$WIN32LIBS -limagehlp" ;; esac fi @@ -2088,7 +2088,7 @@ AC_SUBST(WIN32LDAPP) case "${host}" in -*-*-cygwin* | *-*-mingw* ) +*-*-cygwin* | *-*-msys* | *-*-mingw* ) configdir="win" ;; *) diff -Naur gdb-7.6.50.20130624-orig/gdb/configure.host gdb-7.6.50.20130624/gdb/configure.host --- gdb-7.6.50.20130624-orig/gdb/configure.host 2013-03-05 17:37:10.000000000 +0400 +++ gdb-7.6.50.20130624/gdb/configure.host 2013-07-29 17:16:00.383789100 +0400 @@ -107,6 +107,7 @@ gdb_host=sol2-64 ;; i[34567]86-*-solaris*) gdb_host=i386sol2 ;; i[34567]86-*-cygwin*) gdb_host=cygwin ;; +i[34567]86-*-msys*) gdb_host=msys ;; ia64-*-hpux*) gdb_host=hpux ;; ia64-*-linux*) gdb_host=linux ;; @@ -183,6 +184,7 @@ gdb_host_obs=mingw-hdep.o ;; x86_64-*-cygwin*) gdb_host=cygwin64 ;; +x86_64-*-msys*) gdb_host=msys64 ;; m32r*-*-linux*) gdb_host=linux ;; xtensa*-*-linux*) gdb_host=linux ;; diff -Naur gdb-7.6.50.20130624-orig/gdb/configure.tgt gdb-7.6.50.20130624/gdb/configure.tgt --- gdb-7.6.50.20130624-orig/gdb/configure.tgt 2013-05-07 05:09:28.000000000 +0400 +++ gdb-7.6.50.20130624/gdb/configure.tgt 2013-07-29 17:16:00.399414100 +0400 @@ -238,6 +238,12 @@ windows-tdep.o" build_gdbserver=yes ;; +i[34567]86-*-msys*) + # Target: Intel 386 running win32 + gdb_target_obs="i386-tdep.o i386-cygwin-tdep.o i387-tdep.o \ + windows-tdep.o" + build_gdbserver=yes + ;; i[34567]86-*-mingw32*) # Target: Intel 386 running win32 gdb_target_obs="i386-tdep.o i386-cygwin-tdep.o i387-tdep.o \ @@ -664,7 +670,7 @@ i387-tdep.o i386bsd-tdep.o i386fbsd-tdep.o \ bsd-uthread.o solib-svr4.o" ;; -x86_64-*-mingw* | x86_64-*-cygwin*) +x86_64-*-mingw* | x86_64-*-cygwin* | x86_64-*-msys*) # Target: MingW/amd64 gdb_target_obs="amd64-tdep.o amd64-windows-tdep.o \ i386-tdep.o i386-cygwin-tdep.o i387-tdep.o \ @@ -709,7 +715,7 @@ *-*-*-gnu*) ;; # prevent non-GNU kernels to match the Hurd rule below *-*-gnu*) gdb_osabi=GDB_OSABI_HURD ;; *-*-mingw32ce*) gdb_osabi=GDB_OSABI_WINCE ;; -*-*-mingw* | *-*-cygwin*) +*-*-mingw* | *-*-cygwin* | *-*-msys*) gdb_osabi=GDB_OSABI_CYGWIN ;; *-*-dicos*) gdb_osabi=GDB_OSABI_DICOS ;; *-*-symbianelf*) diff -Naur gdb-7.6.50.20130624-orig/gdb/gdbserver/configure.srv gdb-7.6.50.20130624/gdb/gdbserver/configure.srv --- gdb-7.6.50.20130624-orig/gdb/gdbserver/configure.srv 2013-05-28 14:41:17.000000000 +0400 +++ gdb-7.6.50.20130624/gdb/gdbserver/configure.srv 2013-07-29 17:16:00.399414100 +0400 @@ -100,7 +100,7 @@ srv_linux_usrregs=yes srv_linux_thread_db=yes ;; - i[34567]86-*-cygwin*) srv_regobj="$srv_i386_regobj" + i[34567]86-*-cygwin* | i[34567]86-*-msys*) srv_regobj="$srv_i386_regobj" srv_tgtobj="i386-low.o win32-low.o win32-i386-low.o" srv_xmlfiles="$srv_i386_xmlfiles" ;; @@ -340,7 +340,10 @@ srv_tgtobj="i386-low.o i387-fp.o win32-low.o win32-i386-low.o" srv_xmlfiles="$srv_i386_xmlfiles" ;; - + x86_64-*-msys*) srv_regobj="$srv_amd64_regobj" + srv_tgtobj="i386-low.o i387-fp.o win32-low.o win32-i386-low.o" + srv_xmlfiles="$srv_i386_xmlfiles" + ;; xtensa*-*-linux*) srv_regobj=reg-xtensa.o srv_tgtobj="linux-low.o linux-osdata.o linux-xtensa-low.o linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" diff -Naur gdb-7.6.50.20130624-orig/gdb/gnulib/import/Makefile.am gdb-7.6.50.20130624/gdb/gnulib/import/Makefile.am --- gdb-7.6.50.20130624-orig/gdb/gnulib/import/Makefile.am 2013-06-21 20:17:01.000000000 +0400 +++ gdb-7.6.50.20130624/gdb/gnulib/import/Makefile.am 2013-07-29 17:16:00.430664100 +0400 @@ -292,7 +292,7 @@ case '$(host_os)' in \ darwin[56]*) \ need_charset_alias=true ;; \ - darwin* | cygwin* | mingw* | pw32* | cegcc*) \ + darwin* | cygwin* | msys* | mingw* | pw32* | cegcc*) \ need_charset_alias=false ;; \ *) \ need_charset_alias=true ;; \ diff -Naur gdb-7.6.50.20130624-orig/gdb/gnulib/import/Makefile.in gdb-7.6.50.20130624/gdb/gnulib/import/Makefile.in --- gdb-7.6.50.20130624-orig/gdb/gnulib/import/Makefile.in 2013-06-21 20:17:01.000000000 +0400 +++ gdb-7.6.50.20130624/gdb/gnulib/import/Makefile.in 2013-07-29 17:16:00.446289100 +0400 @@ -1396,7 +1396,7 @@ case '$(host_os)' in \ darwin[56]*) \ need_charset_alias=true ;; \ - darwin* | cygwin* | mingw* | pw32* | cegcc*) \ + darwin* | cygwin* | msys* | mingw* | pw32* | cegcc*) \ need_charset_alias=false ;; \ *) \ need_charset_alias=true ;; \ diff -Naur gdb-7.6.50.20130624-orig/gdb/testsuite/gdb.base/bigcore.exp gdb-7.6.50.20130624/gdb/testsuite/gdb.base/bigcore.exp --- gdb-7.6.50.20130624-orig/gdb/testsuite/gdb.base/bigcore.exp 2013-06-07 21:31:07.000000000 +0400 +++ gdb-7.6.50.20130624/gdb/testsuite/gdb.base/bigcore.exp 2013-07-29 17:16:00.493164100 +0400 @@ -34,7 +34,8 @@ || [istarget "*-*-hpux*"] || [istarget "*-*-solaris*"] || [istarget "*-*-darwin*"] - || [istarget "*-*-cygwin*"] } { + || [istarget "*-*-cygwin*"] + || [istarget "*-*-msys*"] } { untested "Kernel lacks sparse corefile support (PR gdb/1551)" return } diff -Naur gdb-7.6.50.20130624-orig/gdb/testsuite/gdb.base/fileio.exp gdb-7.6.50.20130624/gdb/testsuite/gdb.base/fileio.exp --- gdb-7.6.50.20130624-orig/gdb/testsuite/gdb.base/fileio.exp 2013-03-14 17:34:02.000000000 +0400 +++ gdb-7.6.50.20130624/gdb/testsuite/gdb.base/fileio.exp 2013-07-29 17:16:00.508789100 +0400 @@ -222,7 +222,7 @@ # This test fails on Cygwin because unlink() succeeds on Win32 systems # in that situation. -if [ishost *cygwin*] { +if { ([ishost *cygwin*] || [ishost *msys*]) } { setup_xfail "*-*-*" } gdb_test continue \ diff -Naur gdb-7.6.50.20130624-orig/gdb/testsuite/gdb.base/maint.exp gdb-7.6.50.20130624/gdb/testsuite/gdb.base/maint.exp --- gdb-7.6.50.20130624-orig/gdb/testsuite/gdb.base/maint.exp 2013-06-19 17:07:00.000000000 +0400 +++ gdb-7.6.50.20130624/gdb/testsuite/gdb.base/maint.exp 2013-07-29 17:16:00.508789100 +0400 @@ -161,7 +161,7 @@ # The timeout value is raised, because printing all the symbols and # statistical information about Cygwin and Windows libraries takes a lot # of time. -if [istarget "*-*-cygwin*"] { +if { ([istarget "*-*-cygwin*"] || [istarget "*-*-msys*"]) } { set oldtimeout $timeout set timeout [expr $timeout + 500] } @@ -447,6 +447,7 @@ # The "maint info sections DATA" test is marked for XFAIL on Windows, # because Windows has text sections marked DATA. setup_xfail "*-*-*cygwin*" +setup_xfail "*-*-*msys*" setup_xfail "*-*-*mingw*" gdb_test_multiple "maint info sections DATA" "maint info sections DATA" { diff -Naur gdb-7.6.50.20130624-orig/gdb/testsuite/gdb.base/shreloc.exp gdb-7.6.50.20130624/gdb/testsuite/gdb.base/shreloc.exp --- gdb-7.6.50.20130624-orig/gdb/testsuite/gdb.base/shreloc.exp 2013-01-01 10:33:26.000000000 +0400 +++ gdb-7.6.50.20130624/gdb/testsuite/gdb.base/shreloc.exp 2013-07-29 17:16:00.508789100 +0400 @@ -46,7 +46,7 @@ set lib_opts "debug" set exec_opts [list debug shlib=$lib1_sl shlib=$lib2_sl] -if {([istarget "*pc-cygwin"] || [istarget "*pc-mingw32"]) } { +if {([istarget "*pc-cygwin"] || [istarget "*pc-mingw32"] || [istarget "*pc-msys"]) } { lappend lib_opts "ldflags=-Wl,--image-base,0x04000000" } @@ -248,7 +248,7 @@ } } -if {([istarget "*pc-cygwin"] || [istarget "*pc-mingw32"]) } { +if {([istarget "*pc-cygwin"] || [istarget "*pc-mingw32"] || [istarget "*pc-msys"]) } { # # We know the names of some absolute symbols included in the # portable-executable (DLL) format. Check that they didn't get diff -Naur gdb-7.6.50.20130624-orig/gdb/testsuite/gdb.base/solib-weak.exp gdb-7.6.50.20130624/gdb/testsuite/gdb.base/solib-weak.exp --- gdb-7.6.50.20130624-orig/gdb/testsuite/gdb.base/solib-weak.exp 2013-01-01 10:33:26.000000000 +0400 +++ gdb-7.6.50.20130624/gdb/testsuite/gdb.base/solib-weak.exp 2013-07-29 17:16:00.571289100 +0400 @@ -25,7 +25,8 @@ if {([istarget arm*-*-symbianelf*] || [istarget *-*-mingw*] || [istarget *-*-cygwin*] - || [istarget *-*-pe*])} { + || [istarget *-*-pe*] + || [istarget *-*-msys*]) } { return 0 } diff -Naur gdb-7.6.50.20130624-orig/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp gdb-7.6.50.20130624/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp --- gdb-7.6.50.20130624-orig/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp 2013-01-18 00:40:44.000000000 +0400 +++ gdb-7.6.50.20130624/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp 2013-07-29 17:16:00.571289100 +0400 @@ -32,7 +32,8 @@ gdb_test "break 'z:file.c':func" {Breakpoint [0-9]+ at .*} set dos [expr [istarget "*-*-cygwin*"] || [istarget "i?86-*-mingw*"] \ - || [istarget "*-*-msdosdjgpp*"] || [istarget "*-*-go32*"] ] + || [istarget "*-*-msdosdjgpp*"] || [istarget "*-*-go32*"] \ + || [istarget "*-*-msys*"] ] if { $dos } { gdb_test "break file.c:func" {Breakpoint [0-9]+ at .*} diff -Naur gdb-7.6.50.20130624-orig/gdb/testsuite/lib/gdb.exp gdb-7.6.50.20130624/gdb/testsuite/lib/gdb.exp --- gdb-7.6.50.20130624-orig/gdb/testsuite/lib/gdb.exp 2013-06-07 21:31:09.000000000 +0400 +++ gdb-7.6.50.20130624/gdb/testsuite/lib/gdb.exp 2013-07-29 17:16:00.602539100 +0400 @@ -1600,7 +1600,8 @@ || [istarget arm*-*-symbianelf*] || [istarget *-*-mingw*] || [istarget *-*-cygwin*] - || [istarget *-*-pe*])} { + || [istarget *-*-pe*] + || [istarget *-*-msys*])} { return 0 } @@ -2554,7 +2555,8 @@ lappend source "-Wl,$shlib_name" } elseif { ([istarget "*-*-mingw*"] || [istarget *-*-cygwin*] - || [istarget *-*-pe*])} { + || [istarget *-*-pe*] + || [istarget *-*-msys*])} { lappend source "${shlib_name}.a" } else { lappend source $shlib_name @@ -2562,7 +2564,8 @@ if { $shlib_found == 0 } { set shlib_found 1 if { ([istarget "*-*-mingw*"] - || [istarget *-*-cygwin*]) } { + || [istarget *-*-cygwin*] + || [istarget *-*-msys*]) } { lappend new_options "additional_flags=-Wl,--enable-auto-import" } } @@ -2581,6 +2584,7 @@ if { $shlib_load || ($shlib_found && [is_remote target]) } { if { ([istarget "*-*-mingw*"] || [istarget *-*-cygwin*] + || [istarget *-*-msys*] || [istarget *-*-pe*] || [istarget hppa*-*-hpux*])} { # Do not need anything. @@ -2633,7 +2637,8 @@ if { $type == "executable" } { if { ([istarget "*-*-mingw*"] || [istarget "*-*-*djgpp"] - || [istarget "*-*-cygwin*"])} { + || [istarget "*-*-cygwin*"] + || [istarget "*-*-msys*"])} { # Force output to unbuffered mode, by linking in an object file # with a global contructor that calls setvbuf. # @@ -2743,6 +2748,7 @@ if { !([istarget "powerpc*-*-aix*"] || [istarget "rs6000*-*-aix*"] || [istarget "*-*-cygwin*"] + || [istarget "*-*-msys*"] || [istarget "*-*-mingw*"] || [istarget "*-*-pe*"]) } { lappend obj_options "additional_flags=-fpic" @@ -2785,6 +2791,7 @@ if { ([istarget "*-*-mingw*"] || [istarget *-*-cygwin*] + || [istarget *-*-msys*] || [istarget *-*-pe*]) } { if { [is_remote host] } { set name [file tail ${dest}] @@ -4361,7 +4368,7 @@ # TODO: find out automatically if the target needs this. proc gdb_target_symbol_prefix_flags {} { - if { [istarget "*-*-cygwin*"] || [istarget "i?86-*-mingw*"] + if { [istarget "*-*-cygwin*"] || [istarget "i?86-*-mingw*"] || [istarget "*-*-msys*"] || [istarget "*-*-msdosdjgpp*"] || [istarget "*-*-go32*"] } { return "additional_flags=-DSYMBOL_PREFIX=\"_\"" } else { diff -Naur gdb-7.6.50.20130624-orig/gdb/windows-nat.c gdb-7.6.50.20130624/gdb/windows-nat.c --- gdb-7.6.50.20130624-orig/gdb/windows-nat.c 2013-06-11 15:03:42.000000000 +0400 +++ gdb-7.6.50.20130624/gdb/windows-nat.c 2013-07-29 17:16:00.633789100 +0400 @@ -751,9 +751,15 @@ else error (_("dll path too long")); } +#ifdef __MSYS__ + /* Record msys-2.0.dll .text start/end. */ + p = strchr (so->so_name, '\0') - (sizeof ("/msys-2.0.dll") - 1); + if (p >= so->so_name && strcasecmp (p, "/msys-2.0.dll") == 0) +#else /* Record cygwin1.dll .text start/end. */ p = strchr (so->so_name, '\0') - (sizeof ("/cygwin1.dll") - 1); if (p >= so->so_name && strcasecmp (p, "/cygwin1.dll") == 0) +#endif { bfd *abfd; asection *text = NULL; diff -Naur gdb-7.6.50.20130624-orig/libdecnumber/configure gdb-7.6.50.20130624/libdecnumber/configure --- gdb-7.6.50.20130624-orig/libdecnumber/configure 2013-03-28 06:00:01.000000000 +0400 +++ gdb-7.6.50.20130624/libdecnumber/configure 2013-07-29 17:16:00.680664100 +0400 @@ -4613,6 +4613,9 @@ i?86*-*-cygwin* | x86_64*-*-cygwin*) enable_decimal_float=yes ;; + i?86*-*-msys* | x86_64*-*-msys*) + enable_decimal_float=yes + ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: decimal float is not supported for this target, ignored" >&5 $as_echo "$as_me: WARNING: decimal float is not supported for this target, ignored" >&2;} diff -Naur gdb-7.6.50.20130624-orig/libiberty/configure gdb-7.6.50.20130624/libiberty/configure --- gdb-7.6.50.20130624-orig/libiberty/configure 2013-06-01 05:01:43.000000000 +0400 +++ gdb-7.6.50.20130624/libiberty/configure 2013-07-29 17:16:00.711914100 +0400 @@ -4896,6 +4896,8 @@ ;; i[34567]86-*-cygwin* | x86_64-*-cygwin*) ;; + i[34567]86-*-msys* | x86_64-*-msys*) + ;; i[34567]86-*-mingw* | x86_64-*-mingw*) ;; i[34567]86-*-interix[3-9]*) @@ -5801,7 +5803,7 @@ case "${host}" in - *-*-cygwin* | *-*-mingw*) + *-*-cygwin* | *-*-msys* | *-*-mingw*) $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h $as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h diff -Naur gdb-7.6.50.20130624-orig/libiberty/configure.ac gdb-7.6.50.20130624/libiberty/configure.ac --- gdb-7.6.50.20130624-orig/libiberty/configure.ac 2013-06-01 05:01:44.000000000 +0400 +++ gdb-7.6.50.20130624/libiberty/configure.ac 2013-07-29 17:16:00.743164100 +0400 @@ -528,7 +528,7 @@ AC_SUBST(target_header_dir) case "${host}" in - *-*-cygwin* | *-*-mingw*) + *-*-cygwin* | *-*-msys* | *-*-mingw*) AC_DEFINE(HAVE_SYS_ERRLIST) AC_DEFINE(HAVE_SYS_NERR) ;; diff -Naur gdb-7.6.50.20130624-orig/libtool.m4 gdb-7.6.50.20130624/libtool.m4 --- gdb-7.6.50.20130624-orig/libtool.m4 2012-09-15 03:55:22.000000000 +0400 +++ gdb-7.6.50.20130624/libtool.m4 2013-07-29 17:16:00.805664100 +0400 @@ -1485,7 +1485,7 @@ 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, @@ -1727,7 +1727,7 @@ lt_cv_dlopen_libs= ;; - cygwin*) + cygwin* | msys*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; @@ -2198,14 +2198,14 @@ # 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}`~ @@ -2229,6 +2229,12 @@ 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"]) + ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' @@ -2995,7 +3001,7 @@ 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' @@ -3279,7 +3285,7 @@ [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*) @@ -3354,7 +3360,7 @@ aix*) symcode='[[BCDT]]' ;; -cygwin* | mingw* | pw32* | cegcc*) +cygwin* | msys* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) @@ -3601,7 +3607,7 @@ 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 @@ -3914,7 +3920,7 @@ # 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 @@ -3997,7 +4003,7 @@ 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], [], @@ -4230,7 +4236,7 @@ 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' ;; *) @@ -4282,7 +4288,7 @@ 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++. @@ -4397,7 +4403,7 @@ 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' @@ -4770,7 +4776,7 @@ _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 @@ -5714,7 +5720,7 @@ 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 -Naur gdb-7.6.50.20130624-orig/ltmain.sh gdb-7.6.50.20130624/ltmain.sh --- gdb-7.6.50.20130624-orig/ltmain.sh 2011-01-13 21:52:53.000000000 +0300 +++ gdb-7.6.50.20130624/ltmain.sh 2013-07-29 17:16:00.836914100 +0400 @@ -976,7 +976,7 @@ 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 @@ # 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 @@ '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 @@ # 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 @@ # 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 @@ $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 @@ $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 @@ } 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 @@ # 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_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 @@ ( 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 @@ { EOF case "$host" in - *mingw* | *cygwin* ) + *mingw* | *cygwin* | *msys* ) # make stdout use "unix" line endings echo " setmode(1,_O_BINARY);" ;; @@ -4233,7 +4233,7 @@ { $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 @@ ;; 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 @@ -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 @@ -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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ # 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 @@ 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 @@ # 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 -Naur gdb-7.6.50.20130624-orig/ltoptions.m4 gdb-7.6.50.20130624/ltoptions.m4 --- gdb-7.6.50.20130624-orig/ltoptions.m4 2010-01-10 00:11:32.000000000 +0300 +++ gdb-7.6.50.20130624/ltoptions.m4 2013-07-29 17:16:00.883789100 +0400 @@ -126,7 +126,7 @@ [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 -Naur gdb-7.6.50.20130624-orig/opcodes/configure gdb-7.6.50.20130624/opcodes/configure --- gdb-7.6.50.20130624-orig/opcodes/configure 2013-06-21 19:01:57.000000000 +0400 +++ gdb-7.6.50.20130624/opcodes/configure 2013-07-29 17:16:00.883789100 +0400 @@ -5717,7 +5717,7 @@ 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, @@ -6059,7 +6059,7 @@ 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' @@ -6639,7 +6639,7 @@ aix*) symcode='[BCDT]' ;; -cygwin* | mingw* | pw32* | cegcc*) +cygwin* | msys* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) @@ -8218,7 +8218,7 @@ # 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 @@ -8300,7 +8300,7 @@ 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). lt_prog_compiler_pic='-DDLL_EXPORT' @@ -8762,7 +8762,7 @@ 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++. @@ -8877,7 +8877,7 @@ fi ;; - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | msys* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' @@ -9308,7 +9308,7 @@ export_dynamic_flag_spec=-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 @@ -10209,14 +10209,14 @@ # 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}`~ @@ -10240,6 +10240,12 @@ 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}' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' @@ -10876,7 +10882,7 @@ lt_cv_dlopen_libs= ;; - cygwin*) + cygwin* | msys*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; @@ -12247,7 +12253,7 @@ 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*) @@ -12417,6 +12423,10 @@ SHARED_LDFLAGS="-no-undefined" SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin" ;; + *-*-msys*) + SHARED_LDFLAGS="-no-undefined" + SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lmsys-2.0" + ;; *-*-darwin*) SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}" SHARED_DEPENDENCIES="../bfd/libbfd.la" diff -Naur gdb-7.6.50.20130624-orig/opcodes/configure.in gdb-7.6.50.20130624/opcodes/configure.in --- gdb-7.6.50.20130624-orig/opcodes/configure.in 2013-06-21 19:01:57.000000000 +0400 +++ gdb-7.6.50.20130624/opcodes/configure.in 2013-07-29 17:16:00.930664100 +0400 @@ -170,6 +170,10 @@ SHARED_LDFLAGS="-no-undefined" SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin" ;; + *-*-msys*) + SHARED_LDFLAGS="-no-undefined" + SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lmsys-2.0" + ;; *-*-darwin*) SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}" SHARED_DEPENDENCIES="../bfd/libbfd.la" diff -Naur gdb-7.6.50.20130624-orig/readline/configure gdb-7.6.50.20130624/readline/configure --- gdb-7.6.50.20130624-orig/readline/configure 2013-05-22 13:51:49.000000000 +0400 +++ gdb-7.6.50.20130624/readline/configure 2013-07-29 17:16:00.946289100 +0400 @@ -2337,7 +2337,7 @@ CROSS_COMPILE= if test "x$cross_compiling" = "xyes"; then case "${host}" in - *-cygwin*) + *-cygwin* | *-msys*) cross_cache=${srcdir}/cross-build/cygwin.cache ;; *-mingw*) diff -Naur gdb-7.6.50.20130624-orig/readline/configure.in gdb-7.6.50.20130624/readline/configure.in --- gdb-7.6.50.20130624-orig/readline/configure.in 2013-05-22 13:51:49.000000000 +0400 +++ gdb-7.6.50.20130624/readline/configure.in 2013-07-29 17:16:00.961914100 +0400 @@ -81,7 +81,7 @@ CROSS_COMPILE= if test "x$cross_compiling" = "xyes"; then case "${host}" in - *-cygwin*) + *-cygwin* | *-msys*) cross_cache=${srcdir}/cross-build/cygwin.cache ;; *-mingw*) diff -Naur gdb-7.6.50.20130624-orig/readline/support/config.guess gdb-7.6.50.20130624/readline/support/config.guess --- gdb-7.6.50.20130624-orig/readline/support/config.guess 2011-05-12 03:38:44.000000000 +0400 +++ gdb-7.6.50.20130624/readline/support/config.guess 2013-07-29 17:16:00.961914100 +0400 @@ -781,6 +781,9 @@ i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; @@ -818,6 +821,9 @@ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; + amd64:MSYS*:*:* | x86_64:MSYS*:*:*) + echo x86_64-unknown-msys + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; diff -Naur gdb-7.6.50.20130624-orig/readline/support/config.rpath gdb-7.6.50.20130624/readline/support/config.rpath --- gdb-7.6.50.20130624-orig/readline/support/config.rpath 2011-05-12 03:38:44.000000000 +0400 +++ gdb-7.6.50.20130624/readline/support/config.rpath 2013-07-29 17:16:01.008789100 +0400 @@ -108,7 +108,7 @@ 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++. @@ -148,7 +148,7 @@ 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' @@ -267,7 +267,7 @@ ;; 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 @@ -439,7 +439,7 @@ ;; bsdi4*) ;; - cygwin* | mingw* | pw32*) + cygwin* | msys* | mingw* | pw32*) shrext=.dll ;; darwin* | rhapsody*) diff -Naur gdb-7.6.50.20130624-orig/readline/support/config.sub gdb-7.6.50.20130624/readline/support/config.sub --- gdb-7.6.50.20130624-orig/readline/support/config.sub 2011-05-12 03:38:44.000000000 +0400 +++ gdb-7.6.50.20130624/readline/support/config.sub 2013-07-29 17:16:01.040039100 +0400 @@ -1256,7 +1256,7 @@ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ diff -Naur gdb-7.6.50.20130624-orig/readline/support/shlib-install gdb-7.6.50.20130624/readline/support/shlib-install --- gdb-7.6.50.20130624-orig/readline/support/shlib-install 2011-05-12 03:38:44.000000000 +0400 +++ gdb-7.6.50.20130624/readline/support/shlib-install 2013-07-29 17:16:01.040039100 +0400 @@ -90,6 +90,22 @@ ${echo} ${RM} ${BINDIR}/${LIBNAME} ${echo} ${RM} ${INSTALLDIR}/${IMPLIBNAME} fi ;; +msys*) + IMPLIBNAME=`echo ${LIBNAME} \ + | sed -e 's,^msys-,lib,' -e 's,[0-9]*.dll$,.dll.a,'` + if [ -z "$uninstall" ]; then + ${echo} $RM ${BINDIR}/${LIBNAME}.${OLDSUFF} + if [ -f "$BINDIR/$LIBNAME" ]; then + ${echo} $MV $BINDIR/$LIBNAME $BINDIR/$LIBNAME.$OLDSUFF + fi + ${echo} $MV ${INSTALLDIR}/${LIBNAME} ${BINDIR}/${LIBNAME} + ${echo} chmod a+x ${BINDIR}/${LIBNAME} + ${echo} eval ${INSTALLPROG} ${LIBNAME}.a \ + ${INSTALLDIR}/${IMPLIBNAME} + else + ${echo} ${RM} ${BINDIR}/${LIBNAME} + ${echo} ${RM} ${INSTALLDIR}/${IMPLIBNAME} + fi ;; *) ;; esac @@ -193,7 +209,7 @@ fi ;; -cygwin*|mingw*) +cygwin*|msys*|mingw*) # Links to .dlls don't work. Hence shobj-conf used DLLVERSION.dll # instead of so.SHLIB_MAJOR.SHLIB_MINOR. The postinstall above # took care of everything else. diff -Naur gdb-7.6.50.20130624-orig/readline/support/shobj-conf gdb-7.6.50.20130624/readline/support/shobj-conf --- gdb-7.6.50.20130624-orig/readline/support/shobj-conf 2011-05-12 03:38:44.000000000 +0400 +++ gdb-7.6.50.20130624/readline/support/shobj-conf 2013-07-29 17:16:01.040039100 +0400 @@ -519,6 +519,23 @@ SHLIB_DLLVERSION="$DLLVERSION" fi ;; +msys*) + SHOBJ_LD='$(CC)' + SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a' + SHLIB_LIBPREF='msys-' + SHLIB_LIBSUFF='dll' + SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)' + SHLIB_LIBS='$(TERMCAP_LIB)' + + SHLIB_DOT= + # For official msys releases, DLLVERSION will be defined in the + # environment of configure, and will be incremented any time the API + # changes in a non-backwards compatible manner. Otherwise, it is just + # SHLIB_MAJOR. + if [ -n "$DLLVERSION" ] ; then + SHLIB_DLLVERSION="$DLLVERSION" + fi + ;; mingw*) SHOBJ_LD='$(CC)'