RE: Trouble with gcc -B option

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

 



> >> Normally if you configure GCC and the binutils with the exact same
> >> prefix, and install both, then GCC will use the ld  built by the
> >> binutils.
> >
> > This seems to be not the case for me. Any idea why?
> 
> No.  If you run "gcc -print-search-dirs" it will print the directories
> it searches for programs.  One of those directories ought to contain a
> binary named "ld" installed by the GNU binutils.

In the "programs:" list, the path to ld is not listed. It should be something like:

..../usr/bin/ld

All of the entries are something like this:

..../usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1

 However, in the "libraries" list, along with entries like the above, the path to the libraries is listed like this:

..../usr/lib/../lib64:.......:..../usr/lib

Have I somehow compiled binutils, glibc and gcc wrong?

> > But now I'm really confused. The gcc manual says:
> >
> > #######
> > This option specifies where to find the executables, libraries,
> include files, and data files of the compiler itself.
> >
> > The compiler driver program runs one or more of the subprograms cpp,
> cc1, as and ld. It tries prefix as a prefix for each program it tries
> to run, both with and without `machine/version/' (see Target Options).
> > #######
> >
> > The executable, library, include and data files are in ..../bin,
> ..../lib, ..../include and so forth. How does specifying ..../usr/bin
> allow gcc to find the stuff in lib, include and so forth?
> 
> The lib, include, etc., directories are compiled into GCC as offsets
> from the bin directory, using appropriate numbers of ../.. in the path
> name.

Ok, that makes sense. But to me, the manual description is quite misleading because it gives no obvious indication that something like this is going on.

Am I missing something obvious, or is this such common knowledge in the user community that it doesn't seem necessary to state? Or should the manual be revised to include what you've told me? If so, how might that be done?

Thanks so much for your help!
Alan



[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