This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [Q] Configure: Choosing as on Solaris, --with-gnu-as, and--with-as
- To: Joe Buck <jbuck at synopsys dot COM>
- Subject: Re: [Q] Configure: Choosing as on Solaris, --with-gnu-as, and--with-as
- From: Wolfgang Bangerth <wolfgang dot bangerth at iwr dot uni-heidelberg dot de>
- Date: Tue, 27 Feb 2001 09:29:20 +0100 (MET)
- cc: gcc at gcc dot gnu dot org, Alexandre Oliva <aoliva at redhat dot com>, Phil Edwards <pedwards at disaster dot jaj dot com>, Tim Prince <tprince at computer dot org>
On Mon, 26 Feb 2001, Joe Buck wrote:
> gcc does not use $PATH to find compiler passes, the assembler, or the linker.
> This is because, if it did, bad things would happen to users who don't
> have the same PATH as the person who installed the compiler. The first
> place it looks is in the same directory as cc1, cc1plus, etc get installed
> in; this is $prefix/lib/gcc-lib/$target/$version . $prefix is /usr/local
> by default, or whatever you set with --prefix when you configure.
> $target is something like sparc-sun-solaris2.7, version is the version,
> say 2.95.2. If the -B flag is given then this specifies an alternative
> place to look for compiler passes. Anything not found in that location
> is then looked for in OS-specific standard locations. On Solaris
> /usr/ccs/bin is one such place.
Thanks for the clarification.
> This allows the path to be wired in. But the method I prefer is to just
> make a symbolic link to the gcc-lib/$target/$version directory.
But you have to do that *before* configuring/making/installing gcc.
Infrequent gcc-installers like me tend to forgot what subdirs they will
have to create first and where, so I prefer giving flags.
> > Writing up a corresponding patch for the online docs, I found
> > a/ That neither --with-as=... nor --with-ld is documented in install.texi.
>
> This is a bug and should be fixed.
I'll try to take care of that.
> > b/ That install.texi states that --with-gnu-as does only make a difference
> > on certain systems, amoung which I do not find Sun Solaris, although
> > I am sure that it actually *does* make a difference.
>
> Why are you sure?
Not recalling the exact details, I guess it was because I was creating the
links in gcc-lib/$target/$version only *after* installing gcc, but before
first running it (because now I knew the exact name of the dirs). So gcc
couldn't know in advance which as I would be using, if I didn't give it
with --with-gnu-as. I am not sure whether that qualifies as "making a
difference", maybe someone should clarify what "making a difference" means
in the context in install.texi.
Anyway, would the patch below make some sense? If so, I'd write something
similar for install.texi and propagate everything to gcc-patches.
Regards
Wolfgang
-------------------------------------------------------------------------
Wolfgang Bangerth email: wolfgang.bangerth@iwr.uni-heidelberg.de
www: http://gaia.iwr.uni-heidelberg.de/~wolf
Index: configure.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/install/configure.html,v
retrieving revision 1.36
diff -c -r1.36 configure.html
*** configure.html 2001/02/01 15:57:02 1.36
--- configure.html 2001/02/27 08:19:50
***************
*** 78,88 ****
<li> <tt>--enable-shared</tt> -- Build shared versions of the C++ runtime
libraries if supported <tt>--disable-shared</tt> is the default.
! <li> <tt>--with-gnu-as</tt> -- Specify that the compiler should assume the GNU
! assembler (aka gas) is available.
! <li> <tt>--with-gnu-ld</tt> -- Specify that the compiler should assume the GNU
! linker (aka gld) is available.
<li> <tt>--with-stabs</tt> -- Specify that stabs debugging information should be used
instead of whatever format the host normally uses. Normally GCC uses the
--- 78,117 ----
<li> <tt>--enable-shared</tt> -- Build shared versions of the C++ runtime
libraries if supported <tt>--disable-shared</tt> is the default.
! <li> <tt>--with-gnu-as</tt> -- Specify that the compiler should
! assume that the assembler it finds is the GNU assembler. However,
! this does not modify the rules to find an assembler and will result
! in confusion if the found assembler is not actually the GNU
! assembler. If you have more than one assembler installed on your
! system, you may want to use this option in connection with
! <tt>--with-as=/path/to/gas</tt>.
! <li> <tt>--with-as=</tt><i>/path/to/as</i> -- Specify that the compiler
! should use the assembler pointed to by <i>pathname</i>, rather than
! the one found by the standard rules to find an assembler, which are:
! <ul>
! <li> Check the <i>$exec_prefix/lib/gcc-lib/$target/$version</i>
! directory, where <i>$exec_prefix</i> defaults to <i>$prefix</i>
! which defaults to <i>/usr/local</i> unless overridden by the
! <tt>--prefix=/pathname</tt> switch described above.
! <i>$target</i> is the target system triple, such as
! <i>sparc-sun-solaris2.7</i>, and <i>$version</i> denotes the GCC
! version, such as <i>2.95.2</i>.
!
! <li> Check operating system specific directories
! (e.g. <i>/usr/ccs/bin</i> on Sun Solaris).
! </ul>
! Note that these rules do not check for the value of
! <i>$PATH</i>. You may want to use <tt>--with-as</tt> if no assembler
! is installed in the directories listed above, or if you have
! multiple assemblers installed and want to choose one that is not
! found by the above rules.
!
! <li> <tt>--with-gnu-ld</tt> -- Same as <tt>--with-gnu-as</tt> but
! for the linker.
!
! <li> <tt>--with-ld=</tt><i>/path/to/ld</i> -- Same as
! <tt>--with-as</tt>, but for the linker.
<li> <tt>--with-stabs</tt> -- Specify that stabs debugging information should be used
instead of whatever format the host normally uses. Normally GCC uses the