-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.hostmingw
executable file
·34 lines (26 loc) · 1.22 KB
/
build.hostmingw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This script builds cross compilers to target mingw
# Targets supported: i686-w64-mingw32 x86_64-w64-mingw32
# binutils 2.24 and gcc 4.7.4 are normally used
TOPDIR=/directory
GITHOME=ssh://git@github.com/MIPS
TARGET=i686-w64-mingw32
INSTALL=$TOPDIR/install-$TARGET
OBJ=$TOPDIR/obj-$TARGET
SYSROOT=$INSTALL
cd $TOPDIR
G="--path=$INSTALL/bin --git_home=$GITHOME --build=$OBJ --prefix=$INSTALL"
G="$G --target=$TARGET --sysroot=$SYSROOT --jobs=3"
# If you want to force an update of your sources before the build.
# uncommment the next line.
# b/build_toolchain update $G binutils-gdb glibc gcc qemu
# If you do not want to use the system gmp, mpfr, mpc, or dejagnu.
# uncomment the next line.
# b/build_toolchain update $G gmp mpfr mpc dejagnu
# You can build these with a single run and listing all targets (in order)
# they are listed seperately in order to make it easier to build/rebuild a
# single component.
b/build_toolchain build $G binutils || exit 1
b/build_toolchain build $G --prefix=$INSTALL/mingw mingw || exit 1
b/build_toolchain build $G --make_target_all=all-gcc --make_target_install=install-gcc gcc || exit 1
b/build_toolchain build $G --prefix=$INSTALL/mingw mingw-w64 || exit 1
b/build_toolchain build $G gcc || exit 1