主题:gcc4.6.2 release MinGW平台非官方编译版
Hi, all
I have built gcc4.6.2 release successfully.
You can get it from [url]http://pcxprj.googlecode.com/files/MinGW64CRT_gcc4.6.2release_static_win32.7z[/url]
ReadME:
This PcX32 gcc edition contains these libraries: zlib, winpthreads, gmplib, mpfr, mpc, libiconv, libexpat.
And also contains these tools : gdb with python, mingw32-make, gendef, zip, unzip, lzip, nasm, yasm, base64, ctags.
Before using it, you should READ FAQ.txt.
If you have some other problems, you may email to me: xunxun1982 AT gmail.com.
Thank you.
FAQ:
1. What language does this pcx32 edition support?
Because I only use C/C++/Fortran now, the edition only contains gcc/g++/gfortran. Other languages may be supported by my future edition, but this depends on my like.
2. Why was this pcx32 edition built with "--enable-static --disable-shared"?
Because I don't like the fact that my applications depend on many other gcc dlls.
3. What special features does this pcx32 edition have?
The edition has some additional features:
1) It is built with posix thread, and this can support many gcc posix functions.
2) C++0x "std::thread" is introduced. The feature was first posted on mingw/mingw64 mail list by me, and was modified by Kai, at some time, Kai has committed to the gcc trunk, but not gcc4.6 branch. So I extract the patch.
3) You can use gdb with python pretty printer to debug STL and wxWidgets. See http://code.google.com/p/qp-gcc/wiki/GDB and http://forums.codeblocks.org/index.php/topic,11301.0.html for more details.
4. What major bugs does this pcx32 edition fix?
1) Fix some crashes on XP.
You can see the discuss in http://lists.gnu.org/archive/html/qemu-devel/2011-10/msg02462.html and http://sourceware.org/ml/gdb/2011-10/msg00056.html .
2) Fix a gfortran drastic I/O performance regression on Windows.
You can see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50016 .
3) Fix LTO plugin producing multiple definition errors for all symbols.
You can see http://sourceware.org/bugzilla/show_bug.cgi?id=12762 .
5. Why do I encounter ld memory exhaust problem when building some projects such as wxWidgets?
GCC4.6 provides a option called -fno-keep-inline-dllexport by default, when you try to build wxWidgets or the similar projects what need link many large objs, you should add " -fno-keep-inline-dllexport" to your compiler option.
Because the -fno-keep-inline-dllexport flag avoids generating inline functions and methods decorated with __declspec(dllexport).
6. Known bugs and solutions:
1) If your cpu supports AVX, Gfortran(or other languages?) may not use "-O3 -march=native", you can use "-O3 -mno-avx -march=native".
See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50875 .
Though the bug is fixed in the gcc trunk, it is fixed very lately, I have not used the patch.
2) When you use C++ exceptions, if you encounter a crash using "-O3", you can try to add "-fno-omit-frame-pointer".
See http://sourceforge.net/tracker/?func=detail&aid=3426555&group_id=2435&atid=102435 .
This is because my edition uses dw2 model.
3) When you use LTO plugin by adding compiler option "-flto -fuse-linker-plugin", to link some C++ libs, if you encounter the similar link errors reported in the thread: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49844 .
To solve this, you can add -flto-partition=none to your linker options.
7. How can I build the gcc?
You can find the patches I used in http://pcxprj.googlecode.com/svn/trunk/gcc-patches/gcc4.6/gcc4.6.2/
You can find the build method in http://code.google.com/p/pcxprj/wiki/GCC46xBuildbyPcX (I will rewrite it).
I have built gcc4.6.2 release successfully.
You can get it from [url]http://pcxprj.googlecode.com/files/MinGW64CRT_gcc4.6.2release_static_win32.7z[/url]
ReadME:
This PcX32 gcc edition contains these libraries: zlib, winpthreads, gmplib, mpfr, mpc, libiconv, libexpat.
And also contains these tools : gdb with python, mingw32-make, gendef, zip, unzip, lzip, nasm, yasm, base64, ctags.
Before using it, you should READ FAQ.txt.
If you have some other problems, you may email to me: xunxun1982 AT gmail.com.
Thank you.
FAQ:
1. What language does this pcx32 edition support?
Because I only use C/C++/Fortran now, the edition only contains gcc/g++/gfortran. Other languages may be supported by my future edition, but this depends on my like.
2. Why was this pcx32 edition built with "--enable-static --disable-shared"?
Because I don't like the fact that my applications depend on many other gcc dlls.
3. What special features does this pcx32 edition have?
The edition has some additional features:
1) It is built with posix thread, and this can support many gcc posix functions.
2) C++0x "std::thread" is introduced. The feature was first posted on mingw/mingw64 mail list by me, and was modified by Kai, at some time, Kai has committed to the gcc trunk, but not gcc4.6 branch. So I extract the patch.
3) You can use gdb with python pretty printer to debug STL and wxWidgets. See http://code.google.com/p/qp-gcc/wiki/GDB and http://forums.codeblocks.org/index.php/topic,11301.0.html for more details.
4. What major bugs does this pcx32 edition fix?
1) Fix some crashes on XP.
You can see the discuss in http://lists.gnu.org/archive/html/qemu-devel/2011-10/msg02462.html and http://sourceware.org/ml/gdb/2011-10/msg00056.html .
2) Fix a gfortran drastic I/O performance regression on Windows.
You can see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50016 .
3) Fix LTO plugin producing multiple definition errors for all symbols.
You can see http://sourceware.org/bugzilla/show_bug.cgi?id=12762 .
5. Why do I encounter ld memory exhaust problem when building some projects such as wxWidgets?
GCC4.6 provides a option called -fno-keep-inline-dllexport by default, when you try to build wxWidgets or the similar projects what need link many large objs, you should add " -fno-keep-inline-dllexport" to your compiler option.
Because the -fno-keep-inline-dllexport flag avoids generating inline functions and methods decorated with __declspec(dllexport).
6. Known bugs and solutions:
1) If your cpu supports AVX, Gfortran(or other languages?) may not use "-O3 -march=native", you can use "-O3 -mno-avx -march=native".
See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50875 .
Though the bug is fixed in the gcc trunk, it is fixed very lately, I have not used the patch.
2) When you use C++ exceptions, if you encounter a crash using "-O3", you can try to add "-fno-omit-frame-pointer".
See http://sourceforge.net/tracker/?func=detail&aid=3426555&group_id=2435&atid=102435 .
This is because my edition uses dw2 model.
3) When you use LTO plugin by adding compiler option "-flto -fuse-linker-plugin", to link some C++ libs, if you encounter the similar link errors reported in the thread: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49844 .
To solve this, you can add -flto-partition=none to your linker options.
7. How can I build the gcc?
You can find the patches I used in http://pcxprj.googlecode.com/svn/trunk/gcc-patches/gcc4.6/gcc4.6.2/
You can find the build method in http://code.google.com/p/pcxprj/wiki/GCC46xBuildbyPcX (I will rewrite it).