ftp.nice.ch/Attic/openStep/unix/developer/language/c_and_friends/gcc-ns3-drivers.2.7.2.3.1.I.README

This is the README for gcc.2.7.2.3.2.I.b.tgz [Download] [Browse] [Up]

gcc-ns3-drivers.2.7.2.3.1.README
Dec 12, 1997

For now, the READMEs for the following packages are the same, since
they are so interdependant.

md5sum:
ffaee65a833990bf9efff6430d7f06d2  gcc.2.7.2.3.2.I.b.tar.gz (~7.1MB)
3429dc2251490aa9b184d4e62f44df31  gcc-ns3-drivers.2.7.2.3.1.I.b.tar.gz (~10.9MB)

These archives contains the following pre-built binaries: 
gcc-2.7.2.3
g77-0.5.21
libg++-2.7.2

built on and for the i386-next-nextstep4 platform.  includes drivers
for  
i386-next-nextstep4
and (if also installing the gcc-ns3-drivers package)
i386-next-nextstep3 (a cross-compiler)
m68k-next-nextstep3 (a cross-compiler)
targets.


NOTES

Regarding the versioning of this package:
I tacked on my port attempt numbers to the end of the gcc versions, ie,
This represents my second (.2) attempt at porting gcc v2.7.2.3 to OpenStep.  
This is also my first (.1) attempt at a nextstep3 gcc v2.7.2.3 cross compiler.  
I hope this doesn't confuse people. 
(-;

These packages have been built for and tested on OpenStep for Mach 4.2, 
but may also work on others version of OpenStep for Mach 4.x. 
This build will does NOT work on NEXTSTEP 3.x and earlier.  
I used (for the most part) patches to gcc provided from
ftp://nice.ethz.ch/users/chris/OS4/
to get the newest gcc working form OpenStep for Mach 4.x.  Patches were
available for i386 only, hence no m68k(-next-nextstep4) support... yet.

I was unable to build a dynamic (ala shared) library version of libg++,
so if you use g++, at link time, you may get a bunch of linker warnings
complaining about non-moveable code in libg++ and libstdc++.  Do not 
worry about this too much... it still works (??).


INSTALLATION

The tar.gz archives contains the installer packages gcc.pkg and
gcc-ns3-drivers.pkg.  Use /NextAdmin/Installer.app to install to
/usr/local and you're done.  If you want to build m68k binaries, make sure
to specify "Install software for both NeXT and Intel" (in Installer.app)
when installing the ns3-drivers package.

NOTE: you STILL need the nexstep developer packages (tested for OpenStep
for Mach 4.2 only... earlier/other versions may or may not work) installed
in order to use this, as it uses NeXT's supplied C libraries.  Also, in
order to use the m68k-next-* cross-compiler, you need the DeveloperLibs
installed for m68k (in addition to i386).


NOTE: To use the libg++ (C++) library, you need to rename or remove
the file /usr/lib/libg++.dylib, as it will conflict with this installed 
(native) version  (verified for OS 4.2).  I find it odd that NeXT 
included a libg++ in the developer, but no headers or information on 
what version this libg++ represents.


CROSS-COMPILING

It's a little tricky to use the nextstep3 cross-compiler,
you need to postpend -ns3 to the name of the compiler,
AND use gcc's -b flag to specify architecture (if -b
is omited the compiler assumes the native (i386) architecture).
To produce m68k binaries, for example, envoke gcc as:
gcc-ns3 -bm68k-next-nextstep3 foo.c

WIERD SIDE NOTE (I haven't figured this one out yet)
The following does NOT work (even though it SHOULD):
gcc -bm68k-next-nextstep3 foo.c
This runs the ns4 native front end, but specifies the use of the ns3
driver.  It fails because (for some reason), the ns4 compiler flags
are passed to the compiler and linker (e.g. -dynamic), and produces
bad binaries.

FAT binary NOTE 
gcc cannot (easily) create FAT binaries, at least not in the same sense
of NeXT's cc, ie,
cc -arch m68k -arch i386 foo.c
With gcc, you need to create to separate binaries, and then use
lipo.

Also, the cross-compilers don't look in /usr/local/lib for linking
libraries, by default, like the native compiler does.  If you need to
link against items in /usr/local/lib, you'll need to pass the option
-L/usr/local/lib (ie, by adding to CFLAGS or LDFLAGS) to the linker (ld).


CREDITS

GNU Software, gcc source
http://www.gnu.ai.mit.edu/

gcc patches for OpenStep 4.x
ftp://nice.ethz.ch/users/chris/OS4/

Packager
Rex Dieter <rdieter@math.unl.edu>
Computer System Manager 
Universtity of Nebraska-Lincoln  
Department of Mathematics and Statistics 
http://www.math.unl.edu/~rdieter/

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.