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]

gcc/testsuite/lib/g++.exp patch


this patch makes it a little simpler to test an installed
g++ rather than a just-built g++.  testing an installed g++
is something we do at cyghat to make sure it actually did
install correctly.

this still isn't right.  someone needs to go ripping through
g++.exp and other files to make sure it isn't getting
anything from srcdir unless you mean it, but every time I
look at dejagnu I end up wanting to kill something.

gcc/testsuite/ChangeLog:

2001-02-17  Felix Lee  <flee@redhat.com>

	* lib/g++.exp (g++_include_flags): get rid of HAVE_LIBSTDCXX_V3.
	make it less wrong when testing an installed g++.

Index: gcc/testsuite/lib/g++.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/g++.exp,v
retrieving revision 1.17
diff -u -r1.17 g++.exp
--- gcc/testsuite/lib/g++.exp	2001/02/08 02:29:38	1.17
+++ gcc/testsuite/lib/g++.exp	2001/02/17 22:34:32
@@ -65,7 +65,6 @@
 #
 proc g++_include_flags { args } {
     global srcdir
-    global HAVE_LIBSTDCXX_V3
 
     set flags ""
 
@@ -80,14 +79,20 @@
 
     set gccpath [get_multilibs]
 
-    if { ${HAVE_LIBSTDCXX_V3} } {
-      set odir_v3 [lookfor_file ${gccpath} libstdc++-v3]
-      set sdir_v3 [lookfor_file ${srcdir} libstdc++-v3]
-      append flags [exec sh ${odir_v3}/tests_flags --compiler ${odir_v3} ${sdir_v3}]
-    } else {
-      set odir_v2 [lookfor_file ${gccpath} libstdc++]
-      set sdir_v2 [lookfor_file ${srcdir} libstdc++]
-      append flags "-I${sdir_v2} -I${sdir_v2}/stl "
+    # if $odir_* below is non-null, we're testing a just-built g++ and need
+    # to specify some -I flags.  otherwise, we're testing an installed g++
+    # and don't want any -I flags.
+
+    set odir_v3 [lookfor_file ${gccpath} libstdc++-v3]
+    set sdir_v3 [lookfor_file ${srcdir} libstdc++-v3]
+    if {$odir_v3 != ""} {
+      append flags [exec sh $odir_v3/tests_flags --compiler $odir_v3 $sdir_v3]
+    }
+
+    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 "
     }
 
     return "$flags"


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