9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Russ Cox" <rsc@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Silly porting fun
Date: Wed, 12 Jul 2000 20:31:36 -0400	[thread overview]
Message-ID: <200007130031.UAA12239@cse.psu.edu> (raw)

	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 <stdio.h>' > 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



             reply	other threads:[~2000-07-13  0:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-13  0:31 Russ Cox [this message]
2000-07-13  5:21 ` Randolph Fritz
  -- strict thread matches above, loose matches on Subject: below --
2000-07-14 18:42 dhog
2000-07-14 14:53 Russ Cox
2000-07-14 14:04 bobf
2000-07-14  9:58 forsyth
2000-07-16 16:04 ` Lucio De Re
2000-07-14  4:18 pip
2000-07-13 23:58 rob pike
2000-07-14  9:18 ` Douglas A. Gwyn
2000-07-13 20:32 Russ Cox
2000-07-13  8:36 forsyth
2000-07-13 16:01 ` Greg Hudson
2000-07-14  9:15   ` peter huang
2000-07-14  9:19 ` Kris Van Hees
2000-07-14 14:56   ` Douglas A. Gwyn
2000-07-17  9:11   ` Christopher Browne
2000-07-13  0:23 Russ Cox
2000-07-13  0:33 ` Christopher Nielsen
2000-07-12 23:30 forsyth
2000-07-12 23:46 ` Christopher Nielsen
2000-07-13  5:19   ` Randolph Fritz
2000-07-12 21:16 Randolph Fritz
2000-07-12 21:44 ` Latchesar Ionkov
2000-07-13  9:59   ` Douglas A. Gwyn
2000-07-13  0:38 ` arisawa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200007130031.UAA12239@cse.psu.edu \
    --to=rsc@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).