GCC 2.95.3 for NEXTSTEP
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.
You can download GCC 2.95.3 compiled for NEXTSTEP 3.3 m68k from one of the following Peanuts NeXT Archive mirrors:
Mirror | File |
---|---|
nextcomputers.org | gcc.2.95.3.N.b.tar.gz |
blackcube.org | gcc.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:
- ../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
In
libstdc++/std/complext.h
change the declaration ofextern "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
.
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:
Patch File |
---|
gcc-2.95.3.next.patch |
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:
Spec Files |
---|
gcc.2.95.3.specs (m68k) |
gcc.2.95.3.specs.patch (m68k) |
gcc.2.95.3.i386.specs |
gcc.2.95.3.i386.specs.patch |