Mail Archives: djgpp/1993/07/30/14:02:04
> > Does anyone know of a GCC port to OS/2? Or better yet, has anyone got a
> > cross-compiler setup to target OS/2 from UNIX?
Currently, there is no supported way of compiling an OS/2 program on UNIX.
I think that if you put some effort into it, you could create a version
of the EMX/GCC compiler that could do this.
The other OS/2 gcc (called gcc/2) cannot be converted into a UNIX->OS/2
cross compiler since it requires the linker that comes with OS/2, link386.
> There are at least 3 ways to use GCC with OS/2 (which I have done all of...)
> 1) Use DJGPP in a DOS box with the DPMI support. Believe it or not, for
> character cell applications this is FASTER than native OS/2 code, since
> you don't have to thunk to the 16 bit OS/2 stuff each time you want to
> write a string.
The is not quite correct. The reason DOS command line boxes are faster
than OS/2 command line boxes is that each character output from an OS/2
box is updated immediately, and scrolling speed is awful. The window
of a DOS box is updated fully only every tenth of a second - which
essentially provides a jump scroll feature (i.e. several real scrolls can
be converted into a single multi-line scroll on screen). A full-screen
OS/2 box is *much* faster than a full-screen DOS box under OS/2.
If anyone is serious about using djgpp under OS/2, I would suggest that
they compile djgpp using one of the two OS/2 gcc compilers; thereby
creating an OS/2 -> DOS djgcc cross compiler. This compiler would be
tons faster than the DOS djgcc since it wouldn't have to hassle with
getting in and out of real mode to perform I/O.
> 2) Get a copy of EMX (hobbes.unm.edu (or somesuch)) is a great place to get
> lots of OS/2 software, including ports with GCC. EMX also will run under
> DOS, and has many nice features. It does not include all source, however,
> which makes it unsupportable long term in a commercial environment.
Specifically, the source code of EMX's DOS/OS/2 extender is not provided.
However, look also at the license conditions for programs that run on the
EMX extender carefully. Depending on your company's attitude, this could
be a problem.
The output of the gcc/2 compiler is entirely free of restrictions other
than your own. (So long as you don't use the GNU C++ Libraries)
> 3) There is a GCC port on charon.mit.edu (official I think?) which has some
> problems but carries much less baggage than the EMX version.
The version of gcc on charon.mit.edu is a *year* out of date. The
place to get both EMX/GCC and gcc/2 is at `ftp-os2.cdrom.com' in the
directory pub/os2/2_x/unix/gnu/emxXXX and pub/os2/2_x/unix/gnu/gcc2_233.
Neither compiler is more "official" than the other.
EMX/GCC is the more mature product, as long as you can live without
full source and can live with the license.
--
Colin Jensen
cjensen AT ampex DOT com
- Raw text -