Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

$ pacman -Sy

$ pacman --needed -S bash pacman pacman-mirrors msys2-runtime

$ pacman -S git make texinfo pkgfile diffutils tar flex coreutils cvs subversion wget patch man zip p7zip au
tomake autoconf libtool bison gettext-devel sshpass

$ cd ~
$ git clone https://github.com/niXman/mingw-builds.git
$ cd mingw-builds/
$ git checkout develop

$ cd ~/mingw-builds/
$ ./build --mode=gcc-5.1.0 --exceptions=seh --jobs=10 --rt-version=trunk --threads=win32 --arch=x86_64 --enable
-languages=c,c++,fortran --bootstrap

$ ./toolchains/mingw64/bin/gcc.exe -dumpspecs > toolchains/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.3/specs

*cpp:
%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} %{municode:-DUNICODE} %{!no-pthread:-D_REENTRANT} %{pthread:-
U_REENTRANT} -D__MSVCRT_VERSION__=0x1100 -D__USE_MINGW_ACCESS
*cc1plus:
-D__MSVCRT_VERSION__=0x1100 -D__USE_MINGW_ACCESS

*libgcc:
%{mthreads:-lmingwthrd} -lmingw32 %{static|static-libgcc:-lgcc -lgcc_eh} %{!static: %{!static-
libgcc: %{!shared: %{!shared-libgcc:-lgcc -lgcc_eh} %{shared-libgcc:-lgcc_s -lgcc} } %{shared:-
lgcc_s -lgcc} } } -lmoldname110 -lmingwex -lmsvcr110

$ cd ~/mingw-builds/toolchains/mingw64/x86_64-w64-mingw32/lib/
$ ../../bin/dlltool.exe -d ~/mingw-gcc-5.1.0/src/mingw-w64/mingw-w64-crt/lib64/moldname-msvcrt.def -U --dllname
msvcr110.dll -l libmoldname110.a -k --as=/home/jgamache/mingw-builds/toolchains/mingw64/bin/as.exe --as-flags=
--64 -m i386:x86-64

$ rm -rf ~/mingw-gcc-5.1.0/x86_64-510-win32-seh-rt_v4/ ~/mingw-gcc-5.1.0/prerequisites-build/

$ cd ~/mingw-builds/
$ ./build --mode=gcc-5.1.0 --exceptions=seh --jobs=10 --rt-version=trunk --threads=win32 --arch=x86_64 --enable
-languages=c,c++,fortran --bootstrap

collect2.exe: error: ld returned 127 exit status


Makefile:947: recipe for target 'libgcc_s.dll' failed

ORIGINAL_LD_FOR_TARGET="F:/msys64/home/jgamache/mingw-builds/toolchains/mingw64/bin/../lib/gcc/x86_64-w64-mingw3
2/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe"
ORIGINAL_LD_BFD_FOR_TARGET="F:/msys64/home/jgamache/mingw-builds/toolchains/mingw64/bin/../lib/gcc/x86_64-w64-mi
ngw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.bfd.exe"
ORIGINAL_LD_GOLD_FOR_TARGET="F:/msys64/home/jgamache/mingw-builds/toolchains/mingw64/bin/../lib/gcc/x86_64-w64-m
ingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.gold.exe"
ORIGINAL_PLUGIN_LD_FOR_TARGET="F:/msys64/home/jgamache/mingw-builds/toolchains/mingw64/bin/../lib/gcc/x86_64-w64
-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe"

ORIGINAL_LD_FOR_TARGET="F:/msys64/home/jgamache/mingw-gcc-5.1.0/x86_64-510-win32-seh-rt_v4/mingw64/x86_64-w64-mi
ngw32/bin/ld.exe"
ORIGINAL_LD_BFD_FOR_TARGET="F:/msys64/home/jgamache/mingw-gcc-5.1.0/x86_64-510-win32-seh-rt_v4/mingw64/x86_64-w6
4-mingw32/bin/ld.bfd.exe"
ORIGINAL_LD_GOLD_FOR_TARGET="F:/msys64/home/jgamache/mingw-gcc-5.1.0/x86_64-510-win32-seh-rt_v4/mingw64/x86_64-w
64-mingw32/bin/ld.gold.exe"
ORIGINAL_PLUGIN_LD_FOR_TARGET="F:/msys64/home/jgamache/mingw-gcc-5.1.0/x86_64-510-win32-seh-rt_v4/mingw64/x86_64
-w64-mingw32/bin/ld.exe"

ld.exe: cannot find -lmoldname110

$ cd ~/mingw-gcc-5.1.0
$ find -name libmoldname.a -execdir cp ~/mingw-builds/toolchains/mingw64/x86_64-w64-mingw32/lib/libmoldname110.
a . \;

#if !defined(INT8)
typedef signed char INT8,*PINT8;
#endif
#if !defined(INT16)
typedef signed short INT16,*PINT16;
#endif
#if !defined(INT32)
typedef signed int INT32,*PINT32;
#endif
#if !defined(INT64)
__MINGW_EXTENSION typedef signed __int64 INT64,*PINT64;
#endif
#if !defined(UINT8)
typedef unsigned char UINT8,*PUINT8;
#endif
#if !defined(UINT16)
typedef unsigned short UINT16,*PUINT16;
#endif
#if !defined(UINT32)
typedef unsigned int UINT32,*PUINT32;
#endif
#if !defined(UINT64)
__MINGW_EXTENSION typedef unsigned __int64 UINT64,*PUINT64;
#endif
#if !defined(LONG32)
typedef signed int LONG32,*PLONG32;
#endif
#if !defined(ULONG32)
typedef unsigned int ULONG32,*PULONG32;
#endif
#if !defined(DWORD32)
typedef unsigned int DWORD32,*PDWORD32;
#endif

$ cd ~/mingw-gcc-5.1.0/x86_64-510-win32-seh-rt_v4/
$ tar -cJvf ~/x86_64-510-win32-seh-rt_v4_VS2012.tar.xz
$ cd /
$ tar -xf ~/x86_64-510-win32-seh-rt_v4_VS2012.tar.xz

You might also like