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]
Other format: [Raw text]

Re: gcc 3.3.4 cross build for mipsel mischooses the `as' to run


Zack Weinberg wrote:
This is a nice theory, but in practice I find that on any system where
there's a choice between (GNU as and/or ld) and (the system-provided
as and/or ld)

I was talking about cross compilers, though I probably didn't make that clear enough. The rules are different for natives as you suggest.


For a native, if MD_EXEC_PREFIX is set, as it is for solaris2 and other svr4 targets, then MD_EXEC_PREFIX overrides the rules I described. MD_EXEC_PREFIX is added to exec_prefixes before tooldir_prefix. Thus you need to do something explicit to override MD_EXEC_PREFIX if you want to use GNU as.

If MD_EXEC_PREFIX is not set, then for a native, we will find GNU as if it is installed, otherwise, we will search the user's path to find the native as.

MD_EXEC_PREFIX is useful if the native as is in a directory that normally will not be on the user's path, e.g. /usr/ccs/bin in the case of solaris. MD_EXEC_PREFIX is also useful if you have dot (.) in your path, and you are doing a combined tree build. In that case, MD_EXEC_PREFIX will prevent the native gcc from using ./as in the gcc directory. However, I'd suggest that removing dot (.) from your path is the better solution. Most targets do not set MD_EXEC_PREFIX.

If MD_EXEC_PREFIX is a problem, we could perhaps fix it by moving it after the tooldir_prefix code. Thus we would look for GNU as before we look for the native as. However, this might break configure for people who did not specify --with-gnu-as, as now they may be using it when they did not intend to.

Another possible solution would be disable use of MD_EXEC_PREFIX when --with-gnu-as is specified. We probably still want to add it to startfile_prefixes, but we could avoid adding it to exec_prefixes. That might actually be a very good solution, as this means gcc will automatically find the native as if you did not specify --with-gnu-as, and will automatically find GNU as if you did specify --with-gnu-as which is the behaviour we want.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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