Makefile.am: Use LD_RUN_PATH when linking abi_check.

2002-09-01  Phil Edwards  <pme@gcc.gnu.org>

	* testsuite/Makefile.am:  Use LD_RUN_PATH when linking abi_check.
	Fix spelling in comment.
	* testsuite/Makefile.in:  Regenerate.
	* testsuite/abi_check.cc:  Use string literals to build 'cmd' rather
	than 'quote' and 'bslash'.

From-SVN: r56722
This commit is contained in:
Phil Edwards 2002-09-01 18:09:18 +00:00
parent 0475ed26cb
commit 5ec62d440b
4 changed files with 26 additions and 29 deletions

View File

@ -1,3 +1,11 @@
2002-09-01 Phil Edwards <pme@gcc.gnu.org>
* testsuite/Makefile.am: Use LD_RUN_PATH when linking abi_check.
Fix spelling in comment.
* testsuite/Makefile.in: Regenerate.
* testsuite/abi_check.cc: Use string literals to build 'cmd' rather
than 'quote' and 'bslash'.
2002-08-31 Phil Edwards <pme@gcc.gnu.org>
* acinclude.m4: Minor comment tweaks.

View File

@ -37,10 +37,11 @@ AM_RUNTESTFLAGS =
RUNTESTFLAGS =
## CXX is actually a "C" compiler. These are real C++ programs.
## Do the same thing as `testsuite_hooks --build-cxx`
## Do the same thing as `testsuite_flags --build-cxx`
CXX_fake = @glibcpp_CXX@
CXX=`echo $(CXX_fake) | sed 's/xgcc/g++/g'`
CXXLINK = \
LD_RUN_PATH=${LD_RUN_PATH:+$LD_RUN_PATH:}${glibcpp_builddir}/src/.libs\
$(LIBTOOL) --tag=CXX --mode=link $(CXX) \
$(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@

View File

@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@ -136,14 +136,10 @@ AUTOMAKE_OPTIONS = cygnus dejagnu
DEJATOOL = libstdc++-v3
EXPECT = `if [ -f @glibcpp_builddir@/../../expect/expect ] ; then \
echo @glibcpp_builddir@/../../expect/expect ; \
else echo expect ; fi`
EXPECT = `if [ -f @glibcpp_builddir@/../../expect/expect ] ; then echo @glibcpp_builddir@/../../expect/expect ; else echo expect ; fi`
RUNTEST = `if [ -f @glibcpp_srcdir@/../dejagnu/runtest ] ; then \
echo @glibcpp_srcdir@/../dejagnu/runtest ; \
else echo runtest; fi`
RUNTEST = `if [ -f @glibcpp_srcdir@/../dejagnu/runtest ] ; then echo @glibcpp_srcdir@/../dejagnu/runtest ; else echo runtest; fi`
AM_RUNTESTFLAGS =
@ -151,19 +147,15 @@ RUNTESTFLAGS =
CXX_fake = @glibcpp_CXX@
CXX = `echo $(CXX_fake) | sed 's/xgcc/g++/g'`
CXXLINK = \
$(LIBTOOL) --tag=CXX --mode=link $(CXX) \
$(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
CXXLINK = LD_RUN_PATH=${LD_RUN_PATH:+$LD_RUN_PATH:}${glibcpp_builddir}/src/.libs $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
INCLUDES = \
-nostdinc++ \
@GLIBCPP_INCLUDES@ @LIBSUPCXX_INCLUDES@ @TOPLEVEL_INCLUDES@
INCLUDES = -nostdinc++ @GLIBCPP_INCLUDES@ @LIBSUPCXX_INCLUDES@ @TOPLEVEL_INCLUDES@
noinst_LIBRARIES = libv3test.a
libv3test_a_SOURCES = testsuite_hooks.cc
@GLIBCPP_BUILD_ABI_CHECK_TRUE@noinst_PROGRAMS = @GLIBCPP_BUILD_ABI_CHECK_TRUE@abi_check
@GLIBCPP_BUILD_ABI_CHECK_TRUE@noinst_PROGRAMS = abi_check
@GLIBCPP_BUILD_ABI_CHECK_FALSE@noinst_PROGRAMS =
abi_check_SOURCES = abi_check.cc
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
@ -194,7 +186,7 @@ DIST_COMMON = README Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
TAR = tar
GZIP_ENV = --best
SOURCES = $(libv3test_a_SOURCES) $(abi_check_SOURCES)
OBJECTS = $(libv3test_a_OBJECTS) $(abi_check_OBJECTS)
@ -305,7 +297,7 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|| (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
mostlyclean-tags:
@ -362,7 +354,7 @@ site.exp: Makefile
@echo 'set build_alias $(build_alias)' >> $@-t
@echo 'set build_triplet $(build_triplet)' >> $@-t
@echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
@test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
@test ! -f $(srcdir)/site.exp || sed '1,/^## All variables above are.*##/ d' $(srcdir)/site.exp >> $@-t
@test ! -f site.exp || mv site.exp site.bak
@mv $@-t site.exp
info-am:

View File

@ -249,8 +249,6 @@ int main(int argc, char** argv)
"%s:%s\n", $4, $8; else if ($4 == "OBJECT") printf "%s:%s:%s\n", $4,
$3, $8;}' | sort >& current_symbols.txt
*/
const char quote = '"';
const char bslash = '\\';
// GNU binutils, somewhere after version 2.11.2, requires -W/--wide
// to avoid default line truncation. -W is not supported and
@ -259,15 +257,13 @@ int main(int argc, char** argv)
(system("readelf --help | grep -- --wide >/dev/null") == 0);
ostringstream cmd;
cmd << "readelf -s " << (readelf_need_wide ? "-W " : "")
<< test_lib << " | sed '/" << bslash
<< ".dynsym/,/^$/p;d' | egrep -v ' (LOCAL|UND) ' | "
<< "awk '{ if ($4 == " << quote << "FUNC" << quote << "|| $4 == "
<< quote << "NOTYPE" << quote << ") printf " << quote << "%s:%s"
<< bslash << "n" << quote << ", $4, $8; else if ($4 == "
<< quote << "OBJECT" << quote << ") printf " << quote
<< "%s:%s:%s" << bslash << "n" << quote << ", $4, $3, $8;}' | "
<< "sort > " << test_file << " 2>&1";
cmd << "readelf -s " << (readelf_need_wide ? "-W " : "") << test_lib
<< " | sed '/\\.dynsym/,/^$/p;d' | egrep -v ' (LOCAL|UND) ' | "
"awk '{ if ($4 == \"FUNC\" || $4 == \"NOTYPE\") "
"printf \"%s:%s\\n\", $4, $8; "
"else if ($4 == \"OBJECT\") "
"printf \"%s:%s:%s\\n\", $4, $3, $8;}' | sort > "
<< test_file << " 2>&1";
if (system(cmd.str().c_str()) != 0)
{
cerr << "Unable to generate the list of exported symbols." << endl;