Build binutils for Windows too so that we can get addr2line.exe.
[mingw-build.git] / build_binutils_linux.sh
1 #!/bin/bash -e
2 #
3 # Build binutils running on Linux and targeting Windows.
4
5 tar xjf Archives/binutils-2.23.2.tar.bz2
6 cd binutils-2.23.2
7 sed -i -e 's/@colophon/@@colophon/' \
8        -e 's/doc@cygnus.com/doc@@cygnus.com/' bfd/doc/bfd.texinfo
9 cd ..
10 mkdir -p binutils-build-$MINGW_TARGET
11 cd binutils-build-$MINGW_TARGET
12 ../binutils-2.23.2/configure --with-sysroot=$MINGW_PREFIX --prefix=$MINGW_PREFIX --disable-multilib -target=$MINGW_TARGET --enable-targets=$MINGW_TARGET 
13 make $MINGW_PARALLEL
14 sudo make install
15