From de8d12239923a1ee8b83c1f54b5ea12ef58fd49e Mon Sep 17 00:00:00 2001 From: dannybackx Date: Wed, 27 May 2009 19:47:05 +0000 Subject: [PATCH] Stefan Klug's patch to get the old build to work again if the right parameter is supplied. git-svn-id: svn://svn.code.sf.net/p/cegcc/code/trunk@1321 d7810a3d-100a-0410-8641-c3624a9c11f1 --- cegcc/src/scripts/ChangeLog | 5 +++ cegcc/src/scripts/build-mingw32ce.sh | 86 +++++++++++++++++++++++++----------- 2 files changed, 65 insertions(+), 26 deletions(-) diff --git a/cegcc/src/scripts/ChangeLog b/cegcc/src/scripts/ChangeLog index a041b6d9e..b79e7a8ba 100644 --- a/cegcc/src/scripts/ChangeLog +++ b/cegcc/src/scripts/ChangeLog @@ -1,3 +1,8 @@ +2009-05-27 Stefan Klug + + * build-mingw32ce.sh : Get the old gcc to build if gcc_src=gcc is + supplied. + 2009-05-15 Danny Backx * build-cegcc.sh, build-x86.sh: Apply Geoffroys work on these scripts too. diff --git a/cegcc/src/scripts/build-mingw32ce.sh b/cegcc/src/scripts/build-mingw32ce.sh index bf43a79c4..373abe713 100755 --- a/cegcc/src/scripts/build-mingw32ce.sh +++ b/cegcc/src/scripts/build-mingw32ce.sh @@ -14,7 +14,9 @@ export BUILD_DIR=`pwd` ac_default_prefix="/opt/mingw32ce" -export gcc_src=gcc-4.4.0 +if test -z "${gcc_src}"; then + export gcc_src=gcc-4.4.0 +fi # The list of components, in build order. There's a build_FOO # function for each of these components @@ -220,13 +222,21 @@ build_bootstrap_gcc() --without-newlib \ --enable-checking || exit 1 - make ${PARALLELISM} all-gcc || exit 1 - make configure-target-libgcc || exit 1 - make install-gcc || exit 1 - cd ${TARGET}/libgcc || exit 1 - make ${PARALLELLISM} libgcc.a || exit 1 - /usr/bin/install -c -m 644 libgcc.a ${PREFIX}/lib/gcc/${TARGET}/4.4.0 || exit 1 - + case ${gcc_src} in + gcc) + make ${PARALLELISM} all-gcc || exit 1 + make install-gcc || exit 1 + ;; + gcc-*) + make ${PARALLELISM} all-gcc || exit 1 + make configure-target-libgcc || exit 1 + make install-gcc || exit 1 + cd ${TARGET}/libgcc || exit 1 + make ${PARALLELLISM} libgcc.a || exit 1 + /usr/bin/install -c -m 644 libgcc.a ${PREFIX}/lib/gcc/${TARGET}/4.4.0 || exit 1 + ;; + esac + cd ${BUILD_DIR} } @@ -293,24 +303,48 @@ build_gcc() mkdir -p gcc cd gcc - ${BASE_DIRECTORY}/${gcc_src}/configure \ - --with-gcc \ - --with-gnu-ld \ - --with-gnu-as \ - --build=${BUILD} \ - --target=${TARGET} \ - --host=${HOST} \ - --prefix=${PREFIX} \ - --enable-threads=win32 \ - --disable-nls \ - --enable-languages=c,c++ \ - --disable-win32-registry \ - --disable-multilib \ - --disable-interwork \ - --without-newlib \ - --enable-checking \ - --with-headers \ - --disable-__cxa_atexit + case ${gcc_src} in + gcc) + ${BASE_DIRECTORY}/${gcc_src}/configure \ + --with-gcc \ + --with-gnu-ld \ + --with-gnu-as \ + --build=${BUILD} \ + --target=${TARGET} \ + --host=${HOST} \ + --prefix=${PREFIX} \ + --enable-threads=win32 \ + --disable-nls \ + --enable-languages=c,c++ \ + --disable-win32-registry \ + --disable-multilib \ + --disable-interwork \ + --without-newlib \ + --enable-checking \ + --with-headers + ;; + gcc-*) + ${BASE_DIRECTORY}/${gcc_src}/configure \ + --with-gcc \ + --with-gnu-ld \ + --with-gnu-as \ + --build=${BUILD} \ + --target=${TARGET} \ + --host=${HOST} \ + --prefix=${PREFIX} \ + --enable-threads=win32 \ + --disable-nls \ + --enable-languages=c,c++ \ + --disable-win32-registry \ + --disable-multilib \ + --disable-interwork \ + --without-newlib \ + --enable-checking \ + --with-headers \ + --disable-__cxa_atexit + ;; + esac + # we build libstdc++ as dll, so we don't need this. # --enable-fully-dynamic-string \ -- 2.11.4.GIT