(Answer) (Category) SCO comp.unix.sco.programmer FAQ. : (Category) Known bugs in SCO Programming Environments. :
Patches for gcc-3.3.1 for OpenServer 5.0.x
Thanks to Kean
Here is what you need...

Download gcc from ftp.gnu.org

 ftp://ftp.gnu.org/gnu/gcc/gcc-3.3.1.tar.gz
 
You need to download these patches and patch gcc-3.3.1
 ftp://ftp.zenez.com/pub/zenez/prgms/331patch.bz2
bunzip2 331patch.gz2
apply patch
In the gcc-3.3.1 directory I make an "osr5" directory. cd into that and then execute: CC=gcc CFLAGS=-O2 CXX=g++ CXXFLAGS=-O2 NM=gnm ../configure \
   --with-gnu-as \
   --with-as=/usr/gnu/bin/as \
   --disable-shared \
   --with-system-zlib \
   --enable-multilib \
   --host=i586-pc-sco3.2v5.0 \
   --build=i586-pc-sco3.2v5.0
This assumes you have my latest GNU Development Tools package installed and that /usr/gnu/bin appears on your PATH *before* /usr/local/bin. This passes the vast majority of its internal DejaGNU tests. Its about the best shape GCC has been in on OSR5 in a long while. But there are problems, especially with C++. The way they handle template instantiation is awkward. You may find you need to link C++ programs and shared libraries with -Wl,-z -Wl,multidefs. The real solution is for us to change our link editor to recognize these .gnu.linkonce sections and obey them, or to get the GNU link editor working on OSR5, something I am fairly close to getting right but it is still a way off. But at least this gets you most of the way there. I am curious to know how this works out for you.
This set of patches adds full support for gjc, the GNU Java Compiler.
Kean.
gerberb@zenez.com
[Append to This Answer]
Previous: (Answer) Why doesn't gethostbyname() return the IP address correctly when dynamically linked?
This document is: http://www.zenez.com/cgi-bin/scoprogfaq/faq?file=114
[Search] [Appearance]
This is a Faq-O-Matic 2.721.