This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Building native compiler/assembler


Hi,
    I've got an ancient Sun 386i and I'm trying to build a functional
compiler for it. Here's the
deal: It comes with a native SunOS cc compiler and a SysV compiler.
Neither are ANSI
compilers. I've downloaded a couple of pre-compiled binaries of GCC. The
problem
that arises is that on this machine, GCC can't produce shared
libs.According to the FAQ,
the problem is that the native assembler is set up to output in the COFF
format rather than
the AOUT format. According to the writer of the FAQ, the only way around
this would
be to modify GCC to produce assembly code that is compatible with the
native AS , or port
GAS to the 386i. The former has been done but the patches were lost. Gas
can be built on this
machine and set up to use the COFF output format, but not the shared lib
mechanism used
by Sun. I found NASM(a portable assembler) on the net, but it won't
build on this machine.
The configure script fails because it says it needs an ANSI compliant
compiler to build NASM.
After poking around in the configure script, I discovered that it first
looks for a few header
files,(which are present) and then greps through them looking for a few
basic things to determine
if they are ANSI compliant. I've looked at the headers and all appears
to be well, but the script
still fails. The same script works on my Linux box, and the program
builds. The headers on both
versions of GCC appear to be essentially the same. Anyone know what I
may be missing, or a
workaround for this problem? I'm WAAAAY too much of a newbie to modify
GCC, or fully
port GAS, and the NASM route appears to be a catch-22. I can't build a
proper assembler
without a proper compiler, and can't build the compiler without the
assembler. Any help in this
matter would be much appreciated. BTW, GCC can't be built by the native
Sun compiler
unless it's gcc-2.2.2(anything later will fail according to the 386i
mailing list archive), but I
can't find sources for anything that old. Anyone know where I can find
sources for a version
that old(GNU doesn't have them anymore either)?


Thanks,
                                                                     Jim
Coleman

--
"The most important thing in the world is sincerity. Once you learn to fake
that, you've got it made."  --George Burns




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]