Sample directory structure
Sat Sep 5 10:01:00 GMT 1998

In a message dated 9/5/98 12:54:53 AM Pacific Daylight Time,

I'm answering because I may have blundered through this more recently than the
experts who read this mail list.

>  1.  All I have on this machine is HP's default C compiler, not the 
>  "optional" ANSI one.  Is this even going to work?
This should work, if you have an up to date hpux10.20.  It will build gnu make
without problems, so do that first.  I'm not sure whether it will build
binutils; it's probably safer to build gcc without gnu-as and use that to
build binutils.  I expect you will have a problem with configure due to it
seeing enough lex libraries to assume that lex is installed.  This may be
corrected by installing bison and flex, or by a complete lex installation.  On
some OS's, I've needed to go around again, rebuilding make after binutils are
installed, but hpux seems less demanding than that.

autoconf  won't work with HP m4.  You must install gnu m4 first, and, when
configuring and installing any packages which use m4, set the appropriate
environment variable (e.g. DEFAULT_M4) to point to gnu m4.  You shouldn't need
this until you have used patch.

HP patch won't work with gnu or egcs.  Install gnu patch.

HP tar won't accept input from gunzip; you must make an unzipped copy of each
tarball and untar it.

The original hpux10 sed was broken; this can be cured with HP patches or with
gnu sed.  As others pointed out, the patch info on the web page has been
allowed to become out-dated.

" I DO NOT have write 
access to the usual installation directories; all I have is a directory 
that I'll call /ecad.  Under /ecad we have a contrib directory with the 
usual subdirectories (bin, include, lib, etc) where we've been putting 
"user-installed" tools."

egcs should work when installed in your contrib directory.  Normal hpux has
general access to /usr/local by default, so I've tended to use that.  

"how to set up the src, build, and install directories for 
both egcs and binutils"

In order to test various compiler versions using a single installation of
binutils (it eats up disk), I followed a suggestion I got from this forum, and
installed binutils in its own directory.  The various sub-directories of the
binutils installation have to have all their contents sym-linked into the
appropriate places in the directory where you are intending to install each
version of egcs in order to build --with-gnu-as.

"on-line docs talk about "make bootstrap" 
automatically building binutils if they've been "properly installed in 
the egcs source tree", but they don't say what this means."

In theory, you might be able to sym-link the appropriate parts of the binutils
source directory into your egcs source directory and configure and build all
at once.  This scheme works well with the egcs version of dejagnu, but I don't
care to try this for binutils.  

"where to 
untar egcs and binutils,"

in the directory where you want their top source code directory to appear.

"proper place(s) 
to run the configure scripts (and the proper options)"

For make, you run ./configure in the make source code directory, with --prefix
set to the directory above the installation bin directory e.g. './configure
--prefix=/ecad/contrib'  then do 'make' and './make install'.

Other packages work with the recommended procedure, where you make a build
directory of your choice in the top source directory, and run ../configure
from there.

For egcs, when you are ready for it, you add --with-gnu-as to the configure
line, and run '/ecad/contrib/bin/make bootstrap' or '....make bootstrap-lean',
where the latter automatically removes files which won't be used again.

" 2.  Are the libraries and .o files generated by egcs at all compatible 
with the ones generated with HP's C compiler?  I have a 3rd-party 
program that will dynamically link in user-written code, and I was 
wondering if I could use it with code compiled with egcs."

I expect this would require you to leave out the --with-gnu-as option, so you
wouldn't be able to use gdb.  Get the vendor to let you use a gnu-compatible

At the risk of annoying the experts, I've used up more than my share of space,
as I agree with you that more detail on the installation web page would be

More information about the Gcc mailing list