On 14/12/06, Erik de Castro Lopo <[EMAIL PROTECTED]> wrote:

Penedo wrote:

> And still - is there a good way to find out the exact cpu information in
a
> useful way for a script? Something a-la the script used by gcc's source
code
> to automatically decide which architecture it should build for? (it's
been
> ages since I last built GCC so maybe it's different now).

Why not just open /proc/cpuinfo and parse the data there. Use
"cat /proc/cpuinfo" to see whats there.


Yes of course, but this won't give a concise string a-la "x86-32bit-amd" or
some such without lots of mungling of the content and inventing a "language"
for the format. I was wondering whether something, hopefully resembling a
standard, was already done about this.

Solaris has some programs to identify the exact Sparc CPU it's running on
> and list the most suitable architecture to use in order of descending
> priority, (maybe it's called "hinv"?) something like this for linux
would be
> great.

Solaris needed that because Solaris' /proc/ file system contains
mostly (all?) binary data.


Actually from looking at a Solaris 9 right now,  /proc only lists processes
and nothing else.

And the commands I was refering to are:

# isainfo
sparcv9 sparc
# isainfo -v
64-bit sparcv9 applications
32-bit sparc applications
# isalist
sparcv9+vis2 sparcv9+vis sparcv9 sparcv8plus+vis sparcv8plus sparcv8
sparcv8-fsmuld sparcv7 sparc

Cheers,

--P
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to