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]

Re: [patch] build vs. host confusion


	The egcs configuration differs in two points from its documentation (the file
	INSTALL and the info files).

	  1. When configured as

            ./configure --build=i486-linuxlibc1

	     it installs into $(prefix)/lib/gcc-lib/i486-pc-linux-gnulibc1/
	     instead of into  $(prefix)/lib/gcc-lib/i486-linuxlibc1/

	  2. The TARGET and BUILD values default from HOST. The doc says (and this
	     makes much more sense) that the TARGET and HOST values default from
	     BUILD.

It is the documentation that is wrong in both cases.  Gcc is behaving as it
should.

If a user specifies a configuration name, and the string is different
than what config.guess returns, then there is no easy way to tell whether
whether this is the same configuration or not.  We handle this by making
some simplifying assumptions.  --target implies a cross build.  --host implies
a native build.  --build implies some kind of canadian (3-way) cross build,
where the build and host machine are different.

Since canadian crosses are the most obscure kind of build, we use the most
obscure option --build to indicate them.  This also has the advantage that
gcc behaves the same as other packages that do not understand --build.
That is, you can configure a native build using --host for any GNU package.
If gcc and friends used --build for a native build, then users would have to
remember to use configure --host for some packages and configure --build
for other packages, and this would be so confusing that too many people
would get it wrong.  So using --host for native builds is the best choice.
We have been doing things this way for so long that there is no point to
changing it.

This also has the advantage that gcc2 is consistent with gcc1.  This may not
be very relevant now, but it was when we decided to do things this way.

Jim


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