diff options
author | fche <fche@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-04 20:12:01 +0000 |
---|---|---|
committer | fche <fche@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-04 20:12:01 +0000 |
commit | 8981aed2e88666a3668271f54391f9266c4c80bb (patch) | |
tree | d248b4bcf141c1cec13d21a71e4945815f2ccb44 /libmudflap/testsuite | |
parent | cb05e3765b01db36c7d8dbd8536ebfe27ec39d1c (diff) | |
download | gcc-8981aed2e88666a3668271f54391f9266c4c80bb.tar.gz |
2004-06-04 Frank Ch. Eigler <fche@redhat.com>
Portability improvements, e.g., libmudflap/15293.
* configure.in: Look for glibc extension functions. Look for
support of -f{function,data}-sections. Look for more headers.
Create testsuite/mfconfig.exp. Correct more "test x.." thinkos.
* Makefile.am: Use $(SECTION_FLAGS). Collapse piecemeal-compiled
mf-hooks* into usual single object per source.
* mf-hooks*.c: Remove all #if WRAP_foo conditionals.
* mf-hooks2.c: #include a bunch more system headers. Define strnlen
if system doesn't provide one.
* mf-hooks3.c (struct pthread_info): Add stack_*_alloc fields.
(pthread_create): Use it to properly GC dead thread stacks.
* mf-runtime.c (__mf_violation): Correct snprintf type warning.
* testsuite/Makefile.am: Stop generating site.exp.
* testsuite/mfconfig.exp.in: New file.
* testsuite/config/default.exp: Load new mfconfig.exp.
* testsuite/lib/libmudflap.exp (libmudflap-init): Add extra libraries.
(prune_gcc_output): Add glibc static linking warnings.
* testsuite/libmudflap.*/*frags.exp: Enumerate needed -lmudflap* libs.
* testsuite/libmudflap.c/pass46-frag.c: Ditto.
* configure, Makefile, aclocal.m4, config.h.in, testsuite/Makefile.in:
Regenerated with autoconf 2.57 and automake 1.7.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82632 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libmudflap/testsuite')
-rw-r--r-- | libmudflap/testsuite/Makefile.am | 7 | ||||
-rw-r--r-- | libmudflap/testsuite/Makefile.in | 109 | ||||
-rw-r--r-- | libmudflap/testsuite/config/default.exp | 1 | ||||
-rw-r--r-- | libmudflap/testsuite/lib/libmudflap.exp | 15 | ||||
-rw-r--r-- | libmudflap/testsuite/libmudflap.c++/c++frags.exp | 2 | ||||
-rw-r--r-- | libmudflap/testsuite/libmudflap.c/cfrags.exp | 2 | ||||
-rw-r--r-- | libmudflap/testsuite/libmudflap.c/pass46-frag.c | 2 | ||||
-rw-r--r-- | libmudflap/testsuite/libmudflap.cth/cthfrags.exp | 2 | ||||
-rw-r--r-- | libmudflap/testsuite/mfconfig.exp.in | 4 |
9 files changed, 62 insertions, 82 deletions
diff --git a/libmudflap/testsuite/Makefile.am b/libmudflap/testsuite/Makefile.am index 11938e6cf65..a2c1e9f4ea3 100644 --- a/libmudflap/testsuite/Makefile.am +++ b/libmudflap/testsuite/Makefile.am @@ -9,10 +9,3 @@ EXPECT = `if [ -f ../../expect/expect ] ; then \ RUNTEST = `if [ -f ${srcdir}/../../dejagnu/runtest ] ; then \ echo ${srcdir}/../../dejagnu/runtest ; \ else echo runtest ; fi` - -all-local: site.exp -if LIBMUDFLAPTH - echo 'set libmudflapth 1' >> site.exp -else - echo 'set libmudflapth 0' >> site.exp -endif diff --git a/libmudflap/testsuite/Makefile.in b/libmudflap/testsuite/Makefile.in index 548dce0a41c..43afdbf371a 100644 --- a/libmudflap/testsuite/Makefile.in +++ b/libmudflap/testsuite/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.7.8 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -20,6 +21,7 @@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. + am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 @@ -36,21 +38,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -subdir = testsuite -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DEJATOOL = $(PACKAGE) -RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ @@ -99,6 +86,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +SECTION_FLAGS = @SECTION_FLAGS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -116,6 +104,7 @@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ +build_libmudflapth = @build_libmudflapth@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ @@ -136,7 +125,6 @@ libexecdir = @libexecdir@ libtool_VERSION = @libtool_VERSION@ localstatedir = @localstatedir@ mandir = @mandir@ -mkdir_p = @mkdir_p@ multi_basedir = @multi_basedir@ oldincludedir = @oldincludedir@ prefix = @prefix@ @@ -151,47 +139,35 @@ target_os = @target_os@ target_vendor = @target_vendor@ toolexecdir = @toolexecdir@ toolexeclibdir = @toolexeclibdir@ + AUTOMAKE_OPTIONS = foreign dejagnu + EXPECT = `if [ -f ../../expect/expect ] ; then \ echo ../../expect/expect ; \ else echo expect ; fi` + RUNTEST = `if [ -f ${srcdir}/../../dejagnu/runtest ] ; then \ echo ${srcdir}/../../dejagnu/runtest ; \ else echo runtest ; fi` +subdir = testsuite +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = mfconfig.exp +DIST_SOURCES = +DIST_COMMON = $(srcdir)/Makefile.in Makefile.am mfconfig.exp.in all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign testsuite/Makefile'; \ +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --foreign testsuite/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +mfconfig.exp: $(top_builddir)/config.status mfconfig.exp.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo @@ -208,6 +184,9 @@ TAGS: ctags: CTAGS CTAGS: +RUNTESTFLAGS = +DEJATOOL = $(PACKAGE) +RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir check-DEJAGNU: site.exp srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ @@ -244,6 +223,10 @@ distclean-DEJAGNU: -l='$(DEJATOOL)'; for tool in $$l; do \ rm -f $$tool.sum $$tool.log; \ done +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -257,7 +240,7 @@ distdir: $(DISTFILES) dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -275,7 +258,8 @@ distdir: $(DISTFILES) check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU check: check-am -all-am: Makefile all-local +all-am: Makefile + installdirs: install: install-am install-exec: install-exec-am @@ -288,7 +272,7 @@ install-am: all-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: @@ -314,8 +298,6 @@ dvi: dvi-am dvi-am: -html: html-am - info: info-am info-am: @@ -348,21 +330,16 @@ ps-am: uninstall-am: uninstall-info-am -.PHONY: all all-am all-local check check-DEJAGNU check-am clean \ - clean-generic clean-libtool distclean distclean-DEJAGNU \ - distclean-generic distclean-libtool distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am - - -all-local: site.exp -@LIBMUDFLAPTH_TRUE@ echo 'set libmudflapth 1' >> site.exp -@LIBMUDFLAPTH_FALSE@ echo 'set libmudflapth 0' >> site.exp +.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \ + clean-libtool distclean distclean-DEJAGNU distclean-generic \ + distclean-libtool distdir dvi dvi-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-info-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/libmudflap/testsuite/config/default.exp b/libmudflap/testsuite/config/default.exp index b19491c547c..0dafaa123d3 100644 --- a/libmudflap/testsuite/config/default.exp +++ b/libmudflap/testsuite/config/default.exp @@ -1,2 +1,3 @@ load_lib standard.exp load_lib libmudflap.exp +load_lib mfconfig.exp diff --git a/libmudflap/testsuite/lib/libmudflap.exp b/libmudflap/testsuite/lib/libmudflap.exp index 6f4b1550c0c..04a17209fd7 100644 --- a/libmudflap/testsuite/lib/libmudflap.exp +++ b/libmudflap/testsuite/lib/libmudflap.exp @@ -17,10 +17,10 @@ # Define libmudflap callbacks for dg.exp. # This file is a copy of libstdc++-v3's dejagnu driver, with minor changes. - load_lib mfdg.exp load_lib libgloss.exp + proc libmudflap-init { language } { global srcdir global outdir @@ -92,6 +92,10 @@ proc libmudflap-init { language } { } } + global mfconfig_libs + global add_flags + append add_flags " $mfconfig_libs" + verbose -log "ld_library_path=$ld_library_path" setenv LD_LIBRARY_PATH $ld_library_path setenv SHLIB_PATH $ld_library_path @@ -152,6 +156,9 @@ proc libmudflap-dg-test { prog do_what extra_tool_flags } { lappend options "additional_flags=$extra_tool_flags" } + global mfconfig_libs + lappend options "libs=$mfconfig_libs" + set comp_output [libmudflap_target_compile "$prog" "$output_file" "$compile_type" $options]; set comp_output [prune_gcc_output $comp_output ]; @@ -244,14 +251,12 @@ proc libmudflap-list-sourcefiles { } { proc prune_gcc_output { text } { - regsub -all {(^|\n)[^\n]*ld: warning: libgcc_s[^\n]*not found[^\n]*try using[^\n]*} $text "" text - regsub -all {(^|\n)[^\n]*In function.*pthread_create[^\n]*} $text "" text - regsub -all {(^|\n)[^\n]*the use of .pthread.*is deprecated[^\n]*} $text "" text - regsub -all {(^|\n)[^\n]*Dwarf Error:.*FORM value: 14[^\n]*} $text "" text + regsub -all {(^|\n)[^\n]*In function[^\n]*} $text "" text + regsub -all {(^|\n)[^\n]*Using.*in statically linked applications requires[^\n]*} $text "" text return $text } diff --git a/libmudflap/testsuite/libmudflap.c++/c++frags.exp b/libmudflap/testsuite/libmudflap.c++/c++frags.exp index 659494b3e00..43da3bdf56b 100644 --- a/libmudflap/testsuite/libmudflap.c++/c++frags.exp +++ b/libmudflap/testsuite/libmudflap.c++/c++frags.exp @@ -9,7 +9,7 @@ foreach flags [list {} {-static} {-O2} {-O3}] { foreach srcfile [lsort [glob -nocomplain ${srcdir}/libmudflap.c++/*.cxx]] { set bsrc [file tail $srcfile] setenv MUDFLAP_OPTIONS "-no-heur-proc-map -viol-segv" - dg-runtest $srcfile $flags "-fmudflap" + dg-runtest $srcfile $flags "-fmudflap -lmudflap" } } diff --git a/libmudflap/testsuite/libmudflap.c/cfrags.exp b/libmudflap/testsuite/libmudflap.c/cfrags.exp index 2d6132bf931..c29975c30fe 100644 --- a/libmudflap/testsuite/libmudflap.c/cfrags.exp +++ b/libmudflap/testsuite/libmudflap.c/cfrags.exp @@ -8,7 +8,7 @@ foreach flags [list {} {-static} {-O2} {-O3}] { foreach srcfile [lsort [glob -nocomplain ${srcdir}/libmudflap.c/*.c]] { set bsrc [file tail $srcfile] setenv MUDFLAP_OPTIONS "-viol-segv" - dg-runtest $srcfile $flags "-fmudflap" + dg-runtest $srcfile $flags "-fmudflap -lmudflap" } } diff --git a/libmudflap/testsuite/libmudflap.c/pass46-frag.c b/libmudflap/testsuite/libmudflap.c/pass46-frag.c index a1f24be1dc0..2f327891bc0 100644 --- a/libmudflap/testsuite/libmudflap.c/pass46-frag.c +++ b/libmudflap/testsuite/libmudflap.c/pass46-frag.c @@ -15,4 +15,4 @@ int main () int m = boo [l % 2 + 12]; /* should not be instrumented */ return m & strlen (""); /* a fancy way of saying "0" */ } -/* { dg-options "-fmudflap -fmudflapir -Wall" } */ +/* { dg-options "-fmudflap -fmudflapir -lmudflap -Wall" } */ diff --git a/libmudflap/testsuite/libmudflap.cth/cthfrags.exp b/libmudflap/testsuite/libmudflap.cth/cthfrags.exp index 3431965dd62..54dd2c34733 100644 --- a/libmudflap/testsuite/libmudflap.cth/cthfrags.exp +++ b/libmudflap/testsuite/libmudflap.cth/cthfrags.exp @@ -12,7 +12,7 @@ foreach flags [list {} {-static -DSTATIC} {-O2} {-O3}] { # --noinhibit-exec works around a ld problem that causes # "Dwarf Error: Invalid or unhandled FORM value: 14" # to fail builds unnecessarily. - dg-runtest $srcfile $flags "-fmudflapth -Wl,--noinhibit-exec" + dg-runtest $srcfile $flags "-fmudflapth -lmudflapth -lpthread -Wl,--noinhibit-exec" } else { if {$flags != ""} {set f " ($flags)"} {set f ""} untested "libmudflap.cth/$bsrc$f" diff --git a/libmudflap/testsuite/mfconfig.exp.in b/libmudflap/testsuite/mfconfig.exp.in new file mode 100644 index 00000000000..bed16542cad --- /dev/null +++ b/libmudflap/testsuite/mfconfig.exp.in @@ -0,0 +1,4 @@ +global mfconfig_libs +set mfconfig_libs "@LIBS@" +global libmudflapth +set libmudflapth "@build_libmudflapth@" |