chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] config-arch.sh: shouldn't use uname


From: Peter Bex
Subject: Re: [Chicken-hackers] config-arch.sh: shouldn't use uname
Date: Thu, 10 Jan 2008 09:29:23 +0100
User-agent: Mutt/1.4.2.3i

On Thu, Jan 10, 2008 at 12:51:05PM +0600, Ivan Shmakov wrote:
>       Currently, config-arch.sh uses `uname' to obtain the hardware
>       architecture.

It uses uname -m (machine architecture).  Maybe it should be using
uname -p (processor).  For instance, on Linux amd64 is called x86_64,
and ppc is called powerpc, while on NetBSD amd64 is amd64 and ppc can
be macppc or ofppc.  But on all these OSes uname -p (should) return(s)
x86_64 and (I'd have to check if this is correct) powerpc.

>       However, it probably makes more sense to use the
>       architecture the current build environment produces binaries
>       for.  May `gcc -dumpmachine' be considered instead of `uname'?

I think this opens the door to cross-compilation, and that's definititely
an interesting thing to have.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth

Attachment: pgpQZJlxLFZP7.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]