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]

gcc/configure.in assembler search


So, why are we looking for the assembler in such an incredibly baroque manner?

(Note that, according to previous discussion, the assembler we're looking for is:
* if host=build, the assembler which the newly built GCC's driver will drive
* if host!=build, a hopefully 'work-alike' build->target assembler
)


Searching for a build->target assembler would normally be done (at any rate, this is how I would do it) by something like (in pseudocode):

if AS_FOR_TARGET is defined, use it
else if AS is defined and host=target, use it
else if ${target-alias}-as is in the path, use it
else if build=target and 'as' is in the path, use it

Searching for a host->target assembler would go along the lines of:
if --with-as= is specified, use it
otherwise, if build=host, use the build->target assembler as found above
otherwise, make a reasonable guess

The code in gcc/configure.in is a *lot* more complicated than this.
The comments seem to indicate that it's based on the idea of searching the same places the installed 'gcc' driver will search, in the same order. First of all, it doesn't seem to actually *do* this (something to do with MD_EXEC_PREFIX, which is mysterious to me). Second, this indicates that the gcc driver has search paths hardcoded somewhere which I haven't found (which this is supposed to coordinate with). Third, the scheme for what names to search for (as? $program_prefix-as? as | sed $program_transform_name?) are completely cryptic.


What are we trying to do here? I suspect that if build!=host, we don't need to duplicate the search pattern of the GCC driver. I also suspect that if build=host, we should but we aren't.

Rrowr. Help wanted.

--Nathanael


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