9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Re: Cross-platform
@ 2001-01-01 19:07 Russ Cox
  2001-01-01 21:53 ` William K. Josephson
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Russ Cox @ 2001-01-01 19:07 UTC (permalink / raw)
  To: 9fans

> the 386 c compiler doesn't run on linux (although it
> wouldn't be very hard to make it do so).

on a partially related note, i have 8c
producing linux binaries, and i've ported
enough of libc that it can compile, under linux,
linux versions of 8c, 8l, 8a, ar, and sed.

the scripts that do everything require
byron rakitzis's rc and the inferno mk,
but it'd be nice to do without them.
rfork(RFMEM) is the sticking point, if i
remember correctly.

if anyone wants to play with this,
let me know.

russ


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] Re: Cross-platform
  2001-01-01 19:07 [9fans] Re: Cross-platform Russ Cox
@ 2001-01-01 21:53 ` William K. Josephson
  2001-01-01 21:59 ` William K. Josephson
  2001-01-02 17:51 ` Randolph Fritz
  2 siblings, 0 replies; 7+ messages in thread
From: William K. Josephson @ 2001-01-01 21:53 UTC (permalink / raw)
  To: 9fans

On Mon, Jan 01, 2001 at 02:07:59PM -0500, Russ Cox wrote:

> linux versions of 8c, 8l, 8a, ar, and sed.
> 
> the scripts that do everything require
> byron rakitzis's rc and the inferno mk,
> but it'd be nice to do without them.
> rfork(RFMEM) is the sticking point, if i
> remember correctly.
> 
> if anyone wants to play with this,
> let me know.

I have rc, mk, sed, awk, etc. (but not ar, 8c, 8l, or 8a) compiling
natively under {Free,Open,Net}BSD, Digital Unix, and Linux.  I haven't
used or tested them extensively yet and they do depend upon the ports
I've done of libc, libregex, libmp, libsec, etc.  I haven't applied
the last round of patches to libc and it still needs a decent dirread
implementation.  rfork emulation is also not what it might be, even
under FreeBSD.

 -WJ




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] Re: Cross-platform
  2001-01-01 19:07 [9fans] Re: Cross-platform Russ Cox
  2001-01-01 21:53 ` William K. Josephson
@ 2001-01-01 21:59 ` William K. Josephson
  2001-01-02 17:51 ` Randolph Fritz
  2 siblings, 0 replies; 7+ messages in thread
From: William K. Josephson @ 2001-01-01 21:59 UTC (permalink / raw)
  To: 9fans

On Mon, Jan 01, 2001 at 02:07:59PM -0500, Russ Cox wrote:

> rfork(RFMEM) is the sticking point, if i
> remember correctly.

For rfork() specifically I've got code sitting around somewhere from a
thread library I wrote one weekend last year that implements most of
the applicable semantics under FreeBSD and Linux (i.e. stack splitting
and those flags that have a corresponding notion under Unix).  I
believe I have some Solaris code somewhere as well.  In the case of
DEC, one is better off implementing everything on top of Posix
threads, IIRC.

 -WJ


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] Re: Cross-platform
  2001-01-01 19:07 [9fans] Re: Cross-platform Russ Cox
  2001-01-01 21:53 ` William K. Josephson
  2001-01-01 21:59 ` William K. Josephson
@ 2001-01-02 17:51 ` Randolph Fritz
  2001-01-02 21:52   ` William K. Josephson
  2 siblings, 1 reply; 7+ messages in thread
From: Randolph Fritz @ 2001-01-02 17:51 UTC (permalink / raw)
  To: 9fans

On Mon, 1 Jan 2001 19:33:05 GMT, Russ Cox <rsc@plan9.bell-labs.com> wrote:
>
>the scripts that do everything require
>byron rakitzis's rc and the inferno mk,
>but it'd be nice to do without them.
>rfork(RFMEM) is the sticking point, if i
>remember correctly.
>

Newer (2.2/libc2) Linux kernels support an __clone() system call,
which could be used, so far as I can tell, to implement most of
rfork().  Of course, one would also have to port any necessary
synchronization primitives.

Randolph


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] Re: Cross-platform
  2001-01-02 17:51 ` Randolph Fritz
