On 2008-11-10 at 22:06:16 [+0100], Grzegorz Dąbrowski <grzegorz.dabrowski@xxxxxxxxx> wrote: > > I tried to build haiku legacy toolchain on Haiku. > Unfortunately build fails. There are many issues with libio in gcc > (e.g. missing printf.h). > > How the official toolchain is > (from http://haiku-files.org/files/optional-packages/) built? Using very dark magic. Are you sure you're ready for this? OK, just kidding. It's only the libstdc++ build that fails. I invested a few hours earlier this year trying to fix it, but finally decided that it's not worth the worry. A ported version of libstdc++ for gcc 2.95.3 is included in Haiku's sources and is built as part of Haiku anyway. So it doesn't need to be built anymore. So the short answer is: Ignore the problem. :-) CU, Ingo PS: Attached is my respective "notes" file with build instructions.
# version files legacy/binutils/bfd/version.h legacy/gcc/gcc/version.c Note: Also replace version in gcc install instructions # build binutils mkdir -p binutils-obj cd binutils-obj CFLAGS="-O2" CXXFLAGS="-O2" ../buildtools/legacy/binutils/configure --prefix=/boot/develop/tools/gnupro --disable-nls --enable-shared=yes make cd .. # build gcc mkdir -p gcc-obj cd gcc-obj CFLAGS="-O2" CXXFLAGS="-O2" ../buildtools/legacy/gcc/configure --prefix=/boot/develop/tools/gnupro --disable-nls --enable-shared=yes --enable-languages=c,c++ make bootstrap cd .. -> fails when trying to build libstdc++, but isn't needed # install # binutils cd binutils-obj mv /boot/develop/tools/gnupro /boot/develop/tools/gnupro_old PATH=$PATH:/boot/develop/tools/gnupro_old/bin make install cd .. # gcc cd gcc-obj make install cp ../buildtools/legacy/gcc/COPYING ../buildtools/legacy/gcc/COPYING.LIB /boot/develop/tools/gnupro/ rm -r /boot/develop/tools/gnupro/include/g++ ln -s /boot/develop/headers/cpp /boot/develop/tools/gnupro/include/g++ ln -s /boot/develop/lib/x86/libstdc++.a /boot/develop/tools/gnupro/lib/libstdc++.a.2.10.0 # TODO: This is a non-existing link! ln -s /boot/beos/system/lib/libstdc++.r4.so /boot/develop/tools/gnupro/lib ln -s /boot/develop/lib/x86/libstdc++.a /boot/develop/tools/gnupro/lib/gcc-lib/i586-pc-haiku/2.95.3-haiku-081024 rm /boot/develop/tools/gnupro/lib/gcc-lib/i586-pc-haiku/2.95.3-haiku-081024/include/math.h cd ..