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]

PATCH: Re: PATCH: g++ testsuite


>> Fixed with this patch, which hopefully keeps V3 tests working as
>> well.

> Actually, I suspect that odir_v2 will be set to a non-empty file when
> v3 was configured for the reason you outline above whenever srcdir ==
> objdir.

[...many other questions for dejagnu experts removed...]

Now that I understand why it broke (srcdir == objdir OR objdir under
srcdir), here is a tweak to Mark's Tweak.  Now, I check for the exact
locations of the build directories without hunting up the hierarchy
since we can construct the precise possible paths where particular
versions of libstdc++ must reside.  I also added back in the check to
ensure that one of the two possible locations does exist since *many*
g++ failures will result if a libstdc++ library can't be found.  I did
retain Mark's relaxation of the selection process and check so that
libstdc++-v2 will be selected for testing if both versions exist in
the build tree.  Later when v3 is the default, we could flip the
checks around.

I have checked that the technique works by rerunning ``make
check-g++'' in an existing random tree configured for v3
(objdir != or under srcdir) and fresh trees built as:
``../egcs/configure --disable-multilib; make'' (objdir != or under srcdir)
``./configure; make'' (srcdir == objdir)
``./configure --enable-libstdcxx-v3; make'' (srcdir==objdir)
``./configure --disable-multilib; make'' (srcdir == objdir)
``./configure --disable-multilib --enable-libstdcxx-v3; make'' (srcdir==objdir)

I explicitly tested with --disable-multilib since this was an area
that I expected might cause a problem now that I understand more of
dejagnu.

I have explicitly not tested with objdir under srcdir since
http://gcc.gnu.org/install/configure.html says that is not supported.
However, I think this style of check, that removes the hunting up the
hierarchy, will be better there too.

The first three cases worked fine (which is enough to make this patch
valid IMHO).  When srcdir==objdir with --disable-multilib and/or
--enable-libstdcxx-v3, I can't even make due to current bugs in the
build process related to building in-place (many paths are off by one
directory level)...

[Thus, strictly speaking, the point of this patch is currently moot
 since a v3 tree can not be configured with srcdir == objdir.  However,
 since I went to the trouble to remove the flaw with my original patch
 (and as tweaked), I think this should be installed anyways so we
 don't hit this latent issue again.]

Regards,
Loren

2000-06-27  Loren J. Rittle  <ljrittle@acm.org>

	* lib/g++.exp (g++_include_flags): Tweak.

Index: gcc/testsuite/lib/g++.exp
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/lib/g++.exp,v
retrieving revision 1.10
diff -c -p -r1.10 g++.exp
*** g++.exp	2000/06/27 20:40:05	1.10
--- g++.exp	2000/06/27 23:59:35
*************** proc g++_include_flags { args } {
*** 81,94 ****
      if { ${dir} != "" } {
        append flags "-I${dir} -I${dir}/src "
      }
!     set odir_v2 [lookfor_file ${gccpath} libstdc++]
      set sdir_v2 [lookfor_file ${srcdir} libstdc++]
!     if { ${odir_v2} != "" } {
        append flags "-I${sdir_v2} -I${sdir_v2}/stl "
      } else {
!       set odir_v3 [lookfor_file ${gccpath} libstdc++-v3]
!       set sdir_v3 [lookfor_file ${srcdir} libstdc++-v3]
!       append flags [exec ${odir_v3}/mkcheck 2 ${odir_v3} ${sdir_v3}]
      }
  
      return "$flags"
--- 81,99 ----
      if { ${dir} != "" } {
        append flags "-I${dir} -I${dir}/src "
      }
! 
      set sdir_v2 [lookfor_file ${srcdir} libstdc++]
!     set sdir_v3 [lookfor_file ${srcdir} libstdc++-v3]
!     if { ${sdir_v2} != "" && [file exists ${gccpath}/libstdc++] } {
        append flags "-I${sdir_v2} -I${sdir_v2}/stl "
      } else {
!       if { ${sdir_v3} != "" && [file exists ${gccpath}/libstdc++-v3] } {
!         set odir_v3 ${gccpath}/libstdc++-v3
!         append flags [exec ${odir_v3}/mkcheck 2 ${odir_v3} ${sdir_v3}]
!       } else {
!         send_error "ERROR: at least one of libstdc++ or libstdc++-v3 must appear in the build tree.\n"
!         exit 1
!       }
      }
  
      return "$flags"

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