This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [Q] Configure: Choosing as on Solaris, --with-gnu-as, and --with-as



> some years ago I fist tried installing gcc on Sun Solaris 2.7, and found
> out that giving --with-gnu-as to configure still yields /usr/ccs/bin/as
> (Sun's assembler) even though that comes later in $PATH.

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.

> By some way I
> found out that I have to specify --with-as=/usr/local/bin/as. Now, I
> forgot again, so I searched docs and didn't find anything about it any
> more.

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.

> 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.

> 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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]