9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Jens Staal <staal1978@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Nemo book
Date: Mon, 19 Sep 2011 18:37:09 +0200	[thread overview]
Message-ID: <CAK8RtFpWn1RB-j5v_5yrXKNQULTU3S11nSs4a3WC7LmwmJ8q-g@mail.gmail.com> (raw)
In-Reply-To: <CAP6exYKnLczVHMqJmAHCy+Nsjc_RNqHBaFnrp5fOjdhVPrqLKw@mail.gmail.com>

2011/9/19 ron minnich <rminnich@gmail.com>:
> On Thu, Sep 15, 2011 at 8:46 PM, Jens Staal <staal1978@gmail.com> wrote:
>
>> Alternatively - would a newlib approach be a better bet to get
>> binutils/gcc going? I have been trying to read up on it and to try to
>> locate the syscall information I need from plan9 libc. If anyone got
>> any pointers on how to do this, it would be appreciated :)
>
> I was unsure of the cross compiler idea. Was this to run on linux to
> create plan 9 binaries?
>
> If you really want to do that, just go ahead and port the plan 9 c
> compilers etc. to unix. I did the amd64 linker in about 10 minutes.
> It's very straightforward C code, far easier to port than the sort of
> stuff you find in the GNU world -- someone once complained on this
> list that Plan  9 C code was some sort of "old usage" or something --
> they did not realize that was a *virtue*. The ?c would be a bit longer
> to do but probably not much. Then you can compile all Plan 9 code on
> Unix-like systems to target Plan 9.
>
> That may not be what you meant.
>
> ron
>
>


Actually it was the complete opposite that I wanted :)
The aim I had was basically to compile legacy lunix applications for
Plan9 on a lunix host. For hobby development such a cross compiler +
9vx could be a really nice environment to cut your teeth on while
figuring out the right way to do things.

I have been playing with trying to compile some legacy lunix
applications under APE with or without the old gcc (anyone else
experience a crashed 9vx when you try to use gcc?). Often stuff fail
due to configure scripts expecting GNU sed, autoconf etc (the gmake
port works nicely!)... I guess the "right" way would be to try to dig
through what they want to do and make a real mk file to compile it
instead, but I hoped for a lazier approach ;)

So what I was thinking (perhaps naively) was first to "just" compile
the ported gcc/binutils (/n/sources/extra/gcc) (which should have all
the executeable information for Plan9 in it) + the GCC-ified APE libs
on Linux as a cross compiler for Plan9 (and thus NOT have to worry
about porting all of GNU to APE first...).

After trying to learn about cross compilers I saw this thing about
newlib, where it seems like you can make a cross compiler suspiciously
easily [1, 2]. But as I said previously. I am a complete noob on this
and unfortunately very limited time to actually make it work, but if
someone got something similar done before (I suppose the initial GCC
port was cross compiled from a lunix host of some kind?), it would be
interesting to get it working (and preferrably on an "as modern"
version of GCC as possible).

[1] http://wiki.osdev.org/Porting_Newlib
[2] http://wiki.osdev.org/Boomstick



  reply	other threads:[~2011-09-19 16:37 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-14 21:43 s s
2011-09-14 21:46 ` Francisco J Ballesteros
2011-09-14 21:46   ` Francisco J Ballesteros
2011-09-14 21:48     ` s s
2011-09-14 21:52     ` s s
2011-09-14 21:50 ` hiro
2011-09-14 21:55   ` s s
2011-09-14 21:57     ` John Floren
2011-09-14 22:13       ` L N
2011-09-14 22:17         ` ron minnich
2011-09-14 22:41           ` L N
2011-09-14 22:54             ` John Floren
2011-09-14 23:14               ` Francisco J Ballesteros
2011-09-14 23:19               ` L N
2011-09-14 23:30                 ` hiro
2011-09-14 23:33                   ` ron minnich
2011-09-14 23:43                     ` Akshat Kumar
2011-09-14 23:45                       ` hiro
2011-09-15  0:39                     ` L N
2011-09-14 23:32                 ` ron minnich
2011-09-14 23:43                 ` Nick LaForge
2011-09-15  9:40               ` dexen deVries
2011-09-16  0:02             ` Ethan Grammatikidis
2011-09-16  0:15               ` ron minnich
2011-09-16  0:31                 ` [9fans] my kingdom for a web browser :-P Lyndon Nerenberg
2011-09-16  0:41                   ` ron minnich
2011-09-16  0:53                     ` Lyndon Nerenberg
2011-09-16  1:21                   ` erik quanstrom
2011-09-16  2:13                     ` Bruce Ellis
2011-09-16  2:46                       ` Lyndon Nerenberg
2011-09-16  3:58                         ` Bruce Ellis
2011-09-16 14:52                       ` Ethan Grammatikidis
2011-09-16  5:53                   ` Anthony Sorace
2011-09-16 10:11                   ` Aram Hăvărneanu
2011-09-16 14:56                     ` Ethan Grammatikidis
2011-09-16 15:17                       ` tlaronde
2011-09-16 17:36                         ` Bruce Ellis
2011-09-18  5:39                         ` stephano zanzin
2011-09-16 11:28                   ` Steve Simon
2011-09-16 14:43                   ` Ethan Grammatikidis
2011-09-16  3:46                 ` [9fans] Nemo book Jens Staal
2011-09-16  9:07                   ` yy
2011-09-19 15:43                   ` ron minnich
2011-09-19 16:37                     ` Jens Staal [this message]
2011-09-19 17:50                       ` Charles Forsyth
2011-09-19 18:10                         ` tlaronde
2011-09-19 18:21                           ` erik quanstrom
2011-09-19 20:32                     ` Richard Miller
2011-09-20  3:20                       ` Jens Staal
2011-09-20 10:07                         ` Richard Miller
2011-09-16 11:15                 ` Steve Simon
     [not found]               ` <CAP6exYK+8TbaceUcfTAnuWruxahHvMmSgqGHKpH7jcZME=C5ww@mail.gmail.c>
2011-09-16  0:18                 ` erik quanstrom
2011-09-16  4:52               ` L N
2011-09-16  7:21                 ` David du Colombier
2011-09-16  7:28                   ` cinap_lenrek
2011-09-16  8:33                   ` Richard Miller
2011-09-14 23:27           ` Jeff Sickel
2011-09-14 23:55             ` Rob Pike
2011-09-14 22:27     ` hiro
2011-09-14 21:58   ` s s
  -- strict thread matches above, loose matches on Subject: below --
2009-08-17 15:20 [9fans] nemo book Benjamin Huntsman
2009-08-17 16:07 ` John Floren
2009-08-17 20:52 ` Steve Simon
2009-08-17 21:01   ` Benjamin Huntsman
2009-08-17 21:20     ` John Floren

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=CAK8RtFpWn1RB-j5v_5yrXKNQULTU3S11nSs4a3WC7LmwmJ8q-g@mail.gmail.com \
    --to=staal1978@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).