public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Insight CVS and MingW
@ 2010-12-12 20:11 Michael Trensch
  2010-12-15 19:10 ` Keith Seitz
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Trensch @ 2010-12-12 20:11 UTC (permalink / raw)
  To: insight

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

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

[-- Attachment #2: Insight_Mingw.patch --]
[-- Type: text/plain, Size: 5491 bytes --]

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 */
 
 \f
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') {}
 	    }

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-10 21:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-12 20:11 Insight CVS and MingW Michael Trensch
2010-12-15 19:10 ` Keith Seitz
2011-01-08 22:33   ` Dave Murphy
2011-01-10 21:53     ` Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).