Operating System - Linux
1753834 Members
7888 Online
108806 Solutions
New Discussion юеВ

How to compile with gcc for pa1.1 32bits

 
SOLVED
Go to solution
Jean-Guy GROSSE
Advisor

How to compile with gcc for pa1.1 32bits

I installed gcc on 64bits hpuxmachine (11.11)
I would like compile sudo for pa1.1 machine.

I tried to run with CFLAGS =-mpa-risc-1-1 but it doesn't work , I always have PA2.0 *.o and pa2.0 program :

/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (check.o) was detected. The linked output may not run on a PA 1.x system.


I use gcc 3.4.4. and for configure : --build=hppa1.1-hp-hpux11.0

Thanks for your help.
Jgg.
10 REPLIES 10
Arunvijai_4
Honored Contributor

Re: How to compile with gcc for pa1.1 32bits

You have to export CFLAGS and CPPFLAGS before configuring Sudo. Just do the following,

# export CFLAGS="-mpa-risc-1-1"
# export CPPFLAGS="-mpa-risc-1-1"
# gmake clean
# gmake distclean
# ./configure --

Or you can download Internet Express Sudo, it has got PA-RISC 1.1 binaries..
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1111

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Piergiacomo Perini
Trusted Contributor

Re: How to compile with gcc for pa1.1 32bits

hi Jean-Guy,
i don't know much about this
argument...but try also adding
+DAportable
to CFLAGS.

Regards
H.Merijn Brand (procura
Honored Contributor
Solution

Re: How to compile with gcc for pa1.1 32bits

+DAportable is a HP C-ANSI-C option, and will not be recognized by GNU gcc

-mpa-risc-1-1 is not a wise idea for a 64bit compiler, since it can only produce 64bit objects on pa-risc, and that won't run on pa-risc-1.1 anyway

If you still want to compile for 1.1 on 11.11, you either use/install GNU gcc/32 and use -mpa-risc-1-1, or use HP C-ANSI-C with +DAportable

Easier probably is to
- get a precompiled 1.1 port of the desired target from the internet or one of the kind members of this forum
- install gcc on the target and compile it there

Proof of concept:
r3:/tmp 102 > ux
r3 HP-UX 11.11/64 U 9000/800/rp3410/64 PA8800/800(2) pa-2.0 4094 Mb
r3:/tmp 103 > cat xx.c
int main(){return(0);}
r3:/tmp 104 > gcc -o xx xx.c
r3:/tmp 105 > file xx
xx: PA-RISC1.1 shared executable dynamically linked -not stripped
r3:/tmp 106 > gcc64 -o xx xx.c
r3:/tmp 107 > file xx
xx: ELF-64 executable object file - PA-RISC 2.0 (LP64)
r3:/tmp 108 > gcc -mpa-risc-2-0 -o xx xx.c
r3:/tmp 109 > file xx
xx: PA-RISC2.0 shared executable dynamically linked -not stripped
r3:/tmp 110 > gcc64 -mpa-risc-1-1 -o xx xx.c
r3:/tmp 111 > file xx
xx: ELF-64 executable object file - PA-RISC 2.0 (LP64)
r3:/tmp 112 > gcc --version
gcc (GCC) 3.4.4
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

r3:/tmp 113 >
-->8---
Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Piergiacomo Perini
Trusted Contributor

Re: How to compile with gcc for pa1.1 32bits

thanx Procura !!in effect we use it
for "aCC".

forgive me !!!

bye
Arunvijai_4
Honored Contributor

Re: How to compile with gcc for pa1.1 32bits

You can download GCC 32 bit from
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,547,00.html

or GCC 4.0.2 from

http://hpux.connect.org.uk/hppd/hpux/Gnu/gcc-4.0.2/

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
H.Merijn Brand (procura
Honored Contributor

Re: How to compile with gcc for pa1.1 32bits

... or from my site of course :)

I'd advice strongly *against* 4.0.x if you are going to use the 64bit version. I still run into trouble (real hard to trace) when building perl.

GNU gcc-3.4.4 is very stable

My HP ITRC site pages can be found at (please use LA as primary choice):

USA Los Angeles http://mirrors.develooper.com/hpux/
SGP Singapore https://www.beepz.com/personal/merijn/
USA Chicago http://ww.hpux.ws/merijn/
NL Hoofddorp http://www.cmve.net/~merijn/

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Jean-Guy GROSSE
Advisor

Re: How to compile with gcc for pa1.1 32bits

Thanks a lot for your anwser,

I tested the HP version of gcc with 2 compilers ( 32 and 64 ) but they didn't work.

So finaly I installed a 3.4.4 on pa.1.1 machine, and it's ok.

Tom Schroll
Frequent Advisor

Re: How to compile with gcc for pa1.1 32bits


Not compiler related, BUT I do have a "sudo-1.6.7p5" depot for 11.0 laying around. This was from the Software Porting and Archiving Center.

In fact, over the past 3-4 years, I have archived all of the software from that site for 11.0. I have 1.7GB of older and newer versions of software for 11.0. Now that they are desupporting 11.0, this stuff is gold. Let me know if you want me to send you the sudo package.

Also, anyone else on the forum, if you see something disappear from the Porting site for 11.0, and need it, let me know. I bet I still have it laying around. I burned a backup on CD and have it at home, so I'll pretty much have this older 11.0 stuff forever.

-- Tom
If it ain't broke, it needs optimized.
Steve Ellcey
Valued Contributor

Re: How to compile with gcc for pa1.1 32bits

Can you tell me anything about what problems you had using GCC 4.0.*? I do some work on GCC and would be interested in looking at any GCC errors you found. Feel free to reply here or send me email directly (sje cup.hp.com)