This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC-TM dependency build
- From: Richard Henderson <rth at redhat dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Cc: Aldy Hernandez <aldyh at redhat dot com>, jarias at bsc dot es, Ulrich Drepper <drepper at redhat dot com>, aoliva at redhat dot com
- Date: Fri, 09 Apr 2010 09:00:44 -0700
- Subject: Re: GCC-TM dependency build
- References: <20100331163055.GA2700@redhat.com> <4BB39088.5080502@redhat.com> <20100331184807.GA2923@redhat.com> <4BBB255B.8000504@bsc.es> <20100406121705.GA6766@redhat.com> <37064.192.168.6.2.1270740237.squirrel@webmail.bsc.es> <20100408153506.GA4966@redhat.com> <4BBE0781.7050907@redhat.com> <20100408164448.GA5771@redhat.com> <4BBE0AED.60407@redhat.com> <20100408165919.GA6093@redhat.com>
On 04/08/2010 09:59 AM, Aldy Hernandez wrote:
> The problem is that now the problem is present on a serial make (ala,
> "/src/configure && make").
I've reliably reproduced this. As far as I can tell, it's a problem
of makefile variable expansion in the top-level make.
For the folks just joining in gcc@, the problem is in the building of
libitm on the transactional-memory branch. Libitm is written in C++,
and uses <cassert>.
On the *first* invocation of make, the value of CXX_FOR_TARGET that is
passed down to the libitm sub-make does *not* include the -I flags for
the appropriate libstdc++ directories, and so <cassert> is not found
and results in the obvious build error. This failure can apparently
be masked by having an existing installation at PREFIX (which is I
suppose why it took me so long to see the problem).
On the *second* invocation of make, the value of CXX_FOR_TARGET *does*
include the appropriate -I flags and compilation succeeds.
This failure does not appear for libjava, the only other c++ library,
because it only uses the C headers (<ctype.h> etc) instead of the C++
wrapper headers (<cctype>). It doesn't *really* use libstdc++ at all.
As best I can figure, this...
> GCC_TARGET_TOOL(c++, CXX_FOR_TARGET, CXX,
> [gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ `test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs],
> c++)
... gets expanded too early in the make process. During the first
invocation of make the testsuite_flags script does not yet exist,
and the variable is not re-evaluated after configure-target-libstdc++-v3.
I have no idea how to fix this. Ideas?
r~