]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Makefile.am: Use LD_RUN_PATH when linking abi_check.
authorPhil Edwards <pme@gcc.gnu.org>
Thu, 5 Sep 2002 16:10:08 +0000 (16:10 +0000)
committerPhil Edwards <pme@gcc.gnu.org>
Thu, 5 Sep 2002 16:10:08 +0000 (16:10 +0000)
2002-09-05  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: r56846

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/Makefile.am
libstdc++-v3/testsuite/Makefile.in
libstdc++-v3/testsuite/abi_check.cc

index 63ec5e68c0090511ab2e562449d239b6beca5900..34a4031a1b5f49c5b59dc5d019f8dee9e867b553 100644 (file)
@@ -1,3 +1,11 @@
+2002-09-05  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-09-05  Jakub Jelinek  <jakub@redhat.com>
 
        * config/locale/gnu/ctype_members.cc (ctype<wchar_t>::do_widen(char)):
index 77fc29520becf7436af86aa29f33f4fc3638e0b6..7fa319dbb08a9aee18d6c57b5650678f9a94f8f9 100644 (file)
@@ -36,10 +36,11 @@ RUNTEST = `if [ -f @glibcpp_srcdir@/../dejagnu/runtest ] ; then \
 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 $@
 
index d6dcbaf6c4d83f123e9cee6b7dc8dc8518333a58..2265719c645a23beca1a87529cb1e4e2de032d83 100644 (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,30 +136,22 @@ AUTOMAKE_OPTIONS = foreign 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`
 
 
 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@ 
 
-@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
@@ -186,8 +178,9 @@ DIST_COMMON =  README Makefile.am Makefile.in
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = gtar
+TAR = tar
 GZIP_ENV = --best
+DEP_FILES =  .deps/abi_check.P
 SOURCES = $(abi_check_SOURCES)
 OBJECTS = $(abi_check_OBJECTS)
 
@@ -195,9 +188,9 @@ all: all-redirect
 .SUFFIXES:
 .SUFFIXES: .S .c .cc .lo .o .obj .s
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
-       cd $(top_srcdir) && $(AUTOMAKE) --cygnus testsuite/Makefile
+       cd $(top_srcdir) && $(AUTOMAKE) --foreign testsuite/Makefile
 
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
        cd $(top_builddir) \
          && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
@@ -211,9 +204,6 @@ distclean-noinstPROGRAMS:
 
 maintainer-clean-noinstPROGRAMS:
 
-.c.o:
-       $(COMPILE) -c $<
-
 # FIXME: We should only use cygpath when building on Windows,
 # and only if it is available.
 .c.obj:
@@ -236,9 +226,6 @@ distclean-compile:
 
 maintainer-clean-compile:
 
-.c.lo:
-       $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
 .s.lo:
        $(LIBTOOL) --mode=compile $(COMPILE) -c $<
 
@@ -283,7 +270,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:
 
@@ -299,8 +286,13 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 subdir = testsuite
 
 distdir: $(DISTFILES)
+       here=`cd $(top_builddir) && pwd`; \
+       top_distdir=`cd $(top_distdir) && pwd`; \
+       distdir=`cd $(distdir) && pwd`; \
+       cd $(top_srcdir) \
+         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign testsuite/Makefile
        @for file in $(DISTFILES); do \
-         if test -f $$file; then d=.; else d=$(srcdir); fi; \
+         d=$(srcdir); \
          if test -d $$d/$$file; then \
            cp -pr $$d/$$file $(distdir)/$$file; \
          else \
@@ -310,15 +302,62 @@ distdir: $(DISTFILES)
          fi; \
        done
 
