1753787 Members
7517 Online
108799 Solutions
New Discussion юеВ

compiler problems

 
SOLVED
Go to solution
Michael T. Harding
Occasional Advisor

compiler problems

I have a c program that needs to be recompiled at a higher risc level. I have the source file and root access to the higher RISC system, however have no idea how to recompile it!! HELP!!
9 REPLIES 9
Olav Baadsvik
Esteemed Contributor

Re: compiler problems



Hi,

Assuming you are using one of the HP-compilers
the option used to specify a particular
PARISC-version is +DA
Ex:
+DA1.1 for PARISC.1.1
+DA2.0 for PARISC2.0
+DA2.0W (gives 64-bit code)

By default the compilers compiles for the
same PARISC version the compiling machine has.

Also note that you do not have to compile
on a PARISC2.0 machine in order to generate
code for PARISC2.0

See the man-page for the compiler for
more info

Regards
Olav
H.Merijn Brand (procura
Honored Contributor

Re: compiler problems

I don't think you can generate 2.0 or 2.0w on 1.1

HPc vs. GNU gcc (available as of 3.0.4)

+DA1.1 -> -pa-risc-1-1
+DA2.0 -> -pa-risc-2-0
+DA2.0w -> need the 64bit version of the compiler. No specific option

+DA1.1 is a bad choice to begin with. *IF* you are doing this to be backward compatible, use +DAportable instead
Enjoy, Have FUN! H.Merijn
Michael T. Harding
Occasional Advisor

Re: compiler problems

Thanks guys... only one problem... I have never compiled anything before so I don't know any of the commands?
Olav Baadsvik
Esteemed Contributor
Solution

Re: compiler problems


Hi,

For a simple c-program the command to
compile for PARISC2.0 would be:

cc -o progname +DA2.0 file.c

If the program consists of more than one
file, add these file after file.c

Note that the +DA2.0 option is not needed
if you compile on a PARISC2.0 machine.
If you compile on a parisc1.1 manchine you
MUST use +DA2.0

Olav
H.Merijn Brand (procura
Honored Contributor

Re: compiler problems

:)

And for gcc equivalent:

# gcc -o xx xx.c
# ./xx
Enjoy, Have FUN! H.Merijn
Michael T. Harding
Occasional Advisor

Re: compiler problems

Guys,

Manny thnaks for your help... I've managed to do that. I have compiled it with the lower 1.1 RISC level as on the box the script originally failed on... however the script still fails due to incompatible hardware!?!?
Olav Baadsvik
Esteemed Contributor

Re: compiler problems



Hi,

What is the output of the command:

file

and what is the exact error-message you get.

Olav
Michael T. Harding
Occasional Advisor

Re: compiler problems

Ignore me it's worked many many thnak both of you! Incedently what advantages and drawbacks would I get if I loaded the gnu compiler?
H.Merijn Brand (procura
Honored Contributor

Re: compiler problems

Advantages gcc over HPc:
?? it's free
?? it has great warnings (realy)
?? it compiles GNU stuff without a wink
?? it is *very* indulgent, and supports more features than HPC

Advantage HPc over gcc:
?? it's objects are faster (avarage 26% with what we use here on HP-UX 11.00 2.0)
?? you get HP support
?? it fits better to the PA-RISC architecture
Enjoy, Have FUN! H.Merijn