This is the mail archive of the gcc-patches@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: [patch] Important comment update to gcc/configure.in


Daniel Jacobowitz wrote:
On Fri, Mar 14, 2003 at 12:09:36AM -0500, Nathanael Nerode wrote:

I believe this is correct. I want review only in case I got it wrong.

This clarifies the important issue of *which* assembler and linker
we are looking for -- it's not the BUILD->BUILD, BUILD->HOST, or BUILD->TARGET assemblers (all of which might be used and different in
a Canadian cross compile)... it's the HOST->TARGET one, which we can't
always even execute.


Now that I've got this clear, I believe I'll actually be able to clean
up the related code.


Nope.  Couple of subtleties here, I think.  First of all, remember,
we're on BUILD right now.  We can not search for anything that's
supposed to live on HOST; it might not be there.  Secondly, we use this
assembler for feature tests, so we have to be able to execute it.
Ah, but that's what the version checks are for. :-) For when we are building a brand new HOST->TARGET gas and can't run it.

Generally we want a BUILD->TARGET assembler, and to make the assumption
that it will have the same features as the HOST->TARGET assembler.
That's really confusing. :-) That seriously needs to be documented, since it's an undocumented assumption if BUILD!=HOST.

The fact is that the feature tests are used as if they were feature tests for the HOST->TARGET assembler. They determine the format of the assembly output by the newly built gcc. I *think* that's the only thing they determine, but I'm not sure yet.

Because of this, in the build!=host case, the version number checks on the newly built gas are actually *better*, more accurate tests, than the feature checks, which are on a build->target assembler, which isn't the assembler we're actually interested in. It's an interesting situation, certainly...

Do pathnames from this search ever get embedded into GCC?  If so it
probably needs to be broken up into two searches.
I should check that. It's hard to check.

I certainly want to separate tests of the build->target assembler, used for building libgcc2, from tests of the host->target assembler, used to determine the behavior of the newly built gcc. Those two things shouldn't be confounded (although one should *default* from the other if build=host -- I've concluded that that's the clean way to write such things).

Thanks for your help.

--Nathanael


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