sudo apt-get install m4
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.64.tar.xz
tar xf autoconf-2.64.tar.xz
cd autoconf-2.64/
./configure
make
sudo make install
wget http://ftp.gnu.org/gnu/automake/automake-1.11.1.tar.bz2
tar xf automake-1.11.1.tar.bz2
cd automake-1.11.1/
./configure
make
sudo make install
sudo apt-get install libtool-bin
sudo apt-get install texinfo
cd toolchain
./download_libs.sh
sudo mkdir -p $OSTROOT/usr/include
sudo cp -rT newlib-2.2.0-1/newlib/libc/include $OSTROOT/usr/include
Go to hosted_compiler directory and run
prepare_build_binutils.sh
and then run make according to instructions in prepare_build_binutils.sh
prepare_build_gcc.sh
Create link to i686-ost-cc
cd $OSTCC/bin
sudo ln -s i686-ost-gcc i686-ost-cc
Build newlib
./configure-ost-newlib.sh
./build-ost-newlib.sh $OSTCC/bin
cd libk
make
cd kernel
make
cd test-application
./build-test-application.sh
Taken from http://www.linuxfromscratch.org/lfs/view/development/chapter05/gcc-libstdc++.html
cd toolchain/hosted_compiler/external/build-gcc
../gcc-4.9.2/libstdc++-v3/configure --enable-option-checking --target=i686-ost --prefix=$OSTCC --with-sysroot=$OSTROOT --enable-languages=c,c++ --disable-werror --disable-multilib --disable-nls --disable-libstdcxx-threads --disable-libstdcxx-pch
make
sudo make install
Remove these lines from /usr/local/ost/include/c++/4.9.2/bits/os_defines.h
#if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE)
# undef _GLIBCXX_HAVE_GETS
#endif
Install prerequisites
sudo apt-get install xorriso
Build the iso
make myiso.iso
qemu-system-i386 -kernel build-ia32/myos.bin
or for .iso files
qemu-system-i386 -cdrom build-ia32/myos.iso
The following integer symbols are defined in the Eclipse project. They are used by stdint-gcc.h
INT8_TYPE signed char UINT8_TYPE unsigned char INT16_TYPE short UINT16_TYPE unsigned short INT32_TYPE long UINT32_TYPE unsigned long INT64_TYPE long long INT64_TYPE unsigned long long