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

Re: [MiNT] g++ bug or is my build enviroment not sane?



George Nakos wrote:
Well,  as  you see from the source (which fails on my config), no printing a int
using cout is performed.

I used to call this bug the "cout bug", because I noticed the bug occurred with cout. But you report it affects cin, too. There is nothing surprising, because the real nature of the bug (references to weak data symbols) affects the whole iostream. Surprisingly, most C++ features seemed to work well despite that bug, except the usage of cin/cout with integers.

So, the solution is downloadin binutils 2.20, use the patch from your site, then
recompiling mintlib?

You have 2 solutions.

1) The easy one. Download the Cygwin binaries from my website, and cross-compile your MiNT software from Windows. It will work instantly (as I did for testing your program).

2) The hard one. Download the binutils 2.20 sources and my latest patch, and build them on MiNT. You will have to rebuild all the libraries shipped with GCC, too, because they may be affected by the binutils bug. I noticed that replacing the "old" libstdc++.a with a good one was enough to get rid of the bug. So basically, if you want to compile your software from MiNT, you will have to rebuild the whole toolchain (binutils, GCC, MiNTLib...). That's a quite long and complicated task.

If someone is interested by building this new toolchain on MiNT and make RPMs, feel free to do it and share your work.

--
Vincent Rivière