Article View: gnu.gcc.help
Article #41691Re: build gcc 2.7.2 with gas problem on HP-UX 9.05
From: David D Kilzer
Date: Sun, 25 Feb 1996 00:00
Date: Sun, 25 Feb 1996 00:00
95 lines
4066 bytes
4066 bytes
lew@omocha.tay.dec.com (Paul Lew) writes:
>I built gcc-2.7.2 on my HP-UX 9.05 system (without gas) successfuly
>but I need debugging information so I rebuilt it with gas but failed.
>I did the following steps:
>(1) built and installed GAS (from binutils-2.6) in /usr/local/bin/as
>(2) build the target directory tree:
> $ make install-dir
>(3) setup a symbolic link:
> $ ln -s /usr/local/bin/as
> /usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.05/2.7.2/as
I believe the recommended procedure is to make a soft link of as into
your gcc-2.7.2 build directory. However, I've found that the BEST thing
to do is make SURE that the default ``as'' in your $PATH environment
variable is GNU as. I.e. when you do a ``which as'' that the GNU as
comes up. Make clean, change your $PATH, then rebuild.
Once gcc-2.7.2 is built, it will be able to find GNU as, but until then
it's best to cover all bases.
Note: This may *not* solve the problem you had below. Please read
below....
>(4) run configure:
> $ ./configure --with-gnu-as
> This appears to be a hppa1.1-hp-hpux9.05 system.
> Using `./config/pa/pa.c' to output insns.
> Using `./config/pa/pa.md' as machine description file.
> Using `./config/pa/pa1-ghpux9.h' as target machine macro file.
> Using `./config/pa/xm-pahpux.h' as host machine macro file.
> Merged pa/x-pa-hpux.
> Merged pa/t-pa.
> Merged c++ fragment(s).
> Created `./Makefile'.
> Merged pa/x-pa-hpux.
> Merged pa/t-pa.
> Created `cp/Makefile'.
> Links are now set up to build a native compiler for
> hppa1.1-hp-hpux9.05.
>(5) run make:
> $ make LANGUAGES=c
> <message deleted>
> mv tmplibgcc.a libgcc.a
> ./xgcc -B./ -DIN_GCC -g -I./include enquire.o -o enquire
> collect2: ld returned 1 exit status
> /bin/ld: ./libgcc.a(
> __main.o): Not a valid object file (invalid system id)
> make: *** [enquire] Error 1
>Can anyone built this before give me some pointers? Thanks in
>advance...
I had this happen to me a while back when compiling gcc-2.6.3 for our
HP 400s. I *think* what this is saying is that /bin/ld doesn't
recognize something xgcc is trying to feed to it. This is because:
1. The wrong ``as'' was used sometime during compilation. (See above
for fix.)
or
2. You need to compile GNU ld on your system as well. (I know the
docs say you don't have to, but sometimes it's just easier to use
it anyway.)
To fix the problem, either:
1. Reset your $PATH environment variable and ln -s /usr/local/bin/as
to the gcc-2.7.2/ build directory, make clean, then make
LANGUAGES=c.
or
2. Remove ALL traces of the binutils and gcc-2.7.2 packages that were
installed on the system (i.e. outside the source directories).
Start over with binutils and build both GNU as and GNU ld.
Soft-link both into your gcc-2.7.2 build directory. Make sure both
GNU as and GNU ld appear first in your $PATH. Configure
--with-gnu-as and --with-gnu-ld, then make gcc-2.7.2.
If that didn't work, then you either didn't get all the binutils
and gcc-2.7.2 stuff off first, or something bigger is wrong. :^)
Good luck!
I've compiled gcc so many times I've lost track.
Dave
--
David D. Kilzer \ ``My goal is to carry the Macintosh torch and
ddkilzer@iastate.edu / save computer users from the Gates of Hell.''
Computer Engineer 5 \
Iowa State University, Ames / Guy Kawasaki, Apple Fellow
Technical Details
Message-ID:
<ddkilzer.825284447@tbp.eng.iastate.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<gh3f86m4ne.fsf@omocha.tay.dec.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,cd94b824f603bb9e X-Google-Attributes: gid11318c,public X-Google-Thread: fcda7,cd94b824f603bb9e X-Google-Attributes: gidfcda7,public From: ddkilzer@iastate.edu (David D Kilzer) Subject: Re: build gcc 2.7.2 with gas problem on HP-UX 9.05 Date: 1996/02/25 Message-ID: <ddkilzer.825284447@tbp.eng.iastate.edu> X-Deja-AN: 141113208 references: <gh3f86m4ne.fsf@omocha.tay.dec.com> organization: Iowa State University, Ames, Iowa newsgroups: gnu.gcc.help,comp.sys.hp.hpux