- Updated toolchain versions again (GCC 4.4.3, GMP 4.3.2, MinGW-Runtime 3.17, w32api 3.14).

- Use -march=native if supported for compiling the RosBE-Unix toolchain.
- Use --disable-werror for all toolchain components to be prepared for future unknown warnings.
- Use the safer and recommended -O2 optimization level instead of the more aggressive and buggy -O3.
- Denote our versions of GCC using --with-pkgversion.
- Remove some wrong or redundant build flags.
- Properly unset variables.

svn path=/trunk/tools/RosBE/; revision=1161
This commit is contained in:
Colin Finck 2010-01-25 20:11:29 +00:00
parent 3c0d73b539
commit 078db4de21
5 changed files with 55 additions and 51 deletions

View File

@ -1,5 +1,5 @@
ReactOS Build Environment
Version 1.5-RC1 for Unix-based operating systems
Version 1.5 for Unix-based operating systems
Base package and i386 build tools
by Colin Finck (colin@reactos.org)
@ -103,10 +103,10 @@ Version Information
This version of RosBE for Unix-based operating systems uses the following
components:
* GNU Binutils v2.20-20091017 (snapshot)
* GNU Binutils v2.20-20091222 (snapshot)
compiled for mingw32
* GCC, The GNU Compiler Collection v4.4.2
* GCC, The GNU Compiler Collection v4.4.3
compiled for mingw32
patched with:
- http://gcc.gnu.org/bugzilla/attachment.cgi?id=18882&action=view
@ -115,9 +115,9 @@ components:
NOTE: This GCC version only supports C and C++
* Make 20071219 (CVS version)
* MinGW-Runtime 3.16
* MinGW-Runtime 3.17
* NASM, The Netwide assembler v2.07
* W32api 3.13
* W32api 3.14
Tested Operating Systems

Binary file not shown.

View File