+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-include $(DEP_FILES)
+
+mostlyclean-depend:
+
+clean-depend:
+
+distclean-depend:
+       -rm -rf .deps
+
+maintainer-clean-depend:
+
+%.o: %.c
+       @echo '$(COMPILE) -c $<'; \
+       $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+       @-cp .deps/$(*F).pp .deps/$(*F).P; \
+       tr ' ' '\012' < .deps/$(*F).pp \
+         | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+           >> .deps/$(*F).P; \
+       rm .deps/$(*F).pp
+
+%.lo: %.c
+       @echo '$(LTCOMPILE) -c $<'; \
+       $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+       @-sed -e 's/^\([^:]*\)\.o[      ]*:/\1.lo \1.o :/' \
+         < .deps/$(*F).pp > .deps/$(*F).P; \
+       tr ' ' '\012' < .deps/$(*F).pp \
+         | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+           >> .deps/$(*F).P; \
+       rm -f .deps/$(*F).pp
+
+%.o: %.cc
+       @echo '$(CXXCOMPILE) -c $<'; \
+       $(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+       @-cp .deps/$(*F).pp .deps/$(*F).P; \
+       tr ' ' '\012' < .deps/$(*F).pp \
+         | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+           >> .deps/$(*F).P; \
+       rm .deps/$(*F).pp
+
+%.lo: %.cc
+       @echo '$(LTCXXCOMPILE) -c $<'; \
+       $(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+       @-sed -e 's/^\([^:]*\)\.o[      ]*:/\1.lo \1.o :/' \
+         < .deps/$(*F).pp > .deps/$(*F).P; \
+       tr ' ' '\012' < .deps/$(*F).pp \
+         | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+           >> .deps/$(*F).P; \
+       rm -f .deps/$(*F).pp
+
 RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir
 
 check-DEJAGNU: site.exp
        srcdir=`cd $(srcdir) && pwd`; export srcdir; \
        EXPECT=$(EXPECT); export EXPECT; \
-       if [ -f $(top_builddir)/../expect/expect ]; then \
-         TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
-         export TCL_LIBRARY; \
-       fi; \
        runtest=$(RUNTEST); \
        if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
          $$runtest $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
@@ -340,20 +379,18 @@ 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:
 info: info-am
 dvi-am:
 dvi: dvi-am
-check-am:
+check-am: all-am
        $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
 check: check-am
 installcheck-am:
 installcheck: installcheck-am
-install-info-am: 
-install-info: install-info-am
 install-exec-am:
 install-exec: install-exec-am
 
@@ -382,27 +419,27 @@ distclean-generic:
 
 maintainer-clean-generic:
 mostlyclean-am:  mostlyclean-noinstPROGRAMS mostlyclean-compile \
-               mostlyclean-libtool mostlyclean-tags \
+               mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
                mostlyclean-generic
 
 mostlyclean: mostlyclean-am
 
 clean-am:  clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \
-               clean-generic mostlyclean-am
+               clean-depend clean-generic mostlyclean-am
 
 clean: clean-am
 
 distclean-am:  distclean-noinstPROGRAMS distclean-compile \
-               distclean-libtool distclean-tags distclean-generic \
-               clean-am
+               distclean-libtool distclean-tags distclean-depend \
+               distclean-generic clean-am
        -rm -f libtool
 
 distclean: distclean-am
 
 maintainer-clean-am:  maintainer-clean-noinstPROGRAMS \
                maintainer-clean-compile maintainer-clean-libtool \
-               maintainer-clean-tags maintainer-clean-generic \
-               distclean-am
+               maintainer-clean-tags maintainer-clean-depend \
+               maintainer-clean-generic distclean-am
        @echo "This command is intended for maintainers to use;"
        @echo "it deletes files that may require special tools to rebuild."
 
@@ -413,9 +450,10 @@ clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
 mostlyclean-compile distclean-compile clean-compile \
 maintainer-clean-compile mostlyclean-libtool distclean-libtool \
 clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir check-DEJAGNU \
-info-am info dvi-am dvi check check-am installcheck-am installcheck \
-install-info-am install-info install-exec-am install-exec \
+distclean-tags clean-tags maintainer-clean-tags distdir \
+mostlyclean-depend distclean-depend clean-depend \
+maintainer-clean-depend check-DEJAGNU info-am info dvi-am dvi check \
+check-am installcheck-am installcheck install-exec-am install-exec \
 install-data-am install-data install-am install uninstall-am uninstall \
 all-redirect all-am all installdirs mostlyclean-generic \
 distclean-generic clean-generic maintainer-clean-generic clean \
index 6dfdbfa6478ea9c846c0be6420eb320edf2c031e..10c300c853d1d0f1b708c26ff90463ede0fcea1b 100644 (file)
@@ -249,17 +249,21 @@ 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
+  // truncation did not occur by default before that point.
+  bool readelf_need_wide =
+    (system("readelf --help | grep -- --wide >/dev/null") == 0);
+
   ostringstream cmd;
-  cmd << "readelf -s -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;
+  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;