aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/compile/compile.c4
-rw-r--r--gdb/config.in3
-rwxr-xr-xgdb/configure2
-rw-r--r--gdb/configure.ac2
-rw-r--r--gdb/testsuite/ChangeLog11
-rw-r--r--gdb/testsuite/gdb.compile/compile-ops.exp2
-rw-r--r--gdb/testsuite/gdb.compile/compile-setjmp.exp2
-rw-r--r--gdb/testsuite/gdb.compile/compile-tls.exp2
-rw-r--r--gdb/testsuite/gdb.compile/compile.exp2
-rw-r--r--gdb/testsuite/lib/gdb.exp3
11 files changed, 36 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b672dc3..42ace6d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2014-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix MinGW compilation.
+ * compile/compile.c (get_compile_file_tempdir): Call error if
+ !HAVE_MKDTEMP.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+ * configure.ac (AC_CHECK_FUNCS): Add mkdtemp.
+
2014-12-17 Doug Evans <xdje42@gmail.com>
* valops.c (value_maybe_namespace_elt): Remove redundant call to
diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
index 6d3d16e..414fc35 100644
--- a/gdb/compile/compile.c
+++ b/gdb/compile/compile.c
@@ -191,7 +191,11 @@ get_compile_file_tempdir (void)
strcpy (tname, TEMPLATE);
#undef TEMPLATE
+#ifdef HAVE_MKDTEMP
tempdir_name = mkdtemp (tname);
+#else
+ error (_("Command not supported on this host."));
+#endif
if (tempdir_name == NULL)
perror_with_name (_("Could not make temporary directory"));
diff --git a/gdb/config.in b/gdb/config.in
index fb3c315..9d3f32d 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -231,6 +231,9 @@
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
+/* Define to 1 if you have the `mkdtemp' function. */
+#undef HAVE_MKDTEMP
+
/* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP
diff --git a/gdb/configure b/gdb/configure
index 8985230..7ff74ba 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -10496,7 +10496,7 @@ for ac_func in getrusage getuid getgid \
sigaction sigprocmask sigsetmask socketpair \
ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
setrlimit getrlimit posix_madvise waitpid \
- ptrace64 sigaltstack
+ ptrace64 sigaltstack mkdtemp
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
diff --git a/gdb/configure.ac b/gdb/configure.ac
index c933e3f..e972ac2 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1317,7 +1317,7 @@ AC_CHECK_FUNCS([getrusage getuid getgid \
sigaction sigprocmask sigsetmask socketpair \
ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
setrlimit getrlimit posix_madvise waitpid \
- ptrace64 sigaltstack])
+ ptrace64 sigaltstack mkdtemp])
AM_LANGINFO_CODESET
GDB_AC_COMMON
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 9e69efc..f749d2e 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,14 @@
+2014-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix MinGW compilation.
+ * gdb.compile/compile-ops.exp: Update untested message if
+ !skip_compile_feature_tests.
+ * gdb.compile/compile-setjmp.exp: Likewise.
+ * gdb.compile/compile-tls.exp: Likewise.
+ * gdb.compile/compile.exp: Likewise.
+ * lib/gdb.exp (skip_compile_feature_tests): Check also "Command not
+ supported on this host".
+
2014-12-16 Doug Evans <xdje42@gmail.com>
* boards/stabs.exp: New file.
diff --git a/gdb/testsuite/gdb.compile/compile-ops.exp b/gdb/testsuite/gdb.compile/compile-ops.exp
index c295836..4fc950f 100644
--- a/gdb/testsuite/gdb.compile/compile-ops.exp
+++ b/gdb/testsuite/gdb.compile/compile-ops.exp
@@ -411,7 +411,7 @@ if ![runto func] {
}
if {[skip_compile_feature_tests]} {
- untested "could not find libcc1 shared library"
+ untested "compile command not supported (could not find libcc1 shared library?)"
return -1
}
diff --git a/gdb/testsuite/gdb.compile/compile-setjmp.exp b/gdb/testsuite/gdb.compile/compile-setjmp.exp
index 557c1f0..8f876e2 100644
--- a/gdb/testsuite/gdb.compile/compile-setjmp.exp
+++ b/gdb/testsuite/gdb.compile/compile-setjmp.exp
@@ -24,7 +24,7 @@ if ![runto_main] {
}
if {[skip_compile_feature_tests]} {
- untested "could not find libcc1 shared library"
+ untested "compile command not supported (could not find libcc1 shared library?)"
return -1
}
diff --git a/gdb/testsuite/gdb.compile/compile-tls.exp b/gdb/testsuite/gdb.compile/compile-tls.exp
index e9613f5..d95a351 100644
--- a/gdb/testsuite/gdb.compile/compile-tls.exp
+++ b/gdb/testsuite/gdb.compile/compile-tls.exp
@@ -27,7 +27,7 @@ if ![runto_main] then {
}
if {[skip_compile_feature_tests]} {
- untested "could not find libcc1 shared library"
+ untested "compile command not supported (could not find libcc1 shared library?)"
return -1
}
diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp
index d0dd791..040b727 100644
--- a/gdb/testsuite/gdb.compile/compile.exp
+++ b/gdb/testsuite/gdb.compile/compile.exp
@@ -57,7 +57,7 @@ if ![runto_main] {
}
if {[skip_compile_feature_tests]} {
- untested "could not find libcc1 shared library"
+ untested "compile command not supported (could not find libcc1 shared library?)"
return -1
}
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 3a3a396..08087f2 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2538,6 +2538,9 @@ proc skip_compile_feature_tests {} {
"Could not load libcc1.*\r\n$gdb_prompt $" {
set result 1
}
+ -re "Command not supported on this host\\..*\r\n$gdb_prompt $" {
+ set result 1
+ }
-re "\r\n$gdb_prompt $" {
}
}