This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: [libstdc++] minor fixes and improvements to check-abi


On Fri, Aug 23, 2002 at 03:35:07PM -0400, Phil Edwards wrote:
> a moment.)  Applied to trunk.  If this is all good after a day, I'll
> copy it to the branch.

Done.  The 3.2 branch doesn't have my configure.target cleanup (which
would require a bunch of file and directory shuffling), so I just added
the one line to make the rest of everything work.  The patch as applied is
below, tested on athlon_mp-pc-linux-gnu.



2002-08-26  Phil Edwards  <pme@gcc.gnu.org>

	* Makefile.am (check-abi):  Specify current directory.
	* acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE):  Fix shell syntax, use
	abi_baseline_triplet in baseline_file.
	* Makefile.in, aclocal.m4, configure:  Regenerate.
	* configure.target:  Add abi_baseline_triplet with default.
	* testsuite/abi_check.cc:  More error checking.


Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/Makefile.am,v
retrieving revision 1.29.8.1
diff -u -3 -p -r1.29.8.1 Makefile.am
--- Makefile.am	23 Aug 2002 02:42:29 -0000	1.29.8.1
+++ Makefile.am	26 Aug 2002 19:08:53 -0000
@@ -47,7 +47,7 @@ check-script-install: $(top_builddir)/mk
 baseline_file = @baseline_file@
 check-abi: $(top_builddir)/testsuite/abi_check
 	-(cd testsuite; \
-	  abi_check @baseline_file@)
+	  ./abi_check ${baseline_file})
 
 # These rules are messy, but are hella worth it.
 doxygen:
Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/acinclude.m4,v
retrieving revision 1.194.2.15.2.2
diff -u -3 -p -r1.194.2.15.2.2 acinclude.m4
--- acinclude.m4	25 Aug 2002 17:44:03 -0000	1.194.2.15.2.2
+++ acinclude.m4	26 Aug 2002 19:08:58 -0000
@@ -2026,12 +2026,12 @@ AC_DEFUN(GLIBCPP_CONFIGURE_TESTSUITE, [
   GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
 
   # Export file names for ABI checking.
-  baseline_file="${glibcpp_srcdir}/config/abi/${target_alias}/baseline_symbols.txt"
+  baseline_file="${glibcpp_srcdir}/config/abi/${abi_baseline_triplet}/baseline_symbols.txt"
   AC_SUBST(baseline_file)
 
   # Don't do ABI checking unless native.
   AM_CONDITIONAL(GLIBCPP_BUILD_ABI_CHECK,
-                 test x"$build" == x"$host" && test -z "$with_cross_host")
+                 test x"$build" = x"$host" && test -z "$with_cross_host")
 ])
 
 
Index: configure.target
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/configure.target,v
retrieving revision 1.38.2.5
diff -u -3 -p -r1.38.2.5 configure.target
--- configure.target	28 Jun 2002 08:22:31 -0000	1.38.2.5
+++ configure.target	26 Aug 2002 19:09:13 -0000
@@ -27,6 +27,7 @@
 # DEFAULTS
 c_model=c_std
 c_compatibility=no
+abi_baseline_triplet=${target}
 
 
 # TARGET-SPECIFIC OVERRIDES 
Index: testsuite/abi_check.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/abi_check.cc,v
retrieving revision 1.2.2.1
diff -u -3 -p -r1.2.2.1 abi_check.cc
--- testsuite/abi_check.cc	23 Aug 2002 02:43:05 -0000	1.2.2.1
+++ testsuite/abi_check.cc	26 Aug 2002 19:09:14 -0000
@@ -36,6 +36,8 @@
 #include <fstream>
 #include <iostream>
 #include <cxxabi.h>
+#include <stdlib.h>    // for system(3)
+#include <unistd.h>    // for access(2)
 
 struct symbol_info
 {
@@ -225,6 +227,19 @@ int main(int argc, char** argv)
   const char* baseline_file = argv[1];
   const char* test_file = "current_symbols.txt";
   const char* test_lib = "../src/.libs/libstdc++.so";
+
+  // Quick sanity/setup check
+  if (access(baseline_file, R_OK) != 0)
+    {
+      cerr << "Cannot read baseline file " << baseline_file << endl;
+      exit(1);
+    }
+  if (access(test_lib, R_OK) != 0)
+    {
+      cerr << "Cannot read library " << test_lib
+           << ", did you forget to build first?" << endl;
+      exit(1);
+    }
 
   // Get list of symbols.
   // Assume external symbol list computed "as if" by


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