From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 12 Jul 2000 22:21:02 -0700 From: Randolph Fritz To: 9fans@cse.psu.edu Subject: Re: [9fans] Silly porting fun Message-ID: <20000712222102.B2758@cyber-dyne.com> References: <200007130031.UAA12239@cse.psu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <200007130031.UAA12239@cse.psu.edu>; from rsc@plan9.bell-labs.com on Wed, Jul 12, 2000 at 08:31:36PM -0400 Topicbox-Message-UUID: d9998da6-eac8-11e9-9e20-41e7f4b1d025 On Wed, Jul 12, 2000 at 08:31:36PM -0400, Russ Cox wrote: > The compiler, reasonably enough, decides that this routine never does > anything and is never called, and optimizes it out of existence! The > linker then cannot find main(), and fails. Is there an option switch > > That's not what's happening. > The linker cannot find _main, which > calls main, because there have been > no #pragma lines that tell it where > to find libc.a. > I stand corrected. > > If you really want configure to run, > find the line that says ``AIX loses...'' > and change the next line, which is > echo > foo.c > to > echo '#include ' > foo.c > Then things usually ``work''. > Thanks. > > A well written build process is usually > easy to convert to mk, often by guessing. > I ported cvs yesterday, creating mkfiles > by processing the output of ls *.c, and > it worked the first time. > This, of course is also an excellent point. My hacking was intended as a first cut, not a finished port. -- Randolph Fritz Eugene, Oregon, USA