GCC 2.95.3 for NEXTSTEP

Patch icon As time goes by, it becomes more difficult to compile software for NeXT computers. Coaxing GCC to compile for NEXTSTEP 3.3, so that you may then compile additional software, can be tricky. The last version of GCC I compiled for NEXTSTEP is 2.95.3. GCC 2.95.3 is sufficient to compile most modern C source that doesn't rely on C99 constructs. It is not sufficient to compile C++ code that makes sophisticated use of templates.I don't anticipate taking a stab at getting newer versions of GCC to work because the amount of effort required would not be worth the reward. I'm afraid it's time for NEXTSTEP fans to upgrade to Mac OS X.

GCC Logo You can download GCC 2.95.3 compiled for NEXTSTEP 3.3 m68k from one of the following Peanuts NeXT Archive mirrors:

GCC 2.95.3 for NEXTSTEP 3.3 m68k binaries
MirrorFile
nextcomputers.orggcc.2.95.3.N.b.tar.gz
blackcube.orggcc.2.95.3.N.b.tar.gz

I took the following steps to compile GCC 2.95.3 for NEXTSTEP 3.3 m68k, enabling C, Objective C, C++, and Fortran 77:

  1. ../gcc-2.95.3/configure --prefix=/usr/local \ --enable-languages='c,objc,c++,f77' \ --disable-shared --disable-threads --enable-cpp; make CFLAGS='-O' LIBCFLAGS='-g -O2' \ LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap
  2. In libstdc++/std/complext.h change the declaration of

    extern "C" double hypot (double, double) __attribute__ ((const));

    to

    extern "C" const double hypot (double, double) __attribute__ ((const));

    because it conflicts with what's in /NextDeveloper/Headers/ansi/math.h.

NeXT Logo Here's a patch you can apply to GCC 2.95.3 that should let you compile GCC on both NEXTSTEP 3.3 m68k and i386:

If you've succeeded in compiling GCC for NEXTSTEP and are having problems compiling POSIX programs with the -posix flag, you will need to modify your specs file in lib/gcc-lib/m68k-next-nextstep3/2.95.3/specs under the GCC installation directory. The version available above contains the appropriate modifications, but I also provide the file here along with a patch file showing the differences from the original: