From afcdd91cecc1853398a2650595673fb4ebd99e0e Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Sat, 25 Apr 2009 14:12:32 +0000 Subject: [PATCH] Proof that I won the fight against MSYS :-) - Add a script for automatically compiling a GNU/MinGW toolchain (binutils, gcc, mingw-runtime, w32api) under Windows making use of the toolchain packages bundled with RosBE-Unix. These tools will finally have correct relative built-in include directories. - Add a documentation explaining the used options and possible problems when building the tools under Windows with MSYS svn path=/trunk/tools/RosBE/; revision=962 --- ... a working GNU toolchain under Windows.odt | Bin 0 -> 22757 bytes RosBE-Windows/buildtoolchain.sh | 246 ++++++++++++++++++ 2 files changed, 246 insertions(+) create mode 100644 RosBE-Windows/Compiling a working GNU toolchain under Windows.odt create mode 100644 RosBE-Windows/buildtoolchain.sh diff --git a/RosBE-Windows/Compiling a working GNU toolchain under Windows.odt b/RosBE-Windows/Compiling a working GNU toolchain under Windows.odt new file mode 100644 index 0000000000000000000000000000000000000000..054cd0b93b4d6b0246796232fa36403d384cdc3f GIT binary patch literal 22757 zcma%i1CSFRSGS^z)(%$*U z-tlG1N&tg=2l#UsSfz4k4>G`z{=WWmLi|3h%&d$Y-E58YY;7&g4D=k$Y^-UWtqo~x z^c>6_Xl!hatPO1poUDwj9cdhmTpeZqA7{Vu|2i;!UkTV)8=ILp+5hFnfq~Y+QP0uI zL0`|F_8&Ni-y#1b@h{Nti$96{J5JBQz{t|*w;LOKS_3D0`#;fLtt^27WF^4=Bn<%c z=jZqF-=~B2Tl?>BjV*2T9F6{&%pd%}C-a|*u(h#uvi;ovr@xE%PdKdq5Y5)!#>C#p z;lGsspOF74&p*NbZ`1y_C`TI`%l{dL`yaA2v(hs$a-iimbF|X4b@(5~3FbH0QqRrC z$&uPX&%o5kz);ta3_)L47h>B;HwJ*d2$24-;gO_1d;BxqP=25P{is9#)*9GYJN`Yg z7n*1GYt6`?TgBZabD4&uNW?El8f}Y{ENfES@oW9kO>bj?qN0LQNK^pg%3qI0ug+e9 zS->&hjbf4TN6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+bKz)_ z^a0o-2k`w`f+Qd2+Y&{Sa&2XiF=blN)X9rk%c{{2F;sm0sqL8|LgM{ye#ZCAa#+>| z3hjP|doJwD#DvAxiuF&G?4|0vy@;HRJjO1_)ZxQL1ss{308Bp4fXCi2F)orsvsGc= zZOf`1@1a%RQi{kMpyVwQmeG&n?B673b-myWmdb(8BpLj1bElsOptjnDzMD`X@xB-*;>8e#^&<^}`vEuEG5*Urq%f?6u^6Ko+hU=xe?PkwH+DNk>d z^v`Uc;+~~YUzh9d#Dq9FvRDG*pHnD3Hic>^>B#}^Y2FodFmtrEwsQTOJ6WCB?AUUh zOm_7+Jk;mYmmxaQ^s0M@fh+isuh}XDRAToxcR3Tst&K#Bjo!%-td51e8rd`xLSDnS zwP9X2kO{>rb}6p$<(w9GnveH15!A;wm|}4^_=)Rg5lst!2_(RoA_e9nP+vlKa)#!;0Fi z4cCIZ&g0I3o3J_eGiP7fE{{RopJTI2uRAZH@V8Vpls0kT6;h6tFb7V$<*i*k?FV+i zJ!7)d7^muBArllMqcK`1V0T(Do* z(%-!|Dc)vS?Qnsdj2m;=XBHmRi*x4 zRL*Iqe^xo;ou1p;zo`5_`sshfew_suS*B+btaAfkPmYT;)L)_g<$00abH+M7Hy^C0 z#X0%(cgKqb&1Yzzb3;;I1pWN-JNy5PV*7i!^SR#w_BuGLNIWZk{^j-SFfYz6{~0+C z?BM;WNbz@-i|O^B!_MqVofA_qY0M63yxl!u=AsK6_5nejmj0*d?fvxS%)jRw3 Ef9qS?<^TWy literal 0 HcmV?d00001 diff --git a/RosBE-Windows/buildtoolchain.sh b/RosBE-Windows/buildtoolchain.sh new file mode 100644 index 0000000..955ddeb --- /dev/null +++ b/RosBE-Windows/buildtoolchain.sh @@ -0,0 +1,246 @@ +#!/bin/bash +# +# ReactOS Build Environment for Windows - Script for building a binutils/GCC/mingw-runtime/w32api toolchain for Windows +# Partly based on RosBE-Unix' "RosBE-Builder.sh" +# Copyright 2009 Colin Finck +# +# Released under GNU GPL v2 or any later version. + +################################################################################## +# This script was tested with the following toolchain versions: +# - binutils v2.19.51-20090127 (snapshot) using the corresponding ReactOS patches +# - gcc v4.1.3-20071015 (snapshot) using the corresponding ReactOS patches +# - mingw-runtime 3.13 +# - w32api 3.10 +################################################################################## + +# +# Constants +# +INSTALLDIR="/c/buildtoolchain/mingw" +MINGWDIR="/mingw" +NEEDED_TOOLS="bison flex gcc g++ grep make makeinfo" +TARGET="i686-pc-mingw32" +TEMPDIR="/c/buildtoolchain" +WIN32_INSTALLDIR="c:/buildtoolchain/mingw" + +# +# Functions +# +boldmsg() +{ + echo -e $2 "\e[1m$1\e[0m" +} + +greenmsg() +{ + echo -e $2 "\e[32m$1\e[0m" +} + +redmsg() +{ + echo -e $2 "\e[31m$1\e[0m" +} + +check_run() +{ + if [ $? -ne 0 ]; then + redmsg "FAILED" + echo "Please take a look at the log file \"$TEMPDIR/build.log\"" + echo "Aborted!" + exit 1 + else + greenmsg "OK" + rm "$TEMPDIR/build.log" + fi +} + +# +# Entry point +# +echo "buildtoolchain - Build a binutils/GCC/mingw-runtime/w32api toolchain for Windows" +echo "by Colin Finck " +echo + +if [ "`uname -o`" != "Msys" ]; then + echo "You can only run this script under a MSYS environment!" + exit 1 +fi + +# We don't want too less nor too many parameters +if [ "$1" == "" ] || [ "$4" != "" ]; then + echo "Syntax: ./buildtoolchain.sh [binutils] [gcc]" + echo + echo " sources - Path to the directory containing RosBE-Unix toolchain packages (.tar.bz2 files)" + echo " binutils - optional; whether binutils shall be built (0/1, default is 1)" + echo " gcc - optional; whether gcc shall be built (0/1, default is 1)" + exit 1 +fi + +# Get the absolute path to the script directory +cd `dirname $0` +SCRIPTDIR="$PWD" + +# Find out whether the script directory contains spaces +case "$SCRIPTDIR" in +*" "*) + redmsg "The script directory \"$SCRIPTDIR\" contains spaces!" + redmsg "Therefore some build tools cannot be compiled properly." + echo + redmsg "Please move \"$SCRIPTDIR\" to a directory, which does not contain spaces." + + exit 1;; +esac + +# Check if all necessary tools exist +boldmsg "Checking for the needed tools..." + +toolmissing=false +for tool in $NEEDED_TOOLS; do + echo -n "Checking for $tool... " + + if which "$tool" >& /dev/null; then + greenmsg "OK" + else + redmsg "MISSING" + toolmissing=true + fi +done + +if $toolmissing; then + echo "At least one needed tool is missing, aborted!" + exit 1 +fi + +echo + +# Get the absolute path to the source directory +cd "$1" +source_path="$PWD" + +# What do we need to process? +if [ "$2" == "0" ]; then + process_binutils=false +else + process_binutils=true +fi + +if [ "$3" == "0" ]; then + process_gcc=false +else + process_gcc=true +fi + +# Create all necessary directories +if ! [ -d "$INSTALLDIR/$TARGET" ]; then + mkdir -p "$INSTALLDIR/$TARGET" +fi + +if [ -d "$MINGWDIR" ]; then + rm -rf "$MINGWDIR" +fi + +mkdir -p "$MINGWDIR" + +if ! [ -d "$TEMPDIR" ]; then + mkdir -p "$TEMPDIR" +fi + +cd "$MINGWDIR" + +boldmsg "Building..." + +# mingw-runtime +echo -n "Extracting mingw-runtime... " +tar -xjf "$source_path/mingw-runtime.tar.bz2" >& "$TEMPDIR/build.log" +check_run + +# w32api +echo -n "Extracting w32api... " +tar -xjf "$source_path/w32api.tar.bz2" >& "$TEMPDIR/build.log" +check_run + +# Copy the same stuff to the target directory (needed for building gcc and later getting the files located properly) +echo "Copying files... " +cp -R $MINGWDIR/* "$INSTALLDIR/$TARGET" + +cd "$TEMPDIR" + +# binutils +if $process_binutils; then + rm -rf "binutils" + rm -rf "binutils-build" + + echo -n "Extracting binutils... " + tar -xjf "$source_path/binutils.tar.bz2" >& build.log + check_run + + echo -n "Configuring binutils... " + mkdir "binutils-build" + cd "binutils-build" + ../binutils/configure --prefix="$INSTALLDIR" --disable-nls --disable-shared >& "$TEMPDIR/build.log" + check_run + + echo -n "Building binutils... " + make CFLAGS="-O2 -fno-exceptions" LDFLAGS="-s" >& "$TEMPDIR/build.log" + check_run + + echo -n "Installing binutils... " + make install >& "$TEMPDIR/build.log" + check_run + + echo "Cleaning up binutils..." + cd "$TEMPDIR" + rm -rf "binutils-build" + rm -rf "binutils" +fi + +# gcc +if $process_gcc; then + rm -rf "gcc" + rm -rf "gcc-build" + + echo -n "Extracting gcc... " + tar -xjf "$source_path/gcc.tar.bz2" >& build.log + check_run + + echo -n "Configuring gcc... " + mkdir "gcc-build" + cd "gcc-build" + + ../gcc/configure --prefix="$WIN32_INSTALLDIR" --with-ld=/bin/ld \ + --enable-languages=c,c++ --enable-checking=release \ + --enable-threads=win32 --disable-win32-registry --disable-nls \ + --disable-shared >& "$TEMPDIR/build.log" + check_run + + echo -n "Building gcc... " + make CFLAGS="-O2" CXXFLAGS="-O2" LDFLAGS="-s" >& "$TEMPDIR/build.log" + check_run + + echo -n "Installing gcc... " + make install >& "$TEMPDIR/build.log" + check_run + + echo "Cleaning up gcc..." + cd "$TEMPDIR" + rm -rf "gcc-build" + rm -rf "gcc" +fi + +# Final actions +echo +boldmsg "Final actions" +cd "$INSTALLDIR" + +echo "Removing unneeded files..." +mv $TARGET/bin/* bin +mv $TARGET/include/* include +mv $TARGET/lib/* lib +rm -rf $TARGET info man share +rm -f bin/c++.exe bin/gccbug bin/$TARGET-* + +echo "Removing debugging symbols..." +find -name "*.exe" -type f -exec strip -s {} ";" + +echo "Finished!"