@ 2001-01-02 21:52   ` William K. Josephson
  0 siblings, 0 replies; 7+ messages in thread
From: William K. Josephson @ 2001-01-02 21:52 UTC (permalink / raw)
  To: 9fans

On Tue, Jan 02, 2001 at 05:51:09PM +0000, Randolph Fritz wrote:
> On Mon, 1 Jan 2001 19:33:05 GMT, Russ Cox <rsc@plan9.bell-labs.com> wrote:
> >
> >the scripts that do everything require
> >byron rakitzis's rc and the inferno mk,
> >but it'd be nice to do without them.
> >rfork(RFMEM) is the sticking point, if i
> >remember correctly.
> >
> 
> Newer (2.2/libc2) Linux kernels support an __clone() system call,
> which could be used, so far as I can tell, to implement most of
> rfork().  Of course, one would also have to port any necessary
> synchronization primitives.

Yes.  You can't get all of the rfork() semantics with __clone(2), of
course, but as I said, I've already implemented what you can get -- it
is a straightforward hack.  The trouble is that the interface is a
kludge compared to fork as you'll need to futz with some inline
assembly to set up the stacks.  Although to a lesser extent, the same
is true of FreeBSD rfork(RFMEM) as, contrary to the manual page, rfork
fails to split the stack.  More annoying still, you have to do it for
each different Unix.  The documentation for kernel threads for DU aka
OSF/1 was virtually non-existant on a number of sites I use, for
instance.

 -WJ


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] Re: Cross-platform
@ 2001-01-01 19:57 presotto
  0 siblings, 0 replies; 7+ messages in thread
From: presotto @ 2001-01-01 19:57 UTC (permalink / raw)
  To: 9fans

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

SOme kind soul may lend you access to a cpu server to work from.

[-- Attachment #2: Type: message/rfc822, Size: 3786 bytes --]

From: "Bryan W. Headley" <bheadley@interaccess.com>
To: rob pike <rob@plan9.bell-labs.com>
Cc: 9fans@cse.psu.edu
Subject: [9fans] Re: Cross-platform
Date: Mon, 01 Jan 2001 12:49:27 -0600
Message-ID: <3A50D137.97FA3030@interaccess.com>

rob pike wrote:

> first, this is the sort of question for comp.os.plan9.
> that aside, gcc doesn't generate plan 9 binaries (yet) and
> the 386 c compiler doesn't run on linux (although it
> wouldn't be very hard to make it do so).
> on the other hand, to port drivers there's no reason
> to do either: copy the source to the appropriate place
> and get to work with the native compiler.
> publish the results and wait for gratitude to rain upon you.

Okay, but I only have the boot floppy to work from to do the final compile.
Probably not enough scratch space for rebuilding the kernel. This ought to be
fun :-)

>
>   ------------------------------------------------------------------------
>
> Subject: Cross-platform
> Date: Sun, 31 Dec 2000 13:05:31 -0600
> From: "Bryan W. Headley" <bheadley@interaccess.com>
> To: rob pike <rob@plan9.bell-labs.com>
> Newsgroups: comp.os.plan9
>
> Rob,
>
> Got a PC with different SCSI and ethernet than what's supported out of
> the box (Initio and pcnet32). It's an old AMD Linux box. Anyway, I have
> the plan9 CD, and could retrofit the Linux drivers to work with p9.
> Question is, is there a cross-platform building strategy? Do I have any
> business expecting gcc to make p9 binaries, or build the '386 C compiler
> to run on Linux?
>
> Just a newbie (it might be written down somewhere, but I haven't found
> it after an hour's search :-)
>
> --
> ____               .:.                 ____
> Bryan W. Headley - bheadley@interaccess.com

--
____               .:.                 ____
Bryan W. Headley - bheadley@interaccess.com



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [9fans] Re: Cross-platform
       [not found] <200101011841.f01IfIf01104@cactus.bheadley.org>
@ 2001-01-01 18:49 ` Bryan W. Headley
  0 siblings, 0 replies; 7+ messages in thread
From: Bryan W. Headley @ 2001-01-01 18:49 UTC (permalink / raw)
  To: rob pike; +Cc: 9fans

rob pike wrote:

> first, this is the sort of question for comp.os.plan9.
> that aside, gcc doesn't generate plan 9 binaries (yet) and
> the 386 c compiler doesn't run on linux (although it
> wouldn't be very hard to make it do so).
> on the other hand, to port drivers there's no reason
> to do either: copy the source to the appropriate place
> and get to work with the native compiler.
> publish the results and wait for gratitude to rain upon you.

Okay, but I only have the boot floppy to work from to do the final compile.
Probably not enough scratch space for rebuilding the kernel. This ought to be
fun :-)

>
>   ------------------------------------------------------------------------
>
> Subject: Cross-platform
> Date: Sun, 31 Dec 2000 13:05:31 -0600
> From: "Bryan W. Headley" <bheadley@interaccess.com>
> To: rob pike <rob@plan9.bell-labs.com>
> Newsgroups: comp.os.plan9
>
> Rob,
>
> Got a PC with different SCSI and ethernet than what's supported out of
> the box (Initio and pcnet32). It's an old AMD Linux box. Anyway, I have
> the plan9 CD, and could retrofit the Linux drivers to work with p9.
> Question is, is there a cross-platform building strategy? Do I have any
> business expecting gcc to make p9 binaries, or build the '386 C compiler
> to run on Linux?
>
> Just a newbie (it might be written down somewhere, but I haven't found
> it after an hour's search :-)
>
> --
> ____               .:.                 ____
> Bryan W. Headley - bheadley@interaccess.com

--
____               .:.                 ____
Bryan W. Headley - bheadley@interaccess.com



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-01-02 21:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-01 19:07 [9fans] Re: Cross-platform Russ Cox
2001-01-01 21:53 ` William K. Josephson
2001-01-01 21:59 ` William K. Josephson
2001-01-02 17:51 ` Randolph Fritz
2001-01-02 21:52   ` William K. Josephson
  -- strict thread matches above, loose matches on Subject: below --
2001-01-01 19:57 presotto
     [not found] <200101011841.f01IfIf01104@cactus.bheadley.org>
2001-01-01 18:49 ` Bryan W. Headley

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).