Patrick Georgi (patrick@georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1985
-gerrit
commit d27b7d8a49028569dfe3c472f98aea7da24e3a5a Author: Patrick Georgi patrick.georgi@secunet.com Date: Fri Dec 7 13:13:53 2012 +0100
buildgcc: Remove mingw32 hacks
After patching them to be more flexible, an even better approach was found: With this change libgcc isn't built at all on mingw32 platforms, so the system headers aren't necessary anymore.
Now x86_64-pc-mingw32 builds, too.
Change-Id: Ic1406588669d87aee1bcf40ff67af77f2a6ac283 Signed-off-by: Patrick Georgi patrick.georgi@secunet.com --- util/crossgcc/buildgcc | 42 ++++++++++++------------------------------ 1 file changed, 12 insertions(+), 30 deletions(-)
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 6d3be97..a388fe1 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -37,10 +37,6 @@ GCC_VERSION=4.7.2 GCC_AUTOCONF_VERSION=2.64 BINUTILS_VERSION=2.23 GDB_VERSION=7.5 -W32API_VERSION=3.17-2 -W32API_VERSION_SHORT=3.17 -MINGWRT_VERSION=3.20-2 -MINGWRT_VERSION_SHORT=3.20 IASL_VERSION=20121114 PYTHON_VERSION=2.7.3 EXPAT_VERSION=2.1.0 @@ -53,8 +49,6 @@ LIBELF_ARCHIVE="http://www.mr511.de/software/libelf-$%7BLIBELF_VERSION%7D.tar.gz" GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-$%7BGCC_VERSION%7D/gcc-$%7BGCC_VERSION%7D.t..." BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-$%7BBINUTILS_VERSION%7D.tar.gz" GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-$%7BGDB_VERSION%7D.tar.bz2" -W32API_ARCHIVE="http://downloads.sourceforge.net/project/mingw/MinGW/Base/w32api/w32api-$%7B..." -MINGWRT_ARCHIVE="http://downloads.sourceforge.net/project/mingw/MinGW/Base/mingw-rt/mingwrt-$..." IASL_ARCHIVE="http://www.acpica.org/download/acpica-unix-$%7BIASL_VERSION%7D.tar.gz" PYTHON_ARCHIVE="http://www.python.org/ftp/python/$%7BPYTHON_VERSION%7D/Python-$%7BPYTHON_VER..." EXPAT_ARCHIVE="http://downloads.sourceforge.net/sourceforge/expat/expat-$%7BEXPAT_VERSION%7..." @@ -66,8 +60,6 @@ LIBELF_DIR="libelf-${LIBELF_VERSION}" GCC_DIR="gcc-${GCC_VERSION}" BINUTILS_DIR="binutils-${BINUTILS_VERSION}" GDB_DIR="gdb-${GDB_VERSION}" -W32API_DIR="w32api-${W32API_VERSION}-mingw32" -MINGWRT_DIR="mingwrt-${MINGWRT_VERSION}-mingw32" IASL_DIR="acpica-unix-${IASL_VERSION}" PYTHON_DIR="Python-${PYTHON_VERSION}" EXPAT_DIR="expat-${EXPAT_VERSION}" @@ -129,7 +121,7 @@ cleanup() { printf "Cleaning up temporary files... " rm -rf build-* combined gcc-* gmp-* mpfr-* mpc-* libelf-* binutils-* - rm -rf gdb-* w32api-* mingwrt-* acpica-* python-* expat-* + rm -rf gdb-* acpica-* python-* expat-* printf "${green}ok${NC}\n" }
@@ -237,11 +229,6 @@ if [ $SKIPPYTHON -eq 1 ]; then EXPAT_PACKAGE="" fi
-MINGW_ARCHIVES="" -if [ "`echo $TARGETARCH | grep -c -- -mingw32`" -gt 0 ]; then - MINGW_ARCHIVES="$W32API_ARCHIVE $MINGWRT_ARCHIVE" -fi - # coreboot does not like the GOLD linker # USE_GOLD="--enable-gold" USE_GOLD="" @@ -267,7 +254,7 @@ fi printf "Downloading tar balls ... \n" mkdir -p tarballs for ARCHIVE in $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE $LIBELF_ARCHIVE \ - $GCC_ARCHIVE $BINUTILS_ARCHIVE $GDB_ARCHIVE $MINGW_ARCHIVES \ + $GCC_ARCHIVE $BINUTILS_ARCHIVE $GDB_ARCHIVE \ $IASL_ARCHIVE $PYTHON_ARCHIVE $EXPAT_ARCHIVE; do FILE=`basename $ARCHIVE` printf " * $FILE " @@ -284,14 +271,9 @@ done printf "Downloaded tar balls ... " printf "${green}ok${NC}\n"
-MINGW_PACKAGES="" -if [ "`echo $TARGETARCH | grep -c -- -mingw32`" -gt 0 ]; then - MINGW_PACKAGES="W32API MINGWRT" -fi - printf "Unpacking and patching ... \n" for PACKAGE in GMP MPFR MPC LIBELF GCC BINUTILS $PYTHON_PACKAGE \ - $EXPAT_PACKAGE $GDB_PACKAGE $MINGW_PACKAGES IASL; do + $EXPAT_PACKAGE $GDB_PACKAGE IASL; do archive=$PACKAGE"_ARCHIVE" archive="`eval echo '$'$archive`" dir=$PACKAGE"_DIR" @@ -315,12 +297,6 @@ done printf "Unpacked and patched ... " printf "${green}ok${NC}\n"
-if [ "`echo $TARGETARCH | grep -c -- -mingw32`" -gt 0 ]; then - mkdir -p $TARGETDIR/$TARGETARCH/sys-include - mv $MINGWRT_DIR/include/* $W32API_DIR/include/* \ - $TARGETDIR/$TARGETARCH/sys-include -fi - CC=cc if [ `uname` = "Darwin" ]; then #GCC_OPTIONS="$GCC_OPTIONS --enable-threads=posix" @@ -507,14 +483,20 @@ printf "Building GCC ${GCC_VERSION} ... " --prefix=$TARGETDIR --libexecdir=$TARGETDIR/lib \ --target=${TARGETARCH} --disable-werror --disable-shared \ --disable-libssp --disable-bootstrap --disable-nls \ - --disable-libquadmath \ + --disable-libquadmath --without-headers \ $GCC_OPTIONS --enable-languages="c" $USE_GOLD \ --with-gmp=$DESTDIR$TARGETDIR --with-mpfr=$DESTDIR$TARGETDIR \ --with-mpc=$DESTDIR$TARGETDIR --with-libelf=$DESTDIR$TARGETDIR \ --with-pkgversion="coreboot toolchain v$CROSSGCC_VERSION $CROSSGCC_DATE" \ || touch .failed - $MAKE $JOBS CFLAGS_FOR_BUILD="$HOSTCFLAGS" || touch .failed - $MAKE install DESTDIR=$DESTDIR || touch .failed + $MAKE $JOBS CFLAGS_FOR_BUILD="$HOSTCFLAGS" all-gcc || touch .failed + $MAKE install-gcc DESTDIR=$DESTDIR || touch .failed + + if [ "`echo $TARGETARCH | grep -c -- -mingw32`" -eq 0 ]; then + $MAKE $JOBS CFLAGS_FOR_BUILD="$HOSTCFLAGS" all-target-libgcc || touch .failed + $MAKE install-target-libgcc DESTDIR=$DESTDIR || touch .failed + fi + if [ ! -f .failed ]; then touch .success; fi ) > build-gcc/crossgcc-build.log 2>&1 test -r build-gcc/.failed && printf "${RED}failed${NC}\n" || \