[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] Porting Vincent's GCC 4.3.0 to Native, problems so far....



Hi all.

Had very limited time to do much of anything, so I figured I could go about letting the compile of the newest GCC run on my Falcon for a few days just checking in at occasional intervals. Not working so far.

I have built the gmp-4.2.2 package, basically the first step to compiling GCC (and eventually making an RPM). Compiles fine. Did a "make check" and have been able to get thru many items (some required additional stack space for the test exe, no big deal), but I have gotten stuck with one problem. Have had no time to really research it, so I'm sharing here so the knowledge is not lost.

Package was built with GCC 2.95.3, latest Binutils, and a CVS MiNTLib (not sure of date, but within the last few months).

gmp-4.2.2/tests/misc/t-printf fails:

Here is what I get:

make[1]: Entering directory `/d/usr/local/src/gmp-4.2.2/tests/misc'
gmp_obstack_vprintf wrong
  fmt      |%Md|
  got      |1234.00000e+03p+16ummvm/trunk/backends/midi/dmedia.cpp|
  want     |0|
  got_len  -1
  ob_len   0
  want_len 1
Abort
FAIL: t-printf
PASS: t-scanf
PASS: t-locale
==================================
1 of 3 tests failed
Please report to gmp-bugs@swox.com
==================================

What is "gotten" is different each time. In this example, I think it is output that had just come from "svn update" for scummvm.

Here is the snippet of code that produces this error:

void
check_obstack_vprintf (const char *want, const char *fmt, va_list ap)
{
#if HAVE_OBSTACK_VPRINTF
  struct obstack  ob;
  int   got_len, want_len, ob_len;
  char  *got;

  want_len = strlen (want);

  obstack_init (&ob);
  got_len = gmp_obstack_vprintf (&ob, fmt, ap);
  got = obstack_base (&ob);
  ob_len = obstack_object_size (&ob);

  if (got_len != want_len
      || ob_len != want_len
      || memcmp (got, want, want_len) != 0)
    {
      printf ("gmp_obstack_vprintf wrong\n");
      printf ("  fmt      |%s|\n", fmt);
      printf ("  got      |%s|\n", got);
      printf ("  want     |%s|\n", want);
      printf ("  got_len  %d\n", got_len);
      printf ("  ob_len   %d\n", ob_len);
      printf ("  want_len %d\n", want_len);
      abort ();
    }
  obstack_free (&ob, NULL);
#endif
}

Just a quick look is that something is looking at the wrong place in memory. Hopefully, I can get (find?) some more time to dig into this, unless someone already has a good idea of what is going wrong. I did not try building this with GCC 4.2.3 (native) figuring I wanted to recreate a stcok environment as best as I could.

Keith