Page 1 of 1

GCC 4 ? (aka 'oops, they did it again)

Posted: Wed Dec 07, 2005 6:37 am
by Pype.Clicker
just to let you know: i'm reinstalling workstation (SuSE->ubuntu). First bad surprise: kubuntu comes with no compiler or even /usr/include preinstalled... second bad surprise, default version of GCC is GCC 4 ...

and my main concern with GCC 4.x is that it appears to generate code that uses "memset" or "memcpy" regardless of locally-defined inline functions ... As a result my good old "memops.h" are no longer protecting me from "missing 'memset' in .thread.o ..." error messages ...

The code i write that triggers such code generation is structure initialization, e.g.

Code: Select all

   *ptr = (struct MyStruct) {
      .field1=val1,
     // field2 will be initialized to a nul value by the compiler.
      .field3=val3,
   };

Re:GCC 4 ? (aka 'oops, they did it again)

Posted: Wed Dec 07, 2005 12:17 pm
by stonedzealot
sudo apt-get install gcc-3.3

Wouldn't that do you some good?

I'm a gentoo user myself, so I'm not sure how they switch between installed instances of GCC, but gcc-config is the application here.

Re:GCC 4 ? (aka 'oops, they did it again)

Posted: Wed Dec 07, 2005 12:59 pm
by Candy
Pype.Clicker wrote: just to let you know: i'm reinstalling workstation (SuSE->ubuntu). First bad surprise: kubuntu comes with no compiler or even /usr/include preinstalled... second bad surprise, default version of GCC is GCC 4 ...
Did you compile a cross-compiler? If not, why not try if that works better?

You can try compile options to GCC 4 that'll make it freestanding or such, which would help with this I think.

In the worst case, make a gcc 3 cross compiler.

The way to do it is of course in the FAQ.

(I never thought I'd be referring you to the FAQ)

Re:GCC 4 ? (aka 'oops, they did it again)

Posted: Thu Dec 08, 2005 7:04 am
by Pype.Clicker
well, i have indeed 'apt-get'd gcc-3 (and i'll probably apt-get 2.95.3 aswell since it's in the apt-cache aswell ...

Building a cross-compiler is on my todo list (and well, i quite know it's in the FAQ, thanks Solar for that ;) ... however i'm rather trying to integrate support about those 'specificities' into the build system rather than requiring people to build a proper GCC first and then only building clicker ...

If you wish to compile Clicker under cygwin, that's just fine. SET OSTYPE=cygwin should be all you'll have to do: i have support for both ELF and COFF included :-)