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

Re: [patch] Enable plugin tests only when the build and the host systems are the same

On Wed, 6 May 2009, Le-Chun Wu wrote:

> So in a canadian cross compilation, when I do a "make check" in the
> build tree on the build system, I would have thought the GCC being
> tested was built with the build compiler, not the host compiler. Is it
> right? (But even in that case, HOSTCC, which is set to the build
> compiler, is also the one that's used to build GCC, so the new check
> that I added in this patch is not necessary.) I think the only case

Suppose you are building a canadian cross compiler (host-x-target).  You 
need to have three pre-existing compilers in order to do so.  These 
compilers all run on the build system and generate code for, respectively, 
the build system (build compiler), the host system (build-x-host), and the 
target system (build-x-target).  The third compiler must be built from 
identical sources to the canadian cross compiler you are building; the 
other two need not be.

When you test this compiler by running runtest --host_board=whatever on 
the build system (whether or not through "make check"), it tests the newly 
built host-x-target compiler, running it on the remote host system using 
DejaGnu's --host_board support.  If this process needs to build code that 
runs on the host rather than the target, this is done with $HOSTCC, which 
is the build-x-host compiler and runs on the build system; the host system 
may not have a native compiler, so all that can be run there is the 
host-x-target compiler.  See struct-layout-1.exp for example.

> where this patch makes sense is when running "make check" on the host
> system while the build tree was created on the build system. In that

Build trees are not generally portable from one system to another like 
that.  You can certainly test by running runtest on the host system if you 
wish to do that rather than runtest --host_board on the build system, but 
with installed testing rather than build-tree testing.

Joseph S. Myers

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