Export to GitHub

pcxprj - GCC46xBuildbyPcX.wiki



How can we build GCC4.6.x using mingw gcc

This wiki page tells you the methods to build GCC4.6.x using mingw gcc.


Where to Get the source code (GCC and Binutils)

Release

ftp://gcc.gnu.org/pub/gcc/releases/

ftp://sourceware.org/pub/binutils/releases/

Prerelease

ftp://gcc.gnu.org/pub/gcc/snapshots/

ftp://sourceware.org/pub/binutils/snapshots/

GCC SVN

http://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch

Binutils CVS & GIT

http://www.gnu.org/software/binutils/

http://sourceware.org/git/?p=binutils.git;a=summary

Build Procedure

**Prepare

Enter into your msys bash and build path.**

Build & Install

  1. MinGW64
  2. winpthreads
  3. zlib
  4. libiconv
  5. libgmp
  6. libmpfr
  7. libmpc
  8. libppl
  9. libcloog
  10. GCC Compiler $ ./<your src path>/configure --prefix=/mingw --with-sysroot=/mingw \ --with-arch=i686 --with-tune=generic \ --host=i686-w64-mingw32 --target=i686-w64-mingw32 \ --with-lto-plugin --with-host-libstdcxx=-lstdc++ --enable-bootstrap --disable-werror \ --enable-languages=c,c++,fortran --enable-libgomp --enable-threads=posix --enable-lto --with-system-zlib \ --enable-libstdcxx-debug --enable-version-specific-runtime-libs --enable-fully-dynamic-string --disable-libstdcxx-pch \ --disable-sjlj-exceptions --with-dwarf2 --disable-symvers --enable-checking=release --enable-cxx-flags='-fno-function-sections -fno-data-sections' \ --enable-cloog-backend=isl --disable-shared --enable-static --disable-rpath \ --enable-libquadmath-support --enable-libquadmath --disable-multilib \ --disable-nls --with-pkgversion="pcx32" $ make $ make install $ make DESTDIR=/<your install path> install
  11. Binutils $ .//configure --prefix=/mingw --with-sysroot=/mingw \ --with-arch=i686 --with-tune=generic \ --host=i686-w64-mingw32 --target=i686-w64-mingw32 \ --with-lto-plugin --with-host-libstdcxx=-lstdc++ --enable-bootstrap --disable-werror \ --enable-languages=c,c++,fortran --enable-libgomp --enable-threads=posix --enable-lto --with-system-zlib \ --enable-libstdcxx-debug --enable-version-specific-runtime-libs --enable-fully-dynamic-string --disable-libstdcxx-pch \ --disable-sjlj-exceptions --with-dwarf2 --disable-symvers --enable-checking=release --enable-cxx-flags='-fno-function-sections -fno-data-sections' \ --enable-cloog-backend=isl --disable-shared --enable-static --disable-rpath \ --enable-libquadmath-support --enable-libquadmath --disable-multilib \ --disable-nls --with-pkgversion="pcx32" $ make $ make install $ make DESTDIR=/ install```