To partly re-iterate, I'm following these instructions
http://sourceforge.net/p/mingw-w64/wiki2/Cross%20Win32%20and%20Win64%20compiler/
to build a Win64-only cross compiler on Debian (later CentOS). There are
some ambiguities in the instructions, and I've taken a stab at resolving
them. I've converted my understanding of the instructions into a script,
which I include here:
#!/bin/bash
PREFIX=/home/dr/software/mingwtest
# clean previous attempt
cd $PREFIX
rm -rf bin include lib libexec mingw share x86_64*
cd src
rm -rf build*
# binutils
echo binutils
cd $PREFIX/src
test -d build-binutils && rm -rf build-binutils
mkdir build-binutils
cd build-binutils
(../binutils*/configure --target=x86_64-w64-mingw32 --disable-multilib
--with-sysroot=$PREFIX --prefix=$PREFIX && make -j 8 && make install) >
../binutils.log 2>&1
export PATH=$PATH:$PREFIX/bin
# mingw-64 header set
echo header set
cd $PREFIX/src
test -d build-headers && rm -rf build-headers
mkdir build-headers
cd build-headers
(../mingw-w64-v3.3.0/mingw-w64-headers/configure --build=x86_64
--host=x86_64-w64-mingw32 --prefix=$PREFIX/x86_64-w64-mingw32 && make install)
> ../headers.log 2>&1
ln -s $PREFIX/x86_64-w64-mingw32 $PREFIX/mingw
mkdir -p $PREFIX/x86_64-w64-mingw32/lib
ln -s $PREFIX/x86_64-w64-mingw32/lib $PREFIX/x86_64-w64-mingw32/lib64
#gcc core
echo gcc core
cd $PREFIX/src
test -d build-gcc && rm -rf build-gcc
mkdir build-gcc
cd build-gcc
(../gcc*/configure --target=x86_64-w64-mingw32 --disable-multilib
--prefix=$PREFIX --with-sysroot=$PREFIX && make -j 8 all-gcc && make
install-gcc) > ../gcc.log 2>&1
# crt
echo crt
cd $PREFIX/src
test -d build-crt && rm -rf build-crt
mkdir build-crt
cd build-crt
(../mingw*/mingw-w64-crt/configure --host=x86_64-w64-mingw32
--prefix=$PREFIX/x86_64-w64-mingw32 --with-sysroot=$PREFIX/x86_64-w64-mingw32
&& make && make install) > ../crt.log 2>&1
It only goes up as far as crt because that's where things fail. Those
logs are pretty long, so I'll omit them. Here's the end of crt.log:
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I.
-I../mingw-w64-v3.3.0/mingw-w64-crt -m64
-I../mingw-w64-v3.3.0/mingw-w64-crt/include -D_CRTBLD
-I/home/dr/software/mingwtest/x86_64-w64-mingw32/include -pipe -std=gnu99
-Wall -Wextra -Wformat -Wstrict-aliasing -Wshadow -Wpacked -Winline
-Wimplicit-function-declaration -Wmissing-noreturn -Wmissing-prototypes -g -O2
-MT intrincs/lib64_libkernel32_a-ilockadd.o -MD -MP -MF
intrincs/.deps/lib64_libkernel32_a-ilockadd.Tpo -c -o
intrincs/lib64_libkernel32_a-ilockadd.o `test -f 'intrincs/ilockadd.c' || echo
'../mingw-w64-v3.3.0/mingw-w64-crt/'`intrincs/ilockadd.c
In file included from
/home/dr/software/mingwtest/lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mingw32/include/intrin.h:41:0,
from
../mingw-w64-v3.3.0/mingw-w64-crt/intrincs/ilockadd.c:1:
/home/dr/software/mingwtest/lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mingw32/include/psdk_inc/intrin-impl.h:
In function ‘_umul128’:
/home/dr/software/mingwtest/lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mingw32/include/psdk_inc/intrin-impl.h:774:48:
error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘v’
/home/dr/software/mingwtest/lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mingw32/include/psdk_inc/intrin-impl.h:775:7:
error: ‘union <anonymous>’ has no member named ‘v’
/home/dr/software/mingwtest/lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mingw32/include/psdk_inc/intrin-impl.h:776:7:
error: ‘union <anonymous>’ has no member named ‘v’
/home/dr/software/mingwtest/lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mingw32/include/psdk_inc/intrin-impl.h:777:21:
error: ‘union <anonymous>’ has no member named ‘sv’
/home/dr/software/mingwtest/lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mingw32/include/psdk_inc/intrin-impl.h:778:14:
error: ‘union <anonymous>’ has no member named ‘sv’
make[1]: *** [intrincs/lib64_libkernel32_a-ilockadd.o] Error 1
make[1]: Leaving directory `/home/dr/software/mingwtest/src/build-crt'
make: *** [all] Error 2
It seems unlikely that the header really is wrong, so I expect some
previous flag/directive is bad. I can't make out what, though.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public