On Mon, 2 Mar 2009, Daniel Ruoso wrote:
Em Seg, 2009-03-02 às 17:04 +1100, Timothy S. Nelson escreveu:
Hi. I note that we have $?OS, $?VM, and $?DISTRO (and their $*
counterparts). I'd like to recommend that we eliminate $?OS, and replace it
with $?KERNEL (ie. Linux) and maybe $?ARCH (ie. i386). Thoughts?
The usual way to handle this is by something called "arch triplet", as
you can find out if you call
gcc -dumpmachine
This triplet is formed by the "Instruction Set" (usually called CPU),
the "Platform" ("pc" for most people) and the "Operating
System" ("linux-gnu" in my case, while the "-gnu" specifies that you're
using the gnu libc). (gcc omits the "pc" part, usually).
I got i386-redhat-linux, so that works for me.
So, I think the proper name to the variables would be
$?ARCH and $*ARCH
Where they would stringify to the arch triplet, while providing
convenience methods for .cpu, .platform and .os.
Hmm. But we want versions for Platform and OS as well.
But thinking about it, I wonder if we shouldn't have actually two
compile-time variables, which are HOST_ARCH and TARGET_ARCH so cross
compiling is possible, or at least make $?ARCH to mean TARGET_ARCH while
still providing $?HOST_ARCH, and since we're talking about compiling
Perl code, we should probably have $?HOST_PERL and $?TARGET_PERL as
well..
Are we talking about $?VM vs. $?XVM here?
:)
---------------------------------------------------------------------
| Name: Tim Nelson | Because the Creator is, |
| E-mail: wayl...@wayland.id.au | I am |
---------------------------------------------------------------------
----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V-
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----