9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Ryan Gonzalez <rymg19@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] ken cc for linux
Date: Wed, 11 Mar 2015 18:04:08 -0500	[thread overview]
Message-ID: <CAO41-mPb9Jqg9L6UpBhfYHB8CN=0KGCaWKAQ8oSSm9szazzcQQ@mail.gmail.com> (raw)
In-Reply-To: <7B7A4AC6-02F2-4A28-AE1F-7D43B0494706@quintile.net>

[-- Attachment #1: Type: text/plain, Size: 3950 bytes --]

That's ape with ape/pcc, which is ANSI-compliant, not a port of the
non-compliant base compilers (6c, 8c, etc.).

On Wed, Mar 11, 2015 at 4:54 PM, Quintile <steve@quintile.net> wrote:

>
> awl compiles under APE with a little work. someone, sorry I have forgotten
> who, did Stirling work a few years ago and got many Linux tools ported - to
> support 3rd party stuff. to my chagrin I never managed to get avn to work
> on top of this.
>
> the code was in Google code I think, his porting instructions should work
> for the latest gawk too.
>
> if not put the code somewhere and I will have a go.
>
> -Steve
>
>
>
>
>
> On 11 Mar 2015, at 21:04, Ryan Gonzalez <rymg19@gmail.com> wrote:
>
> Warning: this will get messy *fast*.
>
> On Wed, Mar 11, 2015 at 3:30 PM, Aharon Robbins <arnold@skeeve.com> wrote:
>
>> Thanks for the link to the Google code repo.
>>
>> I'm currently on x86_64 Ubuntu 12.04. Building was not so smooth, several
>> files are missing for the Power 64 port.
>>
>
> Yup. Comment out the lines in the mkfiles. In src/cmd/mkfile, I commented
> out lines 34-36.
>
> I think you already need mk installed; you can grab it from here
> <http://swtch.com/plan9port/unix/mk-with-libs.tgz>.
>
>
>>
>> I did as best I could to build things.  I suppose my expectations aren't
>> what they should be. I was looking for the usual
>>
>>         configure && make && make install
>>
>> experience, and it wasn't there. I like to compile gawk with multiple
>> compilers and thought I'd try ken's, but it wasn't clear to me which
>> o.out file to use, or how to install it such that it will get the
>> system's include files and libraries.
>>
>>
> I doubt the Plan 9 compilers will even get *close* to building gawk.
>
> See, the compilers implement a variant of ANSI C with some C99-ish
> extensions. For once, the preprocessor does not work with #if's. You can
> only use #ifdef's.
>
> Because of this, 99% of the C standard library headers will NOT work with
> the compilers.
>
> Another issue is that it seems that the linker does not read ELF files, so
> linking with about anything is out of the question.
>
> As for the compilers you need to invoke...
>
> The directories in src/cmd are formatting like *n*c, *n*a, and *n*l,
> where the *c ones are the compiles, *a, the assemblers, and *l, the linkers.
>
> The executable is at src/cmd/<dir>/o.out. For Ubuntu 64-bit, you'll want
> src/cmd/6c/o.out to compile and src/cmd/6l/o.out to link. Or, at least you
> would...if the files weren't missing. Since half of them are, you'll
> instead want src/cmd/8c/o.out to compile and src/cmd/8l/o.out to link.
> Those are the 32-bit compilers.
>
> I set up symlinks in ken-cc/bin using bin/8c as an alias for
> src/cmd/8c/o.out. Same thing for 8l.
>
> The command lines look something like:
>
> 8c tst.c # outputs tst.8
> 8l -o tst tst.8 # outputs tst
>
> Bottom line: you may be out of luck if you want to use ken-cc as a
> general-purpose C compiler. It isn't. At all.
>
> It's fun to toy with, though.
>
> Go had vastly better versions, but it seems they got ripped out recently.
> I think Go 1.3 may have had them, in which case you'd do something like:
>
> go tool 6c tst.c
> go tool 6l -o tst tst.6
>
> As you can see, Go actually had a working 64-bit compiler.
>
> I have yet to figure out why the hell symlinks to the compilers never get
> set up in the bin directory.
>
>
>> If this is easy to do, I'd appreciate hearing how. If not, then I'm not
>> going to worry about it. :-)
>>
>> Much thanks,
>>
>> Arnold
>>
>>
>
>
> --
> Ryan
> [ERROR]: Your autotools build scripts are 200 lines longer than your
> program. Something’s wrong.
> http://kirbyfan64.github.io/
>
>
>


-- 
Ryan
[ERROR]: Your autotools build scripts are 200 lines longer than your
program. Something’s wrong.
http://kirbyfan64.github.io/

[-- Attachment #2: Type: text/html, Size: 6150 bytes --]

  reply	other threads:[~2015-03-11 23:04 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11 20:30 Aharon Robbins
2015-03-11 20:34 ` Aram Hăvărneanu
2015-03-11 21:04 ` Ryan Gonzalez
2015-03-11 21:54   ` Quintile
2015-03-11 23:04     ` Ryan Gonzalez [this message]
2015-03-11 23:19       ` Steve Simon
2015-03-12  6:39         ` arnold
2015-03-13  1:31     ` erik quanstrom
2015-03-13 13:24       ` Charles Forsyth
2015-03-13 17:59         ` Ryan Gonzalez
2015-03-13 18:19           ` Kurt H Maier
2015-03-19 15:35             ` Jeff Sickel
2015-03-19 16:09               ` [9fans] using git arnold
2015-03-19 16:22                 ` Stanley Lieber
2015-03-19 16:34                 ` Charles Forsyth
2015-03-19 16:36                   ` Charles Forsyth
2015-03-19 16:39                     ` Federico Benavento
2015-04-03 18:46                       ` Jeff Sickel
2015-03-19 18:03                   ` Skip Tavakkolian
2015-03-19 20:30                     ` Jeff Sickel
2015-03-19 21:46                       ` Skip Tavakkolian
2015-03-19 21:54                         ` Devon H. O'Dell
2015-03-20  1:02                           ` Kurt H Maier
2015-03-19 18:26                   ` arnold
2015-03-28 11:14                     ` Charles Forsyth
2015-03-28 14:00                       ` Paul Lalonde
2015-03-30  9:48                         ` Giacomo Tesio
2015-03-30  9:55                           ` Giacomo Tesio
2015-03-30 16:16                             ` Jeff Sickel
2015-03-30 19:47                               ` Stanley Lieber
2015-03-30 20:41                                 ` Bakul Shah
2015-03-30 20:20                               ` Giacomo Tesio
2015-03-30 20:32                                 ` Ryan Gonzalez
2015-03-31  3:17                                 ` arnold
2015-03-19 17:00                 ` Jeff Sickel
2015-03-19 17:36                   ` Ori Bernstein
2015-03-12  8:50   ` [9fans] ken cc for linux Aram Hăvărneanu
2015-03-12 17:53     ` Ryan Gonzalez
2015-03-12  8:51   ` Aram Hăvărneanu
2015-03-12 10:06     ` Charles Forsyth
2015-03-12 15:23       ` Charles Forsyth
2015-03-12 15:41         ` Brantley Coile
2015-03-12 17:14           ` Charles Forsyth
2015-03-13  1:28             ` erik quanstrom
2015-03-12 17:52     ` Ryan Gonzalez

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='CAO41-mPb9Jqg9L6UpBhfYHB8CN=0KGCaWKAQ8oSSm9szazzcQQ@mail.gmail.com' \
    --to=rymg19@gmail.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).