Article View: gnu.gcc.help
Article #54192ackkk! GCC, GAS, and GDB on HPUX v7
From: Edwards John Andrew
Date: Wed, 09 Jan 1991 16:59
Date: Wed, 09 Jan 1991 16:59
92 lines
4129 bytes
4129 bytes
HELP! I AM BEING HELP PRISONER BY THE HPUX OPERATING SYSTEM!
Here's the story...
I wanted to install gcc on this HPUX v7 system because: a) I
heard it is a very good (and efficient) compiler, b) gcc is
"fully" ANSI compatable (even more so that the ANSI standard
is...if you know what I mean), and c) I've always thought
educational institutions were perfect places to have GNU software
installed.
So there I was, getting ready to teach a senior-level compilers
class and wanting to use gcc. The textbook ("Compiler Design in
C", by A. Holub) looked to be an excelent text for the class.
The software for the text, basically a compiler compiler, was
originally designed for PC's (Microsoft C) and was written with a
mix of the ANSI and oldK&R flavors of C. Moreover, while the
code for the software was made close enough to compile and work
on our system, much of the support code was still more ANSI than
not. Anyway, the decision was made to start over and use GCC
instead.
The point is that I installed GCC on our HPUX system, and that
went VERY smoothly. I compiled all of the code for the software;
after a little patching up (mostly fixing prototypes), it worked
quite well (better than the HPCC version).
But, alas, we really should have a debugger along with the
compiler, and everyone KNOWS that HPUX need GAS to make a
debugger, GDB, available (it seems that GCC and the HP debugger,
XDB, are ioncompatable).... So, ...
I thought I should install GAS. This has proved to be a
nightmare! I ftp'ed gas-1.37 from prep.ai.mit.edu and set out to
compile just as I had originally for GCC (version 1.37.1). To my
surprise, there was precious little documentation on how to
install the package (unlike GCC, which was very well documented).
I thought there would at least be a texinfo file. Undaunted, I
followed the instructions, and proceeded to get to work,
compiling with the GCC I had.
One problem was with the write.c stuff, which I assume was due to
the fact that we have hp9000s300, and the write.c has some sort
of conditional based on it being hp9000s200. I guess the a.out
headers changed a little with the new system. What it meant was
that the EXEC_MACHINE_TYPE was no longer define'd, so one line
was gone. But I don't think that's the problem.
As an example, here is my test case.
% cat foo.c
main(){
int i;
i += 1;
}
% gcc -S foo.c
% cat foo.s
text
lalign 2
global _main
_main:
link.w %a6,&-4
addq.l &1,-4(%fp)
L1:
unlk %a6
rts
% a68 foo.s
foo.s:1:"Unknown operator" -- Statement 'text' ignored
foo.s:2:"Unknown operator" -- Statement 'lalign 2' ignored
foo.s:3:"Unknown operator" -- Statement 'global _main' ignored
foo.s:5:"Unknown operator" -- Statement 'link.w %a6,&-4' ignored
foo.s:6:"Unknown operator" -- Statement 'addq.l &1,-4(%fp)' ignored
foo.s:8:"instruction/operands mismatch" -- Statement 'unlk %a6' ignored
Has anyone else seen this problem? Have I made some incorrect
assumptions while compiling? Can I use GDB without compiling
GAS?
Please direct replies to me via e-mail. I am in a bit of a
pickle, so any help would be greatly appreciated.
Thanks in advance,
Andy.
--
Andy Edwards * Computer Science Dept. * Iowa State University * Ames, IA 50011
INTERNET: jae@iastate.edu PHONE: (515) 294-4377
------------------------------------------------------------------------------
Technical Details
Message-ID:
<jae.663440395@pv031e.vincent.iastate.edu>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!samsung!umich!sharkey!news.iastate.edu!jaeShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,752dce1e5f1182fd,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1991-01-09 22:42:01 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!samsung!umich!sharkey!news.iastate.edu!jae From: jae@iastate.edu (Edwards John Andrew) Newsgroups: gnu.gcc.help Subject: ackkk! GCC, GAS, and GDB on HPUX v7 Message-ID: <jae.663440395@pv031e.vincent.iastate.edu> Date: 9 Jan 91 16:59:55 GMT Sender: news@news.iastate.edu (USENET News System) Organization: Iowa State University, Ames IA Lines: 92