From: Phil Edwards Date: Sun, 1 Sep 2002 18:09:18 +0000 (+0000) Subject: Makefile.am: Use LD_RUN_PATH when linking abi_check. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5ec62d440b703b8a0f54637ed109b13ad957e42c;p=gcc.git Makefile.am: Use LD_RUN_PATH when linking abi_check. 2002-09-01 Phil Edwards * 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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 8f9ccad5561..53c552b6da5 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2002-09-01 Phil Edwards + + * 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 * acinclude.m4: Minor comment tweaks. diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/Makefile.am index cda8f110d66..0deecb62b3d 100644 --- a/libstdc++-v3/testsuite/Makefile.am +++ b/libstdc++-v3/testsuite/Makefile.am @@ -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 $@ diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in index 25ce0f09971..97fea36ad6a 100644 --- a/libstdc++-v3/testsuite/Makefile.in +++ b/libstdc++-v3/testsuite/Makefile.in @@ -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: diff --git a/libstdc++-v3/testsuite/abi_check.cc b/libstdc++-v3/testsuite/abi_check.cc index f4b2c789618..10c300c853d 100644 --- a/libstdc++-v3/testsuite/abi_check.cc +++ b/libstdc++-v3/testsuite/abi_check.cc @@ -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;