Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uflorida!haven!uvaarpa!virginia!kesmai!dca From: dca@kesmai.COM (David C. Albrecht) Newsgroups: comp.sys.amiga Subject: Re: lattice/MANX bug when compiling large programs Message-ID: <191@kesmai.COM> Date: 7 Oct 88 21:30:30 GMT References: <4424@louie.udel.EDU> <188@kesmai.COM> <12624@oberon.USC.EDU> Organization: Kesmai Corporation, Charlottesville, VA Lines: 41 In article <12624@oberon.USC.EDU>, papa@pollux.usc.edu (Marco Papa) writes: > In article <188@kesmai.COM> dca@kesmai.COM (David C. Albrecht) writes: > I (Marco Papa) say: > || I am trying to compile a VERY large C program and so far I haven't been > || successful with either MANX 3.60 or Lattice 4.00. > |How modularized is this program? I have noticed that the subroutine > |linkages in Lattice are actually BSRs to a series of JMPS (one for > |each of the subroutines you access external to your module). If a > |single compiland is too large then the BSR to the jump table could > |fail so you might run into trouble even though the entire program size > |can be quite large. You might be able to fix your problem with some > |judicious splitting of the source into separate compilands. Just a thought. > > The program is *ONE* module, 256K worth of source code. 4 UNIX compilers > have no problem with it. I have no more compilation problems with Lattice > after using the -r0 -b0 switches, EXCEPT that Lattice generates BAD code > (BBS.S with odd address). The point I am trying to make is that neither > of the two C compilers on the Amiga come even close to the ones on UNIX. > I don't want to start "kludgin the code", just because the compiler is > BROKEN. I'll just go back to UNIX. > I was out to lunch anyway. The instructions were JSRs not BSRs. I'm kind of surprised that you are surprised. Due to the 'come from below' philosophy of compilers on micros they very frequently choke and die on large programs. I have found that compilers that people are so enamored of because they compile so fast often choke and die and the kind of programs I need to compile. More often than not compilers seem to be designed for modest amounts of code. Unix system compilers have been designed from the start for serious projects, not for speed or ability to run in a small environment and thus tend to be much more tolerant. I consider myself lucky if the compiler can handle binding several reasonable size modules into one very large one. I can understand your desire to not mess with the code but I wouldn't consider breaking a 256K, single module source file, into multiple modules exactly kludging. I'll spare everyone the commentaries about software engineering. David Albrecht