buildtools/INSTALL-gcc4-from-source-Haiku
Oliver Tappe ed0528aef0 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!
2012-11-07 20:31:39 +01:00

45 lines
1.3 KiB
Plaintext

How to build gcc-4.5 natively on Haiku:
checkout the buildtools from the haiku repository
cd into the buildtools folder (where this file lives)
declare the current gcc-version-date like this:
export GCCDATE=110631
export GCCVERSION=gcc-4.5.3-haiku-${GCCDATE}
(just use the current date instead of '110631' and the current gcc version
instead of '4.5.3')
compile binutils:
mkdir binutils-obj
cd binutils-obj
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
LC_ALL=POSIX make -j2
cd ..
compile gcc:
mkdir gcc-obj
cd gcc-obj
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
LC_ALL=POSIX make -j2 bootstrap
cd ..
Ok, now everything is compiled and ready, waiting to be installed:
mkdir /boot/develop/abi/x86/gcc4/tools/${GCCVERSION}
cd binutils-obj
make install install-html
cd ../gcc-obj
make install install-html
ln -sfn ${GCCVERSION} /boot/develop/abi/x86/gcc4/tools/current
Please send questions & bug-reports to: Oliver Tappe <gcc@hirschkaefer.de>