⛏️ index : buildtools.git

author Oliver Tappe <zooey@hirschkaefer.de> 2012-11-07 20:31:39.0 +01:00:00
committer Oliver Tappe <zooey@hirschkaefer.de> 2012-11-07 20:31:39.0 +01:00:00
commit
ed0528aef00e31315839ae0125c42ccab036159e [patch]
tree
dc9ea96f6790d8c83f08d3ac67eb1a1eeb7a0d8b
parent
48a09beb0a193ef249837926354f9ef8f4ce6990
download
ed0528aef00e31315839ae0125c42ccab036159e.tar.gz

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!

Diff

 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 f5fc039..8cf7a86 100644
--- a/INSTALL-gcc2-from-source-Haiku
+++ a/INSTALL-gcc2-from-source-Haiku
@@ -12,10 +12,10 @@

	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 @@

	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 c6b805d..423b3b2 100644
--- a/INSTALL-gcc4-from-source-Haiku
+++ a/INSTALL-gcc4-from-source-Haiku
@@ -13,23 +13,23 @@

	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 0d62cc1..99f9472 100755
--- a/build-gcc2-optional-package-Haiku.sh
+++ a/build-gcc2-optional-package-Haiku.sh
@@ -35,6 +35,9 @@
	# 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 7f62193..5c3c934 100755
--- a/build-gcc4-optional-package-Haiku.sh
+++ a/build-gcc4-optional-package-Haiku.sh
@@ -70,8 +70,6 @@
	*)	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,10 +101,12 @@
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"