Using ``make check-g++'' with --enable-libstdcxx-v3

Loren James Rittle rittle@latour.rsch.comm.mot.com
Fri Apr 28 19:53:00 GMT 2000


In case anyone else is trying to ``make check-g++'' in a gcc tree
configured with --enable-libstdcxx-v3, the following patch to
libgloss.exp (distributed with dejagnu not gcc) might help you:

[Note the comment in the new text: with this patch, one must currently
 'make install' before 'make check-g++' since, at the minimum, (a) I
 get errors on the usage of include_next (I thought -B was suppose to
 treat -I paths as system areas, guess not for g++ -ansi -pedantic-errors)
 and (b) using libstdc++-v3/mkcheck as a guide, there is no obvious
 portable way to express the per-system required paths of the
 libstdc++-v3 source tree.]

This patch is not worthy of a ChangeLog since it shouldn't be applied
until someone figures out how to fix the currently exposed issues.
Although, this patch is helpful since it changes things to key off the
object tree (i.e. to be based on exact configuration) instead of the
source tree to pick up header paths (one gets a big mess when the old
v2 headers are found).

*** libgloss.exp	Fri Apr 28 18:21:51 2000
--- /usr/local/share/dejagnu/libgloss.exp	Fri Apr 28 21:18:51 2000
*************** proc g++_include_flags { args } {
*** 223,231 ****
      if { ${dir} != "" } {
  	append flags "-I${dir} -I${dir}/src "
      }
!     set dir [lookfor_file ${srcdir} libstdc++]
!     if { ${dir} != "" } {
! 	append flags "-I${dir} -I${dir}/stl"
      }
      return "$flags"
  }
--- 223,242 ----
      if { ${dir} != "" } {
  	append flags "-I${dir} -I${dir}/src "
      }
!     set odir [lookfor_file ${gccpath} libstdc++]
!     set sdir [lookfor_file ${srcdir} libstdc++]
!     if { ${odir} != "" } {
! 	append flags "-I${sdir} -I${sdir}/stl "
!     }
!     set odir [lookfor_file ${gccpath} libstdc++-v3]
!     set sdir [lookfor_file ${srcdir} libstdc++-v3]
!     if { ${odir} != "" } {
! 	# This attempt isn't currently working (nor would it be portable).
! 	# For now, must 'make install' then 'make check-g++'...
! 	#append flags "-I${odir} -I${odir}/libio -I${sdir}/config/generic -I${sdir}/config/cpu/i386 -I${sdir}/std -I${sdir} -I${sdir}/libio "
! 	# Also, it is fairly stupid that information about the layout
! 	# of the gcc tree must be encoded in this file distributed outside gcc.
! 	append flags "-I${sdir}/backward "
      }
      return "$flags"
  }
*************** proc g++_link_flags { args } {
*** 250,255 ****
--- 261,270 ----
  	if [file exists "${gccpath}/libstdc++/libstdc++.a"] {
  	    append flags "-L${gccpath}/libstdc++ "
  	    append ld_library_path ":${gccpath}/libstdc++"
+ 	}
+ 	if [file exists "${gccpath}/libstdc++-v3/src/.libs/libstdc++.a"] {
+ 	    append flags " -static -L${gccpath}/libstdc++-v3/src/.libs "
+ 	    append ld_library_path ":${gccpath}/libstdc++-v3/src/.libs"
  	}
  	if [file exists "${gccpath}/libiberty/libiberty.a"] {
  	    append flags "-L${gccpath}/libiberty "


More information about the Libstdc++ mailing list