From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <200007130031.UAA12239@cse.psu.edu> To: 9fans@cse.psu.edu Subject: Re: [9fans] Silly porting fun From: "Russ Cox" Date: Wed, 12 Jul 2000 20:31:36 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: d94eb808-eac8-11e9-9e20-41e7f4b1d025 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. In Plan 9, the name you type is the name that gets used. No underscores are added or removed. I find that the only thing configure doesn't do right for APE is try to compile empty files. 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''. 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. Russ