Insight CVS and MingW
Michael Trensch <[email protected]>
| Newsgroups | gmane.comp.debugging.insight |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I am currently trying to build a MingW Version of Insight to be able to debug a ARM evaluation board using openOCD as gdbserver. I was tired of using cygwin as I got into trouble when multiple applications were using different cygwin dll's. I know Keith is trying to integrate some patches to make it work, but I did not want to wait (no offense to your work) So I fiddled around a little in the scripts and sources and got a "arm-elf-insight.exe" under MingW. My evaluation board is currently not on my desk and I don't know if I will get it back soon, so I don't have a chance to try it. But I wanted to post the patch which allowed me to compile Insight under my Msys / GCC.4.5.0 environment. I hope it does not break any Cygwin or other support. Probably it can help Keith on his MingW support, if he is not already trying the same things while taking over his wife's PC ;) Best Regards, Michael
Insight_Mingw.patch
(text/plain, 5.4 KB)
diff --git a/src/config/tcl.m4 b/src/config/tcl.m4
index 900a2ce..cf7e801 100644
--- a/src/config/tcl.m4
+++ b/src/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*|*-*-mingw*) 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*|*-*-mingw*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${ac_cv_c_tkconfig}" = x ; then
diff --git a/src/gdb/configure b/src/gdb/configure
index 2bc49d6..6ab54a8 100755
--- a/src/gdb/configure
+++ b/src/gdb/configure
@@ -15045,7 +15045,7 @@ else
# First check to see if --with-tcl was specified.
case "${host}" in
- *-*-cygwin*) platDir="win" ;;
+ *-*-cygwin*|*-*-mingw*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${with_tclconfig}" != x ; then
@@ -15174,7 +15174,7 @@ else
# then check for a private Tk library
case "${host}" in
- *-*-cygwin*) platDir="win" ;;
+ *-*-cygwin*|*-*-mingw*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${ac_cv_c_tkconfig}" = x ; then
diff --git a/src/gdb/gdbtk/plugins/configure b/src/gdb/gdbtk/plugins/configure
index cff4096..51a9445 100755
--- a/src/gdb/gdbtk/plugins/configure
+++ b/src/gdb/gdbtk/plugins/configure
@@ -3407,7 +3407,7 @@ else
# First check to see if --with-tcl was specified.
case "${host}" in
- *-*-cygwin*) platDir="win" ;;
+ *-*-cygwin*|*-*-mingw*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${with_tclconfig}" != x ; then
@@ -3602,7 +3602,7 @@ else
# then check for a private Tk library
case "${host}" in
- *-*-cygwin*) platDir="win" ;;
+ *-*-cygwin*|*-*-mingw*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${ac_cv_c_tkconfig}" = x ; then
diff --git a/src/libgui/configure b/src/libgui/configure
index 797affb..a5d0bac 100755
--- a/src/libgui/configure
+++ b/src/libgui/configure
@@ -4621,7 +4621,7 @@ if test x$ide_cv_os_cygwin32 = xyes; then
fi
case "${host}" in
-*-*-cygwin*)
+*-*-cygwin*|*-*-mingw*)
touch ac$$.c
if ${CC} -c -mwin32 ac$$.c >/dev/null 2>&1; then
case "$LIBGUI_CFLAGS" in
@@ -4633,7 +4633,7 @@ case "${host}" in
;;
esac
case "${host}" in
-*-*-cygwin*)
+*-*-cygwin*|*-*-mingw*)
LIBGUI_CFLAGS="-DWIN32 $LIBGUI_CFLAGS" ;;
esac
@@ -4673,7 +4673,7 @@ else
# First check to see if --with-tcl was specified.
case "${host}" in
- *-*-cygwin*) platDir="win" ;;
+ *-*-cygwin*|*-*-mingw*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${with_tclconfig}" != x ; then
@@ -4868,7 +4868,7 @@ else
# then check for a private Tk library
case "${host}" in
- *-*-cygwin*) platDir="win" ;;
+ *-*-cygwin*|*-*-mingw*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${ac_cv_c_tkconfig}" = x ; then
@@ -5027,7 +5027,7 @@ cd ${here}
if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
# Using in-tree Tcl/Tk
case "${host}" in
- *-*-cygwin*) platDir="win" ;;
+ *-*-cygwin*|*-*-mingw*) platDir="win" ;;
*) platDir="unix" ;;
esac
diff --git a/src/libgui/configure.ac b/src/libgui/configure.ac
index 0eb55b0..d43156b 100644
--- a/src/libgui/configure.ac
+++ b/src/libgui/configure.ac
@@ -53,7 +53,7 @@ if test x$ide_cv_os_cygwin32 = xyes; then
fi
case "${host}" in
-*-*-cygwin*)
+*-*-cygwin*|*-*-mingw*)
touch ac$$.c
if ${CC} -c -mwin32 ac$$.c >/dev/null 2>&1; then
case "$LIBGUI_CFLAGS" in
@@ -65,7 +65,7 @@ case "${host}" in
;;
esac
case "${host}" in
-*-*-cygwin*)
+*-*-cygwin*|*-*-mingw*)
LIBGUI_CFLAGS="-DWIN32 $LIBGUI_CFLAGS" ;;
esac
AC_SUBST(LIBGUI_CFLAGS)
@@ -93,7 +93,7 @@ cd ${here}
if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
# Using in-tree Tcl/Tk
case "${host}" in
- *-*-cygwin*) platDir="win" ;;
+ *-*-cygwin*|*-*-mingw*) platDir="win" ;;
*) platDir="unix" ;;
esac
diff --git a/src/tcl/win/tclWinChan.c b/src/tcl/win/tclWinChan.c
index 731df20..2cecf34 100644
--- a/src/tcl/win/tclWinChan.c
+++ b/src/tcl/win/tclWinChan.c
@@ -122,8 +122,8 @@ static Tcl_ChannelType fileChannelType = {
};
#ifdef HAVE_NO_SEH
-static void *ESP;
-static void *EBP;
+static void *ESP __attribute__((used));
+static void *EBP __attribute__((used));
#endif /* HAVE_NO_SEH */
diff --git a/src/tcl/win/tclWinDde.c b/src/tcl/win/tclWinDde.c
index 80e3070..b745abf 100644
--- a/src/tcl/win/tclWinDde.c
+++ b/src/tcl/win/tclWinDde.c
@@ -1175,7 +1175,8 @@ Tcl_DdeObjCmd(
}
case DDE_EVAL: {
objc -= (async + 3);
- ((Tcl_Obj **) objv) += (async + 3);
+ //((Tcl_Obj **) objv) += (async + 3);
+ objv += (async + 3);
/*
* See if the target interpreter is local. If so, execute
diff --git a/src/tcl/win/tclWinReg.c b/src/tcl/win/tclWinReg.c
index ee453c7..21772a1 100644
--- a/src/tcl/win/tclWinReg.c
+++ b/src/tcl/win/tclWinReg.c
@@ -747,7 +747,7 @@ GetValue(
Tcl_NewStringObj(Tcl_DStringValue(&buf),
Tcl_DStringLength(&buf)));
if (regWinProcs->useWide) {
- while (*((Tcl_UniChar *)p)++ != 0) {}
+ while (*((Tcl_UniChar *)p++) != 0) {}
} else {
while (*p++ != '\0') {}
}