On Wed, Jun 30, 2010 at 3:32 PM, Paarvai Naai <[email protected]> wrote:
> Hi all,
>
> I am trying to build a mingw-w64 cross-compiler using the instructions
> outlined on the web.
>
> Originally I was successful in building a multilib cross-compiler
> using GCC 4.5.0, but now I want to backtrack to GCC 4.4.4.  This is
> because I found an optimization bug in GCC 4.5.0 that results in wrong
> code generation, making me now weary of using it.  Alas, it appears
> that GCC 4.5.0 isn't as stable as one might think...

Have you filed a bugzilla report for gcc against this bug?  If it is
an optimization wrong code bug, then it probably exists for other
targets besides mingw32.  I'd be curious to see whether it is actually
a bug in the compiler or a bug in the code itself.  For example, a
common occurrence in migrating to compiling with gcc 4.5+ is better
optimizations of pointer aliasing handling such as the following:

#include <stdio.h>

double s = 123;
int main()
{
  unsigned int* pc = (unsigned int*)&s;
  *pc = 43;
  printf("%f", s);
  return 0;
}

Optimization is free to print 123.00000 (seemingly unexpectedly) in
these cases.  While this may seem like a bug in gcc, it's actually a
bug in the user's code, exposed by the optimizer.



I personally wouldn't do a mulitlib compiler with 4.4 series, but just
have two compilers, one that targets i686-w64-mingw32 and one that
targets x86_64-w64-mingw32.

In fact, even with the 4.5 and 4.6 series, multilib requires a bit of
work to ensure that the installed DLLs are correctly placed on the
build system.  This doesn't even take into consideration placement of
the runtime libraries on the end user's system.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to