This is mainly a note to myself. Maybe it’s useful for you too.
Actually building cross-compiler toolchains using crossdev is easy, but there are some pitfalls.
- Remove any compiler environment variables before building, or the build will fail
- For building MinGW toolchains the openmp useflag must not be set
- If you have built already a toolchain partially with wrong settings, remove it completely before trying it again
Simple Build Instructions for building mingw32 and gdb:
# become root su # clear env (clearing CXX should not be necessary, but it doesn't hurt) export CC= export CXX= export CFLAGS= export CXXFLAGS= export LDFLAGS= # build using crossdev crossdev --ex-gdb -t i686-pc-mingw32`
For 64bit toolchain use x86_64-w64-mingw32
instead of i686-pc-mingw32
.
Uninstall: crossdev -C i686-pc-mingw32
See https://wiki.gentoo.org/wiki/Mingw for more information.
Comments
comments powered by Disqus