How to build the GCC-4.3.3 in MinGW?
来源:互联网 发布:佰迪清可以在淘宝买吗 编辑:程序博客网 时间:2024/05/16 11:37
How tobuild the GCC-4.3.3 in MinGW?
The package is essential to buildthe environment of GCC. If you have installed them into your MinGW, please skipto the next session.
[Where to download GCC-4.3.3?]
Loginftp.gnu.org and find thelatest version. It is gcc-4.3.3.tar.bz2when I explore whole folder.
[Where to download GMP?]
Loginwww.sfr-fresh.com and findthe latest version. It is gmp-4.2.4.tar.gzwhen I explore the whole web page.
[Where to download MPFR?]
Login www.mpfr.org and find the latestversion. It is mpfr-2.4.1.tar.bz2when I explore the whole web page.
[Where to download pthread-win32?]
Loginpthreads-win32 and find thelatest dll version.It includes libpthreadGC2.a, pthreadGC2.dll, pthread.h, sched.h and semaphore.h.
[Where to download binutils-2.19.1?]
Loginsourceforge.netand download binutils-2.19.1-src.tar.gz.
[1. Build and Install gmp-4.2.4.tar.gz]
$ tar xvzf ./gmp-4.3.4.tar.gz
$ cd ./gmp-4.2.4/
$ ./configure --prefix=/mingw –disable-shared –enable-static
$ make
$ make check
$ make install
$ make distclean
[2. Build and Install mpfrmpfr-2.4.1.tar.bz2]
$ tar xvjf ./mpfr-2.4.1.tar.bz2
$ cd ./mpfr-2.4.1/
$ ./configure --prefix=/mingw –disable-shared –enable-static –with-gmp=/mingw
$ make
$ make check
$ make install
$ make distclean
[3. Copy pthread into MinGW]
$ cd ./pthreads
$ cp -f ./pthread.h /mingw/include
$ cp -f ./sched.h /mingw/include
$ cp -f ./semaphore.h /mingw/include
$ cp -f ./pthreadGC2.dll /mingw/bin
$ cp -f ./libpthreadGC2.a /ming/lib/libpthread.a
[4. Build and Install gcc-4.3.3.tar.bz2]
$ tar xvjf ./gcc-4.3.3.tar.bz2
$ mkdir –p ./gcc-4.3.3/build
$ cd ./gcc-4.3.3/build
$ export LD_RUN_PATH=/mingw/lib
$ export LD_LIBRARY_PATH=/mingw/lib
$ LD_RUN_PATH=/mingw/lib LD_LIBRARY_PATH=/mingw/lib ../configure --prefix=/mingw --with-gmp=/mingw --with-mpfr=/mingw --oldincludedir=/mingw/include --disable-nls --disable-win32-registry --disable-shared --enable-version-specific-runtime-libs --enable-languages=c,c++,fortran,java,objc --enable-optimize --enable-libgomp
$ make
$ make DESTDIR=/gcc-4.3.3-build install
$ make install
$ rm -rf *
[5. Build and Install binutils-2.19.1-src.tar.gz]
$ tar xvzf ./binutils-2.19.1-src.tar.gz
$ cd binutils-2.19.1/
$ ./configure --prefix=/mingw –disable-shared –enable-static –oldincludedir=/mingw/include --with-mpfr=/mingw --with-gmp=/mingw
$ make
$ make DESTDIR=/ binutils-2.19.1-build install
$ make install
$ make distclean
$ rm -rf /mingw/mingw32
$ mv /mingw/ i686-pc-mingw32 / mingw/mingw32
[Summarization]
1.GCC and Binutils must be synchronized together, otherwise the programs compiledwill be crashed in the runtime. In normal case, Binutils had better use thelatest version.
2.The boring operations in every step should be edited into a shell script, andit will help readers automatically build all tasks. As readers know, it takeslong time to completely build GCC.
3.If readers want to know HOWTO in Linux. Please refer to “How tocompile GCC-4.3.3 in the Linux?”.
- How to build the GCC-4.3.3 in MinGW?
- How to generate DLL files by GCC in the MinGW?
- How to use GCC to build DLL by DEF file in MinGW?
- How to compile GCC-4.3.3 in the Linux?
- How to compile GCC-4.3.3 in the cygwin?
- How to build libDTS in the MSYS?
- How to build libA52 in the MSY?
- How to build giflib in the MSYS?
- How to build libpng in the MSYS?
- How to compile opencore-amr in the MINGW
- How to generate gcc debug symbol outside the build target?
- How to generate gcc debug symbol outside the build target?
- How to build the environment of MSYS in the windows?
- How to build the environment of XPCOM in Windows XP
- How to build the webkitgtk
- How to compile OpenJPEG in MinGW?
- How to compile SDL in MINGW?
- How to generate monkeyrunner build-in help?
- ubuntu 连接windows远程桌面
- 常用javascript
- 不要在校内网上发表重要的原创文章
- 输入输出系统
- Web聊天工具
- How to build the GCC-4.3.3 in MinGW?
- 事件asp.net
- How to compile GCC-4.3.3 in the cygwin?
- 博客迁至 www.anyLiv.com 欢迎访问
- sandcastle , HTML Help Workshop, Sandcastle Help FIle Builder 出错经验总结
- XML WebService完全实例详细解析--vs_返回xml
- 600016
- WordPress安装
- Ubuntu上使用apt-get安装软件的速度问题