9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: arnold@skeeve.com
To: 9fans@9fans.net
Subject: Re: [9fans] Can compile Plan9 C compiler for windows10?
Date: Mon, 29 Mar 2021 11:18:31 -0600	[thread overview]
Message-ID: <202103291718.12THIVwL028125@freefriends.org> (raw)
In-Reply-To: <CAOw7k5gmwXs7eSO6hAg99c75hELpNtP9h5c8jYJPKAquw7AtsA@mail.gmail.com>

OK - wasn't kenc ported to Linux for bootstrapping the early
Go compilers? Is that version general, or not worth my trying to use?

Thanks,

Arnold

Charles Forsyth <charles.forsyth@gmail.com> wrote:

> >
> > I doubt very much that using the Plan 9 C compilers will bring much
> > additional benefit for finding bugs (except bugs in the compiler!).
>
>
> The cross-file type-checking does sometimes pick up unpleasantness caused
> by type mismatches.
> It was originally added to allow dynamically-loaded object modules to be
> checked against the loading specification.
> It has found a few problems elsewhere, including one in Python where one .c
> file included a .h with a certain #define
> in scope that another .c file didn't define by accident, causing the two .c
> files to have completely different memory layouts
> for a structure.
>
>
> > Out of curiousity, why is linking against the system libraries so
> > hard?  I assume a port of kenc to Linux would have a driver program
> > that would just invoke the system ld(1).  I'd think that getting
> > the ABI and generation of ELF (or of standard Linux assembly language)
> > correct would be the hard part.
> > What am I missing?
> 
> 
> It works very differently from what you expect
> http://9p.io/sys/doc/compiler.html  <http://9p.io/sys/doc/compiler.html>:
> 
> The compiler is a single program that produces an object file. Combined in
> the compiler are the traditional roles of preprocessor, lexical analyzer,
> parser, code generator, local optimizer, and first half of the assembler.
> The object files are binary forms of assembly language, similar to what
> might be passed between the first and second passes of an assembler.
> 
> Object files and libraries are combined by a loader program to produce the
> executable binary. The loader combines the roles of second half of the
> assembler, global optimizer, and loader.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T4d77cc95ab4ed70c-M6a254c61dea5a9cdc6797bc2
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

  reply	other threads:[~2021-03-29 17:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-28  8:13 saif.resun
2021-03-28  9:09 ` Richard Miller
2021-03-28  9:21   ` Sean Hinchee
2021-03-28 13:16     ` saif.resun
2021-03-28 15:08       ` ron minnich
2021-03-29  6:42         ` arnold
2021-03-29 14:04           ` Russ Cox
2021-03-29 14:14             ` arnold
2021-03-29 15:08               ` Charles Forsyth
2021-03-29 17:18                 ` arnold [this message]
2021-03-29 17:45                   ` Russ Cox
2021-03-29 17:55                     ` arnold
2021-03-29 17:58                     ` John Floren
2021-03-29 15:15               ` ori
2021-03-28 15:16       ` Paul Lalonde
2021-03-29  4:51       ` Ethan Gardener
2021-03-29  4:57     ` Ethan Gardener

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=202103291718.12THIVwL028125@freefriends.org \
    --to=arnold@skeeve.com \
    --cc=9fans@9fans.net \
    /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).