@ -1,17 +1,17 @@
#!/bin/bash
#
# ReactOS Build Environment for Unix-based Operating Systems - Builder Tool for the Base package
# Copyright 2007-2009 Colin Finck <colin@reactos.org>
# Copyright 2007-2010 Colin Finck <colin@reactos.org>
# partially based on the BuildMingwCross script (http://www.mingw.org/MinGWiki/index.php/BuildMingwCross)
#
# Released under GNU GPL v2 or any later version.
# RosBE Setup Variables
rs_host_cflags="-pipe -fno-common -O3 -march=pentium3 -mfpmath=sse"
rs_host_cflags="-pipe -O2"
rs_needed_tools="bison flex gcc g++ grep makeinfo" # GNU Make has a special check
rs_target="mingw32"
rs_target_cflags="-pipe -gstabs+ -O3 -march=pentium -mtune=i686"
rs_target_cflags="-pipe -gstabs+ -O2 -march=pentium -mtune=i686"
# Get the absolute path to the script directory
cd `dirname $0`
@ -22,7 +22,7 @@ rs_sourcedir="$rs_scriptdir/sources"
# RosBE-Unix Constants
DEFAULT_INSTALL_DIR="/usr/local/RosBE"
KNOWN_ROSBE_VERSIONS="0.3.6 1.1 1.4 1.4.2 1.5-RC1"
ROSBE_VERSION="1.5-RC1"
ROSBE_VERSION="1.5"
TARGET_ARCH="i386"
source "$rs_scriptdir/scripts/rosbelibrary.sh"
@ -227,6 +227,17 @@ rs_boldmsg "Building..."
rs_mkdir_if_not_exists "$rs_prefixdir/$rs_target"
rs_mkdir_if_not_exists "$rs_supportprefixdir"
# Use -march=native if the host compiler supports it
echo -n "Checking if the host compiler supports -march=native... "
if `gcc -march=native -o "$rs_workdir/dummy" "$rs_scriptdir/tools/dummy.c" >& /dev/null`; then
echo "yes"
rs_host_cflags+=" -march=native"
rm "$rs_workdir/dummy"
else
echo "no"
fi
rs_extract_module "mingw_runtime_dev" "$rs_prefixdir/$rs_target"
rs_extract_module "w32api" "$rs_prefixdir/$rs_target"
@ -249,39 +260,34 @@ if $rs_process_scut; then
fi
if rs_prepare_module "gmp"; then
export CFLAGS="$rs_host_cflags"
rs_do_command ../gmp/configure ABI=32 --prefix="$rs_supportprefixdir" --disable-shared
rs_do_command ../gmp/configure --prefix="$rs_supportprefixdir" --disable-shared --disable-werror
rs_do_command $rs_makecmd -j $rs_cpucount
rs_do_command $rs_makecmd check
rs_do_command $rs_makecmd install
rs_clean_module "gmp"
export CFLAGS=""
fi
if rs_prepare_module "mpfr"; then
export CFLAGS="$rs_host_cflags"
rs_do_command ../mpfr/configure --prefix="$rs_supportprefixdir" --with-gmp="$rs_supportprefixdir" --disable-shared
rs_do_command ../mpfr/configure --prefix="$rs_supportprefixdir" --with-gmp="$rs_supportprefixdir" --disable-shared --disable-werror
rs_do_command $rs_makecmd -j $rs_cpucount
rs_do_command $rs_makecmd check
rs_do_command $rs_makecmd install
rs_clean_module "mpfr"
export CFLAGS=""
unset CFLAGS
fi
if rs_prepare_module "binutils"; then
# At least the GCC 4.4.1 in Ubuntu 9.10 incorrectly warns about a potentially uninitialized variable, so don't count this as an error.
export CFLAGS="$rs_host_cflags -Wno-error=uninitialized"
export CFLAGS="$rs_host_cflags"
rs_do_command ../binutils/configure --prefix="$rs_prefixdir" --target="$rs_target" --disable-nls
rs_do_command ../binutils/configure --prefix="$rs_prefixdir" --target="$rs_target" --disable-nls --disable-werror
rs_do_command $rs_makecmd -j $rs_cpucount
rs_do_command $rs_makecmd install
rs_clean_module "binutils"
export CFLAGS=""
unset CFLAGS
fi
if rs_prepare_module "gcc"; then
@ -289,25 +295,25 @@ if rs_prepare_module "gcc"; then
export CFLAGS_FOR_TARGET="$rs_target_cflags"
export CXXFLAGS_FOR_TARGET="$rs_target_cflags"
rs_do_command ../gcc/configure --prefix="$rs_prefixdir" --target="$rs_target" --with-gmp="$rs_supportprefixdir" --with-mpfr="$rs_supportprefixdir" --enable-languages=c,c++ --enable-checking=release --enable-version-specific-runtime-libs --enable-threads=win32 --disable-win32-registry --disable-shared --disable-nls
rs_do_command ../gcc/configure --prefix="$rs_prefixdir" --target="$rs_target" --with-gmp="$rs_supportprefixdir" --with-mpfr="$rs_supportprefixdir" --with-pkgversion="RosBE-Unix $ROSBE_VERSION" --enable-languages=c,c++ --enable-checking=release --enable-version-specific-runtime-libs --disable-shared --disable-nls --disable-werror
rs_do_command $rs_makecmd -j $rs_cpucount
rs_do_command $rs_makecmd install
rs_clean_module "gcc"
export CFLAGS=""
export CFLAGS_FOR_TARGET=""
export CXXFLAGS_FOR_TARGET=""
unset CFLAGS
unset CFLAGS_FOR_TARGET
unset CXXFLAGS_FOR_TARGET
fi
if rs_prepare_module "make"; then
export CFLAGS="$rs_host_cflags"
rs_do_command ../make/configure --prefix="$installdir" --disable-dependency-tracking --disable-nls --enable-case-insensitive-file-system --disable-job-server --disable-rpath
rs_do_command ../make/configure --prefix="$installdir" --disable-dependency-tracking --disable-nls --enable-case-insensitive-file-system --disable-job-server --disable-rpath --disable-werror
rs_do_command $rs_makecmd -j $rs_cpucount
rs_do_command $rs_makecmd install
rs_clean_module "make"
export CFLAGS=""
unset CFLAGS
fi
# NASM doesn't compile in a dedicated build directory, so just extract it
@ -315,12 +321,12 @@ if rs_extract_module "nasm" "$rs_workdir"; then
export CFLAGS="$rs_host_cflags"
cd "nasm"
rs_do_command ./configure --prefix="$rs_prefixdir"
rs_do_command ./configure --prefix="$rs_prefixdir" --disable-werror
rs_do_command $rs_makecmd -j $rs_cpucount
rs_do_command $rs_makecmd install
rs_clean_module "nasm"
export CFLAGS=""
unset CFLAGS
fi
# Final actions

View File

@ -0,0 +1,2 @@
int main() {return 0;}

View File

