How to determine if PA-RISC or Itanium?

  • Follow


I was looking to find the right compiler options to build a 64-bit
binary. My aim is to improve the portability of Sage

http://www.sagemath.org/

get rid of as many GNUisms as possible, and at least give some sort of
framework that will ensure other that try to build Sage on other
platforms wont be stuck quite as quickly.

I've written some scripts which determine if the compiler is gcc or
HP's. Next I want to find the options to add for 64-bit support. It
would appear that on any half-modern PA-RISC machine, +DA2.0W will do
the trick. But I believe on Iitanium something else is needed.

Can anyone show me in a shell script how I can tell if a system is PA-
RISC or Itanium? The '-p' p[topm to 'uname' is something that works on
a lot of systems, though it is not POSIX.

uname: illegal option -- p
usage: uname [-amnrsvil] [-S nodename]

My own machine is PA-RISC, but I'd like to know how to determine that
in general.

dave
0
Reply David 1/1/2010 5:01:50 PM

David Kirkby wrote:
> I was looking to find the right compiler options to build a 64-bit
> binary. My aim is to improve the portability of Sage
> 
> http://www.sagemath.org/
> 
> get rid of as many GNUisms as possible, and at least give some sort of
> framework that will ensure other that try to build Sage on other
> platforms wont be stuck quite as quickly.
> 
> I've written some scripts which determine if the compiler is gcc or
> HP's. Next I want to find the options to add for 64-bit support. It
> would appear that on any half-modern PA-RISC machine, +DA2.0W will do
> the trick. But I believe on Iitanium something else is needed.

+DD64 should work for both IPF and any half-modern PA system.

> 
> Can anyone show me in a shell script how I can tell if a system is PA-
> RISC or Itanium? The '-p' p[topm to 'uname' is something that works on
> a lot of systems, though it is not POSIX.

uname -m (man uname relates that this is "machine hardware/model").
IPF is always ia64, PA will be something else [8000, 9000, etc.]

But I'd just use +DD64 and be done with it.

> 
> uname: illegal option -- p
> usage: uname [-amnrsvil] [-S nodename]
> 
> My own machine is PA-RISC, but I'd like to know how to determine that
> in general.

Don
-- 
kernel, n:
A part of an operating system that preserves the medieval traditions
of sorcery and black art.
0
Reply Don 1/4/2010 3:18:13 PM


David Kirkby <drkirkby@gmail.com> writes:

> I was looking to find the right compiler options to build a 64-bit
> binary. My aim is to improve the portability of Sage
>
> http://www.sagemath.org/
>
> get rid of as many GNUisms as possible, and at least give some sort of
> framework that will ensure other that try to build Sage on other
> platforms wont be stuck quite as quickly.

When talking about gcc: Did you ever try "-ansi"? That should disable
all those extensions. OKI, who is building an ANSI conformant compiler
these days? ;-)

>
> I've written some scripts which determine if the compiler is gcc or
> HP's. Next I want to find the options to add for 64-bit support. It
> would appear that on any half-modern PA-RISC machine, +DA2.0W will do
> the trick. But I believe on Iitanium something else is needed.
>
> Can anyone show me in a shell script how I can tell if a system is PA-
> RISC or Itanium? The '-p' p[topm to 'uname' is something that works on
> a lot of systems, though it is not POSIX.

In old UNIX days the utility was named "arch". In HP-UX "uname -m" might
do what you want.

Regards,
Ulrich


>
> uname: illegal option -- p
> usage: uname [-amnrsvil] [-S nodename]
>
> My own machine is PA-RISC, but I'd like to know how to determine that
> in general.
>
> dave
0
Reply Ulrich 1/13/2010 9:49:09 AM

David Kirkby a =E9crit :
> I was looking to find the right compiler options to build a 64-bit
> binary.
> snip <
> I've written some scripts which determine if the compiler is gcc or
> HP's. Next I want to find the options to add for 64-bit support. It
> would appear that on any half-modern PA-RISC machine, +DA2.0W will do
> the trick. But I believe on Iitanium something else is needed.
> snip <
> My own machine is PA-RISC, but I'd like to know how to determine that
> in general.

Hi,

http://sysdigg.blogspot.com/2007/12/how-to-check-cpu-in-hp-ux-from-comman=
d.html
http://www.tek-tips.com/viewthread.cfm?qid=3D795298&page=3D10
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=3D7=
9195
http://www.unixguide.net/scripts/stats170
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=3D9=
58532
http://unix.derkeiler.com/Mailing-Lists/HP-UX-Admin/2003-04/0003.html
http://www.openpa.net/pa-risc_processors.html#table
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=3D2=
1381
http://archives.devshed.com/forums/unix-106/hpux-devtools-default-to-32-b=
it-or-64-bit-binaries-onia-64t-1527754.html

in short :

egrep -i $(model | awk -F/ '{print $NF}') /usr/sam/lib/mo/sched.models
getconf KERNEL_BITS
getconf HW_CPU_SUPP_BITS
getconf CPU_VERSION
getconf CPU_CHIP_TYPE (>=3D 11i)
if >=3D 532 && <=3D 767 pa2
if >=3D 768 itanium
(see sys/unistd.h for details, /CPU_IS_PA_RISC)
print_manifest from ignite
echo "selclass qualifier cpu;info;wait;infolog"|cstm
tail /var/tombstones/ts90 !

Regards,

Cyrille Lefevre.
--=20
mailto:Cyrille.Lefevre-news%nospam@laposte.net.invalid
supprimer "%nospam% et ".invalid" pour me repondre.

0
Reply Cyrille 2/18/2010 3:13:39 AM

3 Replies
3535 Views

(page loaded in 0.047 seconds)

Similiar Articles:













7/20/2012 3:55:48 AM


Reply: