getting GCC4 on a GGC4 build ....

Forum thread started by l8night on Wed, 2012-11-07 23:11

I've just created my self a GCC4 image from a linux mint 11 machine using the following set of commands;

sudo apt-get install git yasm autoconf automake texinfo flex bison gawk build-essential unzip wget zip less zlib1g-dev
sudo apt-get install uboot-mkimage util-linux mtools
sudo apt-get install gcc-multilib g++-multilib libc6-dev-i386
git clone git://git.haiku-os.org/buildtools
git clone git://git.haiku-os.org/haiku
./configure --build-cross-tools-gcc4 x86 ../buildtools
pushd ../buildtools/jam
make
popd
export PATH=../buildtools/jam/bin.linuxx86/:$PATH
jam -q -j4 haiku-image
dd bs=1M if=generated/haiku.image of=/dev/sdb

(where /dev/sdb is a 4G usb flash drive)
then I rebooted, and installed onto /dev/sda6 (my haiku partition, that grub can boot)
which was make with the alpha 3 ...
so the install put a new shiny kernel but if I type gcc --version I get the old version 2.x
not the 4.x gcc that the kernel was build with, and I assume any apps I build will not run as the abi will be wrong.

is there a way to get a build that includes the gcc I want ?

Comments

Re: getting GCC4 on a GGC4 build ....

Have you tried to select the gcc4 compiler?
Run the
~>setgcc gcc4
command in the terminal, and check again the gcc version.

Re: getting GCC4 on a GGC4 build ....

Make sure you set up your UserBuildConfig script to include the Development package. This way you will get an updated gcc toolchain.
Then, use the setgcc command to switch between the two compilers.

You should also conside building a gcc2-hybrid image. this is the format that the alphas use and is the only officially supported one. On a gcc2 hybrid, you can use setgcc to make gcc4 the available compiler. Then your gcc4 apps will work just fine. This makes it easy to build apps in a way suitable for other users because it follows the standard directory paths.