This is the mail archive of the 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: PATCH Finding gas

Jeffrey A Law <> writes:

>   In message <>you write:
>> Jeffrey A Law <> writes:

>> > I would much prefer us encourage folks to install the various tools
>> > with the same --prefix.  If they do that all this stuff will just
>> > work.
>> I dislike this approach because then I cannot upgrade binutils without 
>> either overwriting its previous installation or installing egcs again
>> together with the new binutils in a separate prefix.

>> We could even auto-detect GNU as and GNU ld, instead of requiring
>> users to specify them, and create the appropriate links in the
>> build directories too.

> I really dislike the idea of creating symlinks to other
> files/directories from within the gcc install tree.

Then we should hard-code the pathnames of as and ld in the gcc binary, 
or perhaps in the (default) specs.  

> One could argue that the path should be searched earlier and that
> may allow you to do what you want.

This is not always desirable.  Assume I have installed gcc
--with-gnu-ld on SunOS, and GNU ld lives in /usr/local/bin, and some
other user runs gcc with /usr/bin before /usr/local/bin in the PATH:
gcc will find /bin/ld, and linking will not work.

There must be a way for gcc to remember which assembler and which
linker it should use, and try them before searching for alternatives.
Perhaps we should AC_PATH_PROG AS and LD, so that users could define
which assembler and which linker to use at configure-time.  New
configure options --with-ld=/pathname/to/ld and
--with-as=/pathname/to/as could be provided too.  The existence of GNU
as and GNU ld could then be auto-detected.

Alexandre Oliva
Universidade Estadual de Campinas, SP, Brasil

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