Skip navigation.

Linux的用户

OS就应该是自己可以定制的。

Posts tagged with "mingw"

Gentoo Crossdev Mingw32 USE "openmp" FIX

, ,

gentoo中的crossdev i686-mingw32总是无法使用"openmp".
今天心情原来就不好,所以上网查阅资料消灭它:-)
---
其实出错原因在/usr/portage/eclass/toolchain.eclass这个文件,详细作用没有探究.不过其中:
判断条件中"if is_crosscompile ; then"内,全文件1315行:
if [[ ${GCCMAJOR}.${GCCMINOR} > 4.1 ]] ; then
  confgcc="${confgcc} --disable-bootstrap --disable-libgomp"
if


查阅Gentoo BUG LIST:#234841虽然是修正4.3.1-r1的本机GCC编译器问题(好像并没有添加到,不过同样受用.拿来主义:-)修改如下:

if [[ ${GCCMAJOR}.${GCCMINOR} > 4.1 ]] && [[ ${GCCMAJOR}.${GCCMINOR} < 4.2 ]] ; then
  confgcc="${confgcc} --disable-bootstrap --disable-libgomp"
elif tc_version_is_at_least "4.2" ; then
  confgcc="${confgcc} --disable-bootstrap $(use_enable openmp libgomp)"
fi


4.2以后可以支持openmp.但是其他平台的编译器就不得知道是否支持了.
4.3支持omp 2.5spec而svn中的gcc支持omp 3spec

外部链接:
Gentoo BUG LIST:#234841

Gentoo下编译MinGW的笔记

,

这个是对于GCC 4.3.1-r1版本的笔记

第一:
cross-dev i686-mingw 只编译语言c

第二:
cross-dev i686-mingw --ex-gcc --ex-only 不会通过
原因是mudflap的关系,跨平台编译并不支持win32这个线程模型(或是系统发行版本的Bug),可以查阅build目录下libmudflap/config.log里面有一个"exit 1"得描述.
每次都会在设置中出现:
thread model : win32
no supported model

解决方法: 关闭它 USE="-mudflap"

第三:
请添加USE="-openmp",它并不会真的帮你添加openmp这个特性到编译器里面.
需要就,手动吧:=)
../gcc-4.3.1/libgomp/configure --host=i686-mingw32 --build=i686-pc-linux-gnu --target=i686-mingw32 --prefix=/usr/ --enable-threads=win32 --disable-nls --disable-win32-registry --disable-shared --without-x  --with-sysroot=/usr/i686-mingw32 --bindir=/usr/i686-pc-linux-gnu/i686-mingw32/gcc-bin/4.3.1 --includedir=/usr/lib/gcc/i686-mingw32/4.3.1/include --datadir=/usr/share/gcc-data/i686-mingw32/4.3.1 --mandir=/usr/share/gcc-data/i686-mingw32/4.3.1/man --infodir=/usr/share/gcc-data/i686-mingw32/4.3.1/info --with-gxx-include-dir=/usr/lib/gcc/i686-mingw32/4.3.1/include/g++-v4 --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion=


外部文档:
Doom 9 : Compiling GCC for MinGW & Cross-Compiling with Linux "By cc979"
GCC 4.3.0 i386-pc-mingw32 ALPHA Release "In Nabble"

编译在Linux MinGW下的Boost

,

第一步: 配置Jam
touch user-config.jam
echo "using gcc : : i484-mingw32-gcc : ; " > user-config.jam


第二步: 编译
bjam --user-config=user-config.jam --toolset=gcc link=static release


第三步: 手动编译库标签
ranlib *.a


参阅文档:
http://www.nabble.com/Mingw-cross-compilation-td16814030.html