btrev43017 adds 2 changesets to branch 'master' old head: 073cb9127c750d74bfb0e4812cc59c54c7f27b35 new head: 68d377c247a0edd0d383975f0d7db3da84580824 ---------------------------------------------------------------------------- 5abab92: Bump legacy compiler version. 68d377c: Improve build-gcc2-optional-package.sh: * automatically build the compiler if it doesn't exist yet * protect against unneeded cruft breaking the build [ Oliver Tappe <zooey@xxxxxxxxxxxxxxx> ] ---------------------------------------------------------------------------- 2 files changed, 48 insertions(+), 6 deletions(-) build-gcc2-optional-package-Haiku.sh | 52 +++++++++++++++++++++++++++--- legacy/gcc/gcc/version.c | 2 +- ############################################################################ Commit: 5abab92edf969ae46695ea07c9a51d37980ce1d0 URL: http://cgit.haiku-os.org/buildtools/commit/?id=5abab92 Author: Oliver Tappe <zooey@xxxxxxxxxxxxxxx> Date: Tue Nov 22 17:59:35 2011 UTC Bump legacy compiler version. ---------------------------------------------------------------------------- diff --git a/legacy/gcc/gcc/version.c b/legacy/gcc/gcc/version.c index 278123f..9024f19 100644 --- a/legacy/gcc/gcc/version.c +++ b/legacy/gcc/gcc/version.c @@ -1 +1 @@ -char *version_string = "2.95.3-haiku-100818"; +char *version_string = "2.95.3-haiku-111122"; ############################################################################ Revision: btrev43017 Commit: 68d377c247a0edd0d383975f0d7db3da84580824 URL: http://cgit.haiku-os.org/buildtools/commit/?id=68d377c Author: Oliver Tappe <zooey@xxxxxxxxxxxxxxx> Date: Wed Nov 23 16:49:35 2011 UTC Improve build-gcc2-optional-package.sh: * automatically build the compiler if it doesn't exist yet * protect against unneeded cruft breaking the build ---------------------------------------------------------------------------- diff --git a/build-gcc2-optional-package-Haiku.sh b/build-gcc2-optional-package-Haiku.sh index 87b33fc..0d62cc1 100755 --- a/build-gcc2-optional-package-Haiku.sh +++ b/build-gcc2-optional-package-Haiku.sh @@ -28,11 +28,55 @@ fi current_dir=$(pwd) base=/boot/develop/abi/x86/gcc2/tools/gcc-2.95.3-haiku-$GCCDATE if [ ! -d "$base" ]; then - echo GCC directory \"$base\" does not exist! - exit + echo GCC directory \"$base\" does not exist, so we start a build ... + echo "This is going to take a while ..." + sleep 3 + + # From now on fail, if anything goes wrong. + set -o errexit + + cd $gcc_base/.. + + rm -rf binutils-obj + mkdir binutils-obj + cd binutils-obj + CFLAGS="-O2" CXXFLAGS="-O2" ../binutils/configure \ + --prefix=/boot/develop/abi/x86/gcc2/tools/gcc-2.95.3-haiku-${GCCDATE} \ + --disable-nls --enable-shared=yes + make + cd .. + + (cd gcc/gcc; touch c-parse.{h,c} cexp.c cp/parse.{c,h} c-gperf.h) + + rm -rf gcc-obj + mkdir gcc-obj + cd gcc-obj + CFLAGS="-O2" CXXFLAGS="-O2" ../gcc/configure \ + --prefix=/boot/develop/abi/x86/gcc2/tools/gcc-2.95.3-haiku-${GCCDATE} \ + --disable-nls --enable-shared=yes --enable-languages=c,c++ + # hack the Makefile to avoid trouble with stuff we don't need anyway + sedExpr= + for toRemove in libio libjava libobjc libstdc++; do + sedExpr="$sedExpr -e 's@^\(TARGET_CONFIGDIRS =.*\)$toRemove\(.*\)@\1\2@'" + done + echo sedExpr: $sedExpr + mv Makefile Makefile.bak || exit 1 + eval "sed $sedExpr Makefile.bak > Makefile" || exit 1 + rm Makefile.bak + # build gcc + make bootstrap + cd .. + + mkdir /boot/develop/abi/x86/gcc2/tools/gcc-2.95.3-haiku-${GCCDATE} + cd binutils-obj + make install + cd .. + cd gcc-obj + make install + cd .. + ln -sfn gcc-2.95.3-haiku-${GCCDATE} /boot/develop/abi/x86/gcc2/tools/current fi - ### HTML documentation #################################### html_base=$base/html-docs @@ -49,12 +93,10 @@ if [ ! -d "$html_base" ]; then makeinfo --html $gcc_base/../gcc/gcc/cpp.texi makeinfo --html $gcc_base/../gcc/gcc/gcc.texi makeinfo --html $gcc_base/../binutils/libiberty/libiberty.texi - makeinfo --force --html $gcc_base/../gcc/libio/iostream.texi ln -sf cpp/index.html $html_base/cpp.html ln -sf gcc/index.html $html_base/gcc.html ln -sf libiberty/index.html $html_base/libiberty.html - ln -sf iostream/index.html $html_base/iostream.html fi if [ -d "$base/share/doc" ]; then echo "Adding binutils HTML documentation..."