Re: how does gcc pick the assembler, linker?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 03, 2009 at 12:31:22PM -0500, kamaraju kusumanchi wrote:
> Can someone tell me how gcc picks it's assembler, linker? I am using
> Sun Solaris 5.8.
> 
> For example, if I do
> 
> > gcc -print-prog-name=as
> /usr/ccs/bin/as
> 
> > gcc -print-prog-name=ld
> /usr/ccs/bin/ld
> 
> However, /usr/ccs/bin is not in the $PATH, $LD_LIBRARY_PATH.
> 
> I would like gcc to use as, ld located in some other directory. I want
> this directory to be looked before it searches in /usr/ccs/bin etc.,
> Any ideas on how to achieve it?

The toplevel configure script sets the default machine dependent execution
prefix, and the MD files can override this.

# Determine a target-dependent exec_prefix that the installed
# gcc will search in.  Keep this list sorted by triplet, with
# the *-*-osname triplets last.
md_exec_prefix=
case "${target}" in
  # ...

  *-*-beos* | \
  *-*-elf* | \
  *-*-hpux* | \
  *-*-netware* | \
  *-*-nto-qnx* | \
  *-*-rtems* | \
  *-*-solaris2* | \
  *-*-sysv[45]* | \
  *-*-vxworks* | \
  *-wrs-windiss)
    md_exec_prefix=/usr/ccs/bin
    ;;
esac

For the assembler and linker, you should be able to use the configure switches
--with-gnu-as=<path> and --with-gnu-ld=<path>.

-- 
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@xxxxxxxxxxxxxxxxxx

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux