From ed0528aef00e31315839ae0125c42ccab036159e Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 7 Nov 2012 20:31:39 +0100 Subject: [PATCH] Force POSIX locale, as otherwise the build (makeinfo) may break. * the cause for the spurious makeinfo breakages is that it relies on being executed in POSIX locale - spotted by Jonathan Schleifer, thanks! --- INSTALL-gcc2-from-source-Haiku | 8 ++++---- INSTALL-gcc4-from-source-Haiku | 8 ++++---- build-gcc2-optional-package-Haiku.sh | 3 +++ build-gcc4-optional-package-Haiku.sh | 6 +++--- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/INSTALL-gcc2-from-source-Haiku b/INSTALL-gcc2-from-source-Haiku index f5fc0392ab..8cf7a86d58 100644 --- a/INSTALL-gcc2-from-source-Haiku +++ b/INSTALL-gcc2-from-source-Haiku @@ -12,10 +12,10 @@ compile binutils: mkdir binutils-obj cd binutils-obj - CFLAGS="-O2" CXXFLAGS="-O2" ../binutils/configure \ + LC_ALL=POSIX 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 + LC_ALL=POSIX make cd .. @@ -23,10 +23,10 @@ compile gcc: mkdir gcc-obj cd gcc-obj - CFLAGS="-O2" CXXFLAGS="-O2" ../gcc/configure \ + LC_ALL=POSIX 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++ - make bootstrap + LC_ALL=POSIX make bootstrap # the above will fail when compiling builtinbuf.cc, but we can ignore that # since it's trying to build libstdc++.so, which haiku provides anyway cd .. diff --git a/INSTALL-gcc4-from-source-Haiku b/INSTALL-gcc4-from-source-Haiku index c6b805d0ba..423b3b26c6 100644 --- a/INSTALL-gcc4-from-source-Haiku +++ b/INSTALL-gcc4-from-source-Haiku @@ -13,23 +13,23 @@ compile binutils: mkdir binutils-obj cd binutils-obj - CFLAGS="-O2" CXXFLAGS="-O2" ../binutils/configure \ + LC_ALL=POSIX CFLAGS="-O2" CXXFLAGS="-O2" ../binutils/configure \ --prefix=/boot/develop/abi/x86/gcc4/tools/${GCCVERSION} \ --disable-nls --enable-shared=yes \ --with-htmldir=html-docs - make -j2 + LC_ALL=POSIX make -j2 cd .. compile gcc: mkdir gcc-obj cd gcc-obj - CFLAGS="-O2" CXXFLAGS="-O2" ../gcc/configure \ + LC_ALL=POSIX CFLAGS="-O2" CXXFLAGS="-O2" ../gcc/configure \ --prefix=/boot/develop/abi/x86/gcc4/tools/${GCCVERSION} \ --enable-shared --enable-languages=c,c++ \ --disable-nls --without-libiconv-prefix --disable-libstdcxx-pch \ --with-htmldir=html-docs - make -j2 bootstrap + LC_ALL=POSIX make -j2 bootstrap cd .. Ok, now everything is compiled and ready, waiting to be installed: diff --git a/build-gcc2-optional-package-Haiku.sh b/build-gcc2-optional-package-Haiku.sh index 0d62cc17a2..99f9472e60 100755 --- a/build-gcc2-optional-package-Haiku.sh +++ b/build-gcc2-optional-package-Haiku.sh @@ -35,6 +35,9 @@ if [ ! -d "$base" ]; then # From now on fail, if anything goes wrong. set -o errexit + # forcefeed the POSIX locale, as the build (makeinfo) might choke otherwise + export LC_ALL=POSIX + cd $gcc_base/.. rm -rf binutils-obj diff --git a/build-gcc4-optional-package-Haiku.sh b/build-gcc4-optional-package-Haiku.sh index 7f621939c5..5c3c9348d6 100755 --- a/build-gcc4-optional-package-Haiku.sh +++ b/build-gcc4-optional-package-Haiku.sh @@ -70,8 +70,6 @@ case "$gccDate" in *) echo "Invalid GCC date string '$gccDate'." >&2; exit 1;; esac - - # get the GCC version gccVersion=`cat $gccSources/gcc/BASE-VER` if [ -z "$gccVersion" ]; then @@ -103,11 +101,13 @@ echo echo "This is going to take a while ..." sleep 3 - # From now on fail, if anything goes wrong. set -o errexit +# forcefeed the POSIX locale, as the build (makeinfo) might choke otherwise +export LC_ALL=POSIX + # remove and recreate the build directories rm -rf "$buildDir" mkdir -p "$binutilsBuildDir" "$gccBuildDir"