@ -2,7 +2,7 @@
#
# 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 <colin@reactos.org>
# Copyright 2009-2010 Colin Finck <colin@reactos.org>
#
# Released under GNU GPL v2 or any later version.
@ -11,13 +11,13 @@
#
# This script was built for the following toolchain versions:
# - binutils 2.20.51-20091222 (snapshot)
# - gcc 4.4.2
# - gcc 4.4.3
# patched with:
# * http://gcc.gnu.org/bugzilla/attachment.cgi?id=18882&action=view (committed in GCC r153606)
# - gmp 4.3.1
# - mingw-runtime 3.16
# - gmp 4.3.2
# - mingw-runtime 3.17
# - mpfr 2.4.2
# - w32api 3.13
# - w32api 3.14
#
# These tools have to be compiled under MSYS with "gcc version 3.4.5 (mingw-vista special r3)"
#
@ -27,10 +27,10 @@
# RosBE Setup Variables
rs_host_cflags="-pipe -fno-common -O3 -march=pentium3 -mfpmath=sse"
rs_needed_tools="bison flex gcc g++ grep makeinfo" # GNU Make has a special check
rs_host_cflags="-pipe -fno-common -O2 -march=pentium3 -mfpmath=sse" # -fno-common needed for native builds due to GCC 4.4 bug according to Dmitry Gorbachev
rs_needed_tools="bison flex gcc g++ grep makeinfo" # GNU Make has a special check
rs_target="mingw32"
rs_target_cflags="-pipe -gstabs+ -O3 -march=pentium -mtune=i686"
rs_target_cflags="-pipe -gstabs+ -O2 -march=pentium -mtune=i686"
# Get the absolute path to the script directory
cd `dirname $0`
@ -151,20 +151,16 @@ if rs_prepare_module "mingw_runtime"; then
# The "mingw_runtime_dev" package needed for RosBE-Unix is manually created from the result of this build.
export CFLAGS=""
export C_INCLUDE_PATH=""
unset CFLAGS
unset C_INCLUDE_PATH
fi
if rs_prepare_module "gmp"; then
export CFLAGS="$rs_host_cflags"
rs_do_command ../gmp/configure --prefix="$rs_supportprefixdir" --host="$rs_target" --build="$rs_target" --disable-shared --disable-werror
rs_do_command $rs_makecmd -j $rs_cpucount
rs_do_command $rs_makecmd check
rs_do_command $rs_makecmd install
rs_clean_module "gmp"
export CFLAGS=""
fi
if rs_prepare_module "mpfr"; then
@ -176,7 +172,7 @@ if rs_prepare_module "mpfr"; then
rs_do_command $rs_makecmd install
rs_clean_module "mpfr"
export CFLAGS=""
unset CFLAGS
fi
if rs_prepare_module "binutils"; then
@ -187,7 +183,7 @@ if rs_prepare_module "binutils"; then
rs_do_command $rs_makecmd install
rs_clean_module "binutils"
export CFLAGS=""
unset CFLAGS
fi
if rs_prepare_module "gcc"; then
@ -198,17 +194,17 @@ if rs_prepare_module "gcc"; then
export C_INCLUDE_PATH="$rs_prefixdir/$rs_target/include"
export LIBRARY_PATH="$rs_prefixdir/$rs_target/lib"
rs_do_command ../gcc/configure --prefix="$rs_prefixdir" --host="$rs_target" --build="$rs_target" --target="$rs_target" --with-gmp="$rs_supportprefixdir" --with-mpfr="$rs_supportprefixdir" --enable-languages=c,c++ --enable-checking=release --enable-version-specific-runtime-libs --enable-threads=win32 --disable-win32-registry --disable-shared --disable-nls --disable-werror
rs_do_command ../gcc/configure --prefix="$rs_prefixdir" --host="$rs_target" --build="$rs_target" --target="$rs_target" --with-gmp="$rs_supportprefixdir" --with-mpfr="$rs_supportprefixdir" --with-pkgversion="RosBE-Windows" --enable-languages=c,c++ --enable-checking=release --enable-version-specific-runtime-libs --disable-win32-registry --disable-shared --disable-nls --disable-werror
rs_do_command $rs_makecmd profiledbootstrap
rs_do_command $rs_makecmd install
rs_clean_module "gcc"
export STAGE1_CFLAGS=""
export BOOT_CFLAGS=""
export CFLAGS_FOR_TARGET=""
export CXXFLAGS_FOR_TARGET=""
export C_INCLUDE_PATH=""
export LIBRARY_PATH=""
unset STAGE1_CFLAGS
unset BOOT_CFLAGS
unset CFLAGS_FOR_TARGET
unset CXXFLAGS_FOR_TARGET
unset C_INCLUDE_PATH
unset LIBRARY_PATH
fi
# Final actions