* acinclude.m4 (GLIBCXX_CONFIGURE_TESTSUITE): Remove MULTISUBDIR
from baseline_dir.
* configure: Regenerate.
* testsuite/Makefile.am (baseline_file): Remove variable.
(site.exp): Set baseline_dir rather than baseline_file.
(check-abi): Pass AM_RUNTESTFLAGS and RUNTESTFLAGS to runtest.
* testsuite/Makefile.in: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144394
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-02-23 Adam Nemet <anemet@caviumnetworks.com>
+
+ * testsuite/libstdc++-abi/abi.exp: Add multilib support.
+ * acinclude.m4 (GLIBCXX_CONFIGURE_TESTSUITE): Remove MULTISUBDIR
+ from baseline_dir.
+ * configure: Regenerate.
+ * testsuite/Makefile.am (baseline_file): Remove variable.
+ (site.exp): Set baseline_dir rather than baseline_file.
+ (check-abi): Pass AM_RUNTESTFLAGS and RUNTESTFLAGS to runtest.
+ * testsuite/Makefile.in: Regenerate.
+
2009-02-20 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/30_threads/thread/this_thread: Move...
fi
# Export file names for ABI checking.
- baseline_dir="$glibcxx_srcdir/config/abi/post/${abi_baseline_pair}\$(MULTISUBDIR)"
+ baseline_dir="$glibcxx_srcdir/config/abi/post/${abi_baseline_pair}"
AC_SUBST(baseline_dir)
])
fi
# Export file names for ABI checking.
- baseline_dir="$glibcxx_srcdir/config/abi/post/${abi_baseline_pair}\$(MULTISUBDIR)"
+ baseline_dir="$glibcxx_srcdir/config/abi/post/${abi_baseline_pair}"
@echo 'set target_triplet $(target_triplet)' >>site.tmp
@echo 'set target_triplet $(target_triplet)' >>site.tmp
@echo 'set libiconv "$(LIBICONV)"' >>site.tmp
- @echo 'set baseline_file "$(baseline_file)"' >> site.tmp
+ @echo 'set baseline_dir "$(baseline_dir)"' >> site.tmp
@echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
@test ! -f site.exp || \
sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
@mv site.tmp site.exp
-baseline_file = ${baseline_dir}/baseline_symbols.txt
extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers
baseline_symbols:
# Use 'new-abi-baseline' to create an initial symbol file. Then run
# 'check-abi' to test for changes against that file.
check-abi: site.exp baseline_symbols
- -@runtest --tool libstdc++ abi.exp
+ -@runtest $(AM_RUNTESTFLAGS) --tool libstdc++ $(RUNTESTFLAGS) abi.exp
# Runs the testsuite, but in compile only mode.
# Can be used to test sources with non-GNU FE's at various warning
testsuite_files_interactive \
testsuite_files_performance
-baseline_file = ${baseline_dir}/baseline_symbols.txt
extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers
check_DEJAGNU_normal_targets = $(patsubst %,check-DEJAGNUnormal%,0 1 2 3)
@echo 'set target_triplet $(target_triplet)' >>site.tmp
@echo 'set target_triplet $(target_triplet)' >>site.tmp
@echo 'set libiconv "$(LIBICONV)"' >>site.tmp
- @echo 'set baseline_file "$(baseline_file)"' >> site.tmp
+ @echo 'set baseline_dir "$(baseline_dir)"' >> site.tmp
@echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
@test ! -f site.exp || \
sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
# Use 'new-abi-baseline' to create an initial symbol file. Then run
# 'check-abi' to test for changes against that file.
check-abi: site.exp baseline_symbols
- -@runtest --tool libstdc++ abi.exp
+ -@runtest $(AM_RUNTESTFLAGS) --tool libstdc++ $(RUNTESTFLAGS) abi.exp
check-compile: testsuite_files ${compile_script}
-@(chmod + ${compile_script}; \
${compile_script} ${glibcxx_srcdir} ${glibcxx_builddir})
# this test. Or, hey, if we don't support this kind of symbol
# versioning test: don't run it.
+set lib $blddir/src/.libs/libstdc++.so
+set baseline_subdir "[eval exec $cxx --print-multi-dir]"
+
# Build the support objects.
v3-build_support
-if { (${v3-symver} == 0) || ![info exists baseline_file] \
- || ![file exists $baseline_file] \
- || ![file exists "../src/.libs/libstdc++.so"] } {
+if { (${v3-symver} == 0) || ![info exists baseline_dir] \
+ || ![file exists $baseline_dir] \
+ || ![file exists $lib] } {
+ return
+}
+
+set baseline_file \
+ [file join $baseline_dir $baseline_subdir "baseline_symbols.txt"]
+# If there is no ABI-specific reference file use that of the default ABI.
+if ![file exists $baseline_file] {
+ set baseline_file [file join $baseline_dir "baseline_symbols.txt"]
+}
+if ![file exists $baseline_file] {
return
}
+send_log "Checking $lib against $baseline_file\n"
# Figure out what symbols are defined by the active build of the library.
remote_exec "build" "$srcdir/../scripts/extract_symvers" \
- [list "../src/.libs/libstdc++.so" "current_symbols.txt"]
+ [list $lib "current_symbols.txt"]
# Build the abi_check program.
if { [v3_target_compile "$srcdir/util/testsuite_abi_check.cc" "abi_check" \