Trying to get GCC 4.3.3 working

Hey guys,
Yesterday I finished reading all about Michael Lotz’s efforts in getting GCC 4.3.3 native working in Haiku then successfully building Haiku with it.

I have downloaded the buildtools repository from SVN, which contains the new gcc and the new binutils.
Am I right in understanding that these have been patched and configured to a point that they will build under haiku without modification? I have been trying over and over with different ./configure options with no luck at all. I was initially getting errors relating ld not being able to find crtbegin.o during a certain part of the build. After a few hours of googling I overcame that error by specifically setting the path to the compiler using “CC=/home/develop/tools/gcc-2.95.3-haiku-081024/bin/gcc” on the configure line.
I am now getting the error “undefined reference to __popcountsi2” while building bitmap.o in the gcc/bitmap.c file. I have googled this one to death and cant find a solution. I initially thought it had something to do with the GMP and MPFR libraries that mmlr mentions in his blog, but upon further investigation I think it is unrelated.

I have also tried compiling the new binutils, but I am getting the error “noreturn function does return.” in the bfd/bfd.c file. From what I could determine from some extensive google searching on this topic, it seems that there is a function (exit()?) which is being linked in from haiku which is not meant to return but does.

Anyway, if I could get any help with my problems would be greatly appreciated, been driving me nuts. I am really keen to do a native gcc4 build of haiku.

The devs don’t read forums much, so try the mailing-lists or joining #haiku on

Building gcc4 Haiku has been possible for quite some time but you must do it in Linux. Previously gcc 4.1.2 was used which Michael updated to gcc 4.3.3

In Linux, you can build gcc4-x86, gcc2-x86, m68K ( & non-working PPC ) Haiku images. I’ve built them all but only tested the x86 ones.

Trying to build gcc4 Haiku from gcc2 Haiku should be possible but tougher to do. From Linux it is very easy to do & how everbody is doing it.

  1. Create Linux build environment
  2. download ( or update ) buildtools & haiku source
  3. run ./configure --help to get list of options ( it’ll list options you need to compile gcc4 tools )
  4. ./configure [options]
  5. jam

so… does that mean the m68k images run?

Can’t say if the m68k image works yet.

Don’t have m68K Mac to test on and didn’t feel the need to try it out in emulation.

mmu_man added m68k support.

You could always build the image & try it with an emulator. Here are screenshots showing Haiku’s boot menu in ARAnyM back in Jan 2008.

This may be as far as it goes for now. You can always ask on the mail list & see if anyone has tried it out.

since gcc4 was updated to 4.3.3 in the buildtools, m68k and ppc cross compilers no long complete a build… until someone fixes them, it’s actually taken a step backward at this point.

Thanks for the replys guys, but I ended up finding the bin package on Michael Lotz’s website and just installed that, much easier than trying to build it myself under haiku. Works well.