Makefile.def (target_modules): Remove libmudflap

* Makefile.def (target_modules): Remove libmudflap
	(languages): Remove check-target-libmudflap).
	* Makefile.in: Rebuilt.
	* Makefile.tpl (check-target-libmudflap-c++): Remove.
	* configure.ac (target_libraries): Remove target-libmudflap.
	Remove checks which disabled libmudflap on some systems.
	* configure: Rebuilt.
	* libmudflap: Directory removed.

	* Makefile.in (C_COMMON_OBJS): Remove tree-mudflap.
	(OBJS): Remove tree-nomudflap.o
	(GTFILES): Remove tree-mudflap.c
	* builtins.c (expand_builtin_alloc): Remove mudflap support.
	* gcc.c (MFWRAP_SPEC, MFLIB_SPEC): Likewise.
	(mfwrap_spec, mflib_spec): Likewise.
	(cpp_unique_options, cc1_options, static_specs): Likewise.
	* gimplify (gimplify_vla_decl, build_va_arg_indirect_ref): Likewise.
	* passes.def: Likewise.
	* toplev.c (compile_file, process_options): Likewise.
	* tree-inline.c (copy_tree_r): Likewise.
	* tree-pass.,h (make_pass_mudflap_1, make_pass_mudflap_2): Likewise.
	* varasm.c (make_decl_rtl, make_decl_rtl_for_debug): Likewise.
	(build_constant_desc, output_constant_def_contents): Likewise.
	(categorize_decl_for_section): Likewise.
	* tree-mudflap.c: Removed.
	* tree-mudflap.h: Removed.
	* tree-nomudflap.c: Removed.
	* bfin/uclinux.h (MFWRAP_SPEC): Remove.
	* moxie/uclinux.h (MFWRAP_SPEC): Likewise.
	* rs6000/aix.h (MFWRAP_SPEC, MFLIB_SPEC): Likewise.
	* config/sol2.h (MFLIB_SPEC): Likewise.
	* doc/install.texi: Remove mudflap references.
	* doc/passes.texi: Similarly.
	* doc/sourcebuild.texi: Similarly.
	* doc/invoke.texi: Remove mudlfap related options.

	* c-family/c-common.c (c_define_builtins): Remove mudflap support.
	* c-family/c.opt: Ignore and warn for mudflap options.

	* g++.dg/torture/pr49309.C: Removed.
	* gcc.dg/dfp/pr35739.c: Removed.

From-SVN: r204090
This commit is contained in:
Jeff Law 2013-10-26 04:14:34 -06:00 committed by Jeff Law
parent 19b632c6dd
commit 98906124e3
178 changed files with 70 additions and 31750 deletions

View file

@ -1,3 +1,14 @@
2013-10-26 Jeff Law <law@redhat.com>
* Makefile.def (target_modules): Remove libmudflap
(languages): Remove check-target-libmudflap).
* Makefile.in: Rebuilt.
* Makefile.tpl (check-target-libmudflap-c++): Remove.
* configure.ac (target_libraries): Remove target-libmudflap.
Remove checks which disabled libmudflap on some systems.
* configure: Rebuilt.
* libmudflap: Directory removed.
2013-10-21 Cong Hou <congh@google.com>
* MAINTAINERS (Write After Approval): Add myself.

View file

@ -239,7 +239,6 @@ tree-ssa Diego Novillo dnovillo@google.com
tree-ssa Andrew MacLeod amacleod@redhat.com
PRE Daniel Berlin dberlin@dberlin.org
code sinking Daniel Berlin dberlin@dberlin.org
mudflap Frank Ch. Eigler fche@redhat.com
tree browser/unparser Sebastian Pop sebastian.pop@amd.com
scev, data dependence Daniel Berlin dberlin@dberlin.org
scev, data dependence Sebastian Pop sebastian.pop@amd.com

View file

@ -117,7 +117,6 @@ target_modules = { module= libstdc++-v3;
bootstrap=true;
lib_path=src/.libs;
raw_cxx=true; };
target_modules = { module= libmudflap; lib_path=.libs; };
target_modules = { module= libsanitizer;
bootstrap=true;
lib_path=.libs;
@ -551,7 +550,6 @@ dependencies = { module=configure-target-libgfortran; on=all-target-libquadmath;
languages = { language=c; gcc-check-target=check-gcc; };
languages = { language=c++; gcc-check-target=check-c++;
lib-check-target=check-target-libstdc++-v3;
lib-check-target=check-target-libmudflap-c++;
lib-check-target=check-target-libitm-c++;
lib-check-target=check-target-libgomp-c++; };
languages = { language=fortran; gcc-check-target=check-fortran;

View file

@ -575,16 +575,12 @@ all:
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that programs built for the target machine work.
TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
@if target-libstdc++-v3
TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
@endif target-libstdc++-v3
@if target-libmudflap
TARGET_LIB_PATH_libmudflap = $$r/$(TARGET_SUBDIR)/libmudflap/.libs:
@endif target-libmudflap
@if target-libsanitizer
TARGET_LIB_PATH_libsanitizer = $$r/$(TARGET_SUBDIR)/libsanitizer/.libs:
@endif target-libsanitizer
@ -927,7 +923,6 @@ configure-host: \
.PHONY: configure-target
configure-target: \
maybe-configure-target-libstdc++-v3 \
maybe-configure-target-libmudflap \
maybe-configure-target-libsanitizer \
maybe-configure-target-libvtv \
maybe-configure-target-libssp \
@ -1077,7 +1072,6 @@ all-host: maybe-all-lto-plugin
@if target-libstdc++-v3-no-bootstrap
all-target: maybe-all-target-libstdc++-v3
@endif target-libstdc++-v3-no-bootstrap
all-target: maybe-all-target-libmudflap
@if target-libsanitizer-no-bootstrap
all-target: maybe-all-target-libsanitizer
@endif target-libsanitizer-no-bootstrap
@ -1173,7 +1167,6 @@ info-host: maybe-info-lto-plugin
.PHONY: info-target
info-target: maybe-info-target-libstdc++-v3
info-target: maybe-info-target-libmudflap
info-target: maybe-info-target-libsanitizer
info-target: maybe-info-target-libvtv
info-target: maybe-info-target-libssp
@ -1256,7 +1249,6 @@ dvi-host: maybe-dvi-lto-plugin
.PHONY: dvi-target
dvi-target: maybe-dvi-target-libstdc++-v3
dvi-target: maybe-dvi-target-libmudflap
dvi-target: maybe-dvi-target-libsanitizer
dvi-target: maybe-dvi-target-libvtv
dvi-target: maybe-dvi-target-libssp
@ -1339,7 +1331,6 @@ pdf-host: maybe-pdf-lto-plugin
.PHONY: pdf-target
pdf-target: maybe-pdf-target-libstdc++-v3
pdf-target: maybe-pdf-target-libmudflap
pdf-target: maybe-pdf-target-libsanitizer
pdf-target: maybe-pdf-target-libvtv
pdf-target: maybe-pdf-target-libssp
@ -1422,7 +1413,6 @@ html-host: maybe-html-lto-plugin
.PHONY: html-target
html-target: maybe-html-target-libstdc++-v3
html-target: maybe-html-target-libmudflap
html-target: maybe-html-target-libsanitizer
html-target: maybe-html-target-libvtv
html-target: maybe-html-target-libssp
@ -1505,7 +1495,6 @@ TAGS-host: maybe-TAGS-lto-plugin
.PHONY: TAGS-target
TAGS-target: maybe-TAGS-target-libstdc++-v3
TAGS-target: maybe-TAGS-target-libmudflap
TAGS-target: maybe-TAGS-target-libsanitizer
TAGS-target: maybe-TAGS-target-libvtv
TAGS-target: maybe-TAGS-target-libssp
@ -1588,7 +1577,6 @@ install-info-host: maybe-install-info-lto-plugin
.PHONY: install-info-target
install-info-target: maybe-install-info-target-libstdc++-v3
install-info-target: maybe-install-info-target-libmudflap
install-info-target: maybe-install-info-target-libsanitizer
install-info-target: maybe-install-info-target-libvtv
install-info-target: maybe-install-info-target-libssp
@ -1671,7 +1659,6 @@ install-pdf-host: maybe-install-pdf-lto-plugin
.PHONY: install-pdf-target
install-pdf-target: maybe-install-pdf-target-libstdc++-v3
install-pdf-target: maybe-install-pdf-target-libmudflap
install-pdf-target: maybe-install-pdf-target-libsanitizer
install-pdf-target: maybe-install-pdf-target-libvtv
install-pdf-target: maybe-install-pdf-target-libssp
@ -1754,7 +1741,6 @@ install-html-host: maybe-install-html-lto-plugin
.PHONY: install-html-target
install-html-target: maybe-install-html-target-libstdc++-v3
install-html-target: maybe-install-html-target-libmudflap
install-html-target: maybe-install-html-target-libsanitizer
install-html-target: maybe-install-html-target-libvtv
install-html-target: maybe-install-html-target-libssp
@ -1837,7 +1823,6 @@ installcheck-host: maybe-installcheck-lto-plugin
.PHONY: installcheck-target
installcheck-target: maybe-installcheck-target-libstdc++-v3
installcheck-target: maybe-installcheck-target-libmudflap
installcheck-target: maybe-installcheck-target-libsanitizer
installcheck-target: maybe-installcheck-target-libvtv
installcheck-target: maybe-installcheck-target-libssp
@ -1920,7 +1905,6 @@ mostlyclean-host: maybe-mostlyclean-lto-plugin
.PHONY: mostlyclean-target
mostlyclean-target: maybe-mostlyclean-target-libstdc++-v3
mostlyclean-target: maybe-mostlyclean-target-libmudflap
mostlyclean-target: maybe-mostlyclean-target-libsanitizer
mostlyclean-target: maybe-mostlyclean-target-libvtv
mostlyclean-target: maybe-mostlyclean-target-libssp
@ -2003,7 +1987,6 @@ clean-host: maybe-clean-lto-plugin
.PHONY: clean-target
clean-target: maybe-clean-target-libstdc++-v3
clean-target: maybe-clean-target-libmudflap
clean-target: maybe-clean-target-libsanitizer
clean-target: maybe-clean-target-libvtv
clean-target: maybe-clean-target-libssp
@ -2086,7 +2069,6 @@ distclean-host: maybe-distclean-lto-plugin
.PHONY: distclean-target
distclean-target: maybe-distclean-target-libstdc++-v3
distclean-target: maybe-distclean-target-libmudflap
distclean-target: maybe-distclean-target-libsanitizer
distclean-target: maybe-distclean-target-libvtv
distclean-target: maybe-distclean-target-libssp
@ -2169,7 +2151,6 @@ maintainer-clean-host: maybe-maintainer-clean-lto-plugin
.PHONY: maintainer-clean-target
maintainer-clean-target: maybe-maintainer-clean-target-libstdc++-v3
maintainer-clean-target: maybe-maintainer-clean-target-libmudflap
maintainer-clean-target: maybe-maintainer-clean-target-libsanitizer
maintainer-clean-target: maybe-maintainer-clean-target-libvtv
maintainer-clean-target: maybe-maintainer-clean-target-libssp
@ -2307,7 +2288,6 @@ check-host: \
.PHONY: check-target
check-target: \
maybe-check-target-libstdc++-v3 \
maybe-check-target-libmudflap \
maybe-check-target-libsanitizer \
maybe-check-target-libvtv \
maybe-check-target-libssp \
@ -2463,7 +2443,6 @@ install-host: \
.PHONY: install-target
install-target: \
maybe-install-target-libstdc++-v3 \
maybe-install-target-libmudflap \
maybe-install-target-libsanitizer \
maybe-install-target-libvtv \
maybe-install-target-libssp \
@ -2566,7 +2545,6 @@ install-strip-host: \
.PHONY: install-strip-target
install-strip-target: \
maybe-install-strip-target-libstdc++-v3 \
maybe-install-strip-target-libmudflap \
maybe-install-strip-target-libsanitizer \
maybe-install-strip-target-libvtv \
maybe-install-strip-target-libssp \
@ -31745,463 +31723,6 @@ maintainer-clean-target-libstdc++-v3:
.PHONY: configure-target-libmudflap maybe-configure-target-libmudflap
maybe-configure-target-libmudflap:
@if gcc-bootstrap
configure-target-libmudflap: stage_current
@endif gcc-bootstrap
@if target-libmudflap
maybe-configure-target-libmudflap: configure-target-libmudflap
configure-target-libmudflap:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libmudflap..."; \
$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmudflap ; \
$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmudflap/multilib.tmp 2> /dev/null ; \
if test -r $(TARGET_SUBDIR)/libmudflap/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libmudflap/multilib.tmp $(TARGET_SUBDIR)/libmudflap/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libmudflap/multilib.tmp; \
else \
rm -f $(TARGET_SUBDIR)/libmudflap/Makefile; \
mv $(TARGET_SUBDIR)/libmudflap/multilib.tmp $(TARGET_SUBDIR)/libmudflap/multilib.out; \
fi; \
else \
mv $(TARGET_SUBDIR)/libmudflap/multilib.tmp $(TARGET_SUBDIR)/libmudflap/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libmudflap/Makefile || exit 0; \
$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmudflap ; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libmudflap; \
cd "$(TARGET_SUBDIR)/libmudflap" || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libmudflap/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
srcdiroption="--srcdir=$${topdir}/libmudflap"; \
libsrcdir="$$s/libmudflap"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-libmudflap
.PHONY: all-target-libmudflap maybe-all-target-libmudflap
maybe-all-target-libmudflap:
@if gcc-bootstrap
all-target-libmudflap: stage_current
@endif gcc-bootstrap
@if target-libmudflap
TARGET-target-libmudflap=all
maybe-all-target-libmudflap: all-target-libmudflap
all-target-libmudflap: configure-target-libmudflap
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-libmudflap))
@endif target-libmudflap
.PHONY: check-target-libmudflap maybe-check-target-libmudflap
maybe-check-target-libmudflap:
@if target-libmudflap
maybe-check-target-libmudflap: check-target-libmudflap
check-target-libmudflap:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check)
@endif target-libmudflap
.PHONY: install-target-libmudflap maybe-install-target-libmudflap
maybe-install-target-libmudflap:
@if target-libmudflap
maybe-install-target-libmudflap: install-target-libmudflap
install-target-libmudflap: installdirs
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@endif target-libmudflap
.PHONY: install-strip-target-libmudflap maybe-install-strip-target-libmudflap
maybe-install-strip-target-libmudflap:
@if target-libmudflap
maybe-install-strip-target-libmudflap: install-strip-target-libmudflap
install-strip-target-libmudflap: installdirs
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
@endif target-libmudflap
# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-libmudflap info-target-libmudflap
maybe-info-target-libmudflap:
@if target-libmudflap
maybe-info-target-libmudflap: info-target-libmudflap
info-target-libmudflap: \
configure-target-libmudflap
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/libmudflap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
info) \
|| exit 1
@endif target-libmudflap
.PHONY: maybe-dvi-target-libmudflap dvi-target-libmudflap
maybe-dvi-target-libmudflap:
@if target-libmudflap
maybe-dvi-target-libmudflap: dvi-target-libmudflap
dvi-target-libmudflap: \
configure-target-libmudflap
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/libmudflap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
dvi) \
|| exit 1
@endif target-libmudflap
.PHONY: maybe-pdf-target-libmudflap pdf-target-libmudflap
maybe-pdf-target-libmudflap:
@if target-libmudflap
maybe-pdf-target-libmudflap: pdf-target-libmudflap
pdf-target-libmudflap: \
configure-target-libmudflap
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing pdf in $(TARGET_SUBDIR)/libmudflap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
pdf) \
|| exit 1
@endif target-libmudflap
.PHONY: maybe-html-target-libmudflap html-target-libmudflap
maybe-html-target-libmudflap:
@if target-libmudflap
maybe-html-target-libmudflap: html-target-libmudflap
html-target-libmudflap: \
configure-target-libmudflap
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing html in $(TARGET_SUBDIR)/libmudflap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
html) \
|| exit 1
@endif target-libmudflap
.PHONY: maybe-TAGS-target-libmudflap TAGS-target-libmudflap
maybe-TAGS-target-libmudflap:
@if target-libmudflap
maybe-TAGS-target-libmudflap: TAGS-target-libmudflap
TAGS-target-libmudflap: \
configure-target-libmudflap
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/libmudflap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
TAGS) \
|| exit 1
@endif target-libmudflap
.PHONY: maybe-install-info-target-libmudflap install-info-target-libmudflap
maybe-install-info-target-libmudflap:
@if target-libmudflap
maybe-install-info-target-libmudflap: install-info-target-libmudflap
install-info-target-libmudflap: \
configure-target-libmudflap \
info-target-libmudflap
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing install-info in $(TARGET_SUBDIR)/libmudflap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
install-info) \
|| exit 1
@endif target-libmudflap
.PHONY: maybe-install-pdf-target-libmudflap install-pdf-target-libmudflap
maybe-install-pdf-target-libmudflap:
@if target-libmudflap
maybe-install-pdf-target-libmudflap: install-pdf-target-libmudflap
install-pdf-target-libmudflap: \
configure-target-libmudflap \
pdf-target-libmudflap
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing install-pdf in $(TARGET_SUBDIR)/libmudflap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
install-pdf) \
|| exit 1
@endif target-libmudflap
.PHONY: maybe-install-html-target-libmudflap install-html-target-libmudflap
maybe-install-html-target-libmudflap:
@if target-libmudflap
maybe-install-html-target-libmudflap: install-html-target-libmudflap
install-html-target-libmudflap: \
configure-target-libmudflap \
html-target-libmudflap
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing install-html in $(TARGET_SUBDIR)/libmudflap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
install-html) \
|| exit 1
@endif target-libmudflap
.PHONY: maybe-installcheck-target-libmudflap installcheck-target-libmudflap
maybe-installcheck-target-libmudflap:
@if target-libmudflap
maybe-installcheck-target-libmudflap: installcheck-target-libmudflap
installcheck-target-libmudflap: \
configure-target-libmudflap
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/libmudflap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
installcheck) \
|| exit 1
@endif target-libmudflap
.PHONY: maybe-mostlyclean-target-libmudflap mostlyclean-target-libmudflap
maybe-mostlyclean-target-libmudflap:
@if target-libmudflap
maybe-mostlyclean-target-libmudflap: mostlyclean-target-libmudflap
mostlyclean-target-libmudflap:
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing mostlyclean in $(TARGET_SUBDIR)/libmudflap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
mostlyclean) \
|| exit 1
@endif target-libmudflap
.PHONY: maybe-clean-target-libmudflap clean-target-libmudflap
maybe-clean-target-libmudflap:
@if target-libmudflap
maybe-clean-target-libmudflap: clean-target-libmudflap
clean-target-libmudflap:
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing clean in $(TARGET_SUBDIR)/libmudflap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
clean) \
|| exit 1
@endif target-libmudflap
.PHONY: maybe-distclean-target-libmudflap distclean-target-libmudflap
maybe-distclean-target-libmudflap:
@if target-libmudflap
maybe-distclean-target-libmudflap: distclean-target-libmudflap
distclean-target-libmudflap:
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing distclean in $(TARGET_SUBDIR)/libmudflap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
distclean) \
|| exit 1
@endif target-libmudflap
.PHONY: maybe-maintainer-clean-target-libmudflap maintainer-clean-target-libmudflap
maybe-maintainer-clean-target-libmudflap:
@if target-libmudflap
maybe-maintainer-clean-target-libmudflap: maintainer-clean-target-libmudflap
maintainer-clean-target-libmudflap:
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libmudflap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libmudflap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
maintainer-clean) \
|| exit 1
@endif target-libmudflap
.PHONY: configure-target-libsanitizer maybe-configure-target-libsanitizer
maybe-configure-target-libsanitizer:
@if gcc-bootstrap
@ -44237,13 +43758,6 @@ maintainer-clean-target-libatomic:
@if target-libmudflap
.PHONY: check-target-libmudflap-c++
check-target-libmudflap-c++:
$(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++frags.exp" check-target-libmudflap
@endif target-libmudflap
@if target-libgomp
.PHONY: check-target-libgomp-c++
check-target-libgomp-c++:
@ -44292,7 +43806,7 @@ check-gcc-c++:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++);
check-c++: check-gcc-c++ check-target-libstdc++-v3 check-target-libmudflap-c++ check-target-libitm-c++ check-target-libgomp-c++
check-c++: check-gcc-c++ check-target-libstdc++-v3 check-target-libitm-c++ check-target-libgomp-c++
.PHONY: check-gcc-fortran check-fortran
check-gcc-fortran:
@ -46375,7 +45889,6 @@ configure-stage3-target-libstdc++-v3: maybe-all-stage3-gcc
configure-stage4-target-libstdc++-v3: maybe-all-stage4-gcc
configure-stageprofile-target-libstdc++-v3: maybe-all-stageprofile-gcc
configure-stagefeedback-target-libstdc++-v3: maybe-all-stagefeedback-gcc
configure-target-libmudflap: stage_last
configure-stage1-target-libsanitizer: maybe-all-stage1-gcc
configure-stage2-target-libsanitizer: maybe-all-stage2-gcc
configure-stage3-target-libsanitizer: maybe-all-stage3-gcc
@ -46422,7 +45935,6 @@ configure-target-libatomic: stage_last
@if gcc-no-bootstrap
configure-target-libstdc++-v3: maybe-all-gcc
configure-target-libmudflap: maybe-all-gcc
configure-target-libsanitizer: maybe-all-gcc
configure-target-libvtv: maybe-all-gcc
configure-target-libssp: maybe-all-gcc
@ -47268,7 +46780,6 @@ configure-stagefeedback-target-libgomp: maybe-all-stagefeedback-target-libgcc
@if gcc-no-bootstrap
configure-target-libstdc++-v3: maybe-all-target-libgcc
configure-target-libmudflap: maybe-all-target-libgcc
configure-target-libsanitizer: maybe-all-target-libgcc
configure-target-libvtv: maybe-all-target-libgcc
configure-target-libssp: maybe-all-target-libgcc
@ -47295,8 +46806,6 @@ configure-target-libatomic: maybe-all-target-libgcc
configure-target-libstdc++-v3: maybe-all-target-newlib maybe-all-target-libgloss
configure-target-libmudflap: maybe-all-target-newlib maybe-all-target-libgloss
configure-target-libsanitizer: maybe-all-target-newlib maybe-all-target-libgloss
configure-target-libvtv: maybe-all-target-newlib maybe-all-target-libgloss

View file

@ -1404,13 +1404,6 @@ ENDIF raw_cxx +]
[+ ENDFOR recursive_targets +]
[+ ENDFOR target_modules +]
@if target-libmudflap
.PHONY: check-target-libmudflap-c++
check-target-libmudflap-c++:
$(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++frags.exp" check-target-libmudflap
@endif target-libmudflap
@if target-libgomp
.PHONY: check-target-libgomp-c++
check-target-libgomp-c++:

17
configure vendored
View file

@ -2775,7 +2775,6 @@ target_libraries="target-libgcc \
target-libatomic \
target-libitm \
target-libstdc++-v3 \
target-libmudflap \
target-libsanitizer \
target-libvtv \
target-libssp \
@ -3128,22 +3127,6 @@ if test x$enable_static_libjava != xyes ; then
fi
# Disable libmudflap on some systems.
if test x$enable_libmudflap = x ; then
case "${target}" in
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | bfin*-*-uclinux* | *-*-kopensolaris*-gnu)
# Enable libmudflap by default in GNU and friends.
;;
*-*-freebsd*)
# Enable libmudflap by default in FreeBSD.
;;
*)
# Disable it by default everywhere else.
noconfigdirs="$noconfigdirs target-libmudflap"
;;
esac
fi
# Disable libgomp on non POSIX hosted systems.
if test x$enable_libgomp = x ; then
# Enable libgomp by default on hosted POSIX systems.

View file

@ -159,7 +159,6 @@ target_libraries="target-libgcc \
target-libatomic \
target-libitm \
target-libstdc++-v3 \
target-libmudflap \
target-libsanitizer \
target-libvtv \
target-libssp \
@ -473,22 +472,6 @@ if test x$enable_static_libjava != xyes ; then
fi
AC_SUBST(EXTRA_CONFIGARGS_LIBJAVA)
# Disable libmudflap on some systems.
if test x$enable_libmudflap = x ; then
case "${target}" in
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | bfin*-*-uclinux* | *-*-kopensolaris*-gnu)
# Enable libmudflap by default in GNU and friends.
;;
*-*-freebsd*)
# Enable libmudflap by default in FreeBSD.
;;
*)
# Disable it by default everywhere else.
noconfigdirs="$noconfigdirs target-libmudflap"
;;
esac
fi
# Disable libgomp on non POSIX hosted systems.
if test x$enable_libgomp = x ; then
# Enable libgomp by default on hosted POSIX systems.

View file

@ -1,3 +1,32 @@
2013-10-26 Jeff Law <law@redhat.com>
* Makefile.in (C_COMMON_OBJS): Remove tree-mudflap.
(OBJS): Remove tree-nomudflap.o
(GTFILES): Remove tree-mudflap.c
* builtins.c (expand_builtin_alloc): Remove mudflap support.
* gcc.c (MFWRAP_SPEC, MFLIB_SPEC): Likewise.
(mfwrap_spec, mflib_spec): Likewise.
(cpp_unique_options, cc1_options, static_specs): Likewise.
* gimplify (gimplify_vla_decl, build_va_arg_indirect_ref): Likewise.
* passes.def: Likewise.
* toplev.c (compile_file, process_options): Likewise.
* tree-inline.c (copy_tree_r): Likewise.
* tree-pass.,h (make_pass_mudflap_1, make_pass_mudflap_2): Likewise.
* varasm.c (make_decl_rtl, make_decl_rtl_for_debug): Likewise.
(build_constant_desc, output_constant_def_contents): Likewise.
(categorize_decl_for_section): Likewise.
* tree-mudflap.c: Removed.
* tree-mudflap.h: Removed.
* tree-nomudflap.c: Removed.
* bfin/uclinux.h (MFWRAP_SPEC): Remove.
* moxie/uclinux.h (MFWRAP_SPEC): Likewise.
* rs6000/aix.h (MFWRAP_SPEC, MFLIB_SPEC): Likewise.
* config/sol2.h (MFLIB_SPEC): Likewise.
* doc/install.texi: Remove mudflap references.
* doc/passes.texi: Similarly.
* doc/sourcebuild.texi: Similarly.
* doc/invoke.texi: Remove mudlfap related options.
2013-10-25 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/58759

View file

@ -1132,14 +1132,11 @@ GCC_OBJS = gcc.o ggc-none.o
c-family-warn = $(STRICT_WARN)
# Language-specific object files shared by all C-family front ends.
# FIXME: tree-mudflap is C-family only, but it is also part of the middle-end.
# The mudflap machinery should be properly separated from the front ends, and
# perhaps turned into a plugin.
C_COMMON_OBJS = c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o \
c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o \
c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o \
c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o \
c-family/c-semantics.o c-family/c-ada-spec.o tree-mudflap.o \
c-family/c-semantics.o c-family/c-ada-spec.o \
c-family/array-notation-common.o c-family/c-ubsan.o
# Language-independent object files.
@ -1388,7 +1385,6 @@ OBJS = \
tree-iterator.o \
tree-loop-distribution.o \
tree-nested.o \
tree-nomudflap.o \
tree-nrv.o \
tree-object-size.o \
tree-outof-ssa.o \
@ -2252,7 +2248,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
$(srcdir)/sdbout.c $(srcdir)/stor-layout.c \
$(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \
$(srcdir)/gimple.h \
$(srcdir)/tree-mudflap.c $(srcdir)/gimple-ssa.h \
$(srcdir)/gimple-ssa.h \
$(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c $(srcdir)/tree-ssa-address.c \
$(srcdir)/tree-cfg.c \
$(srcdir)/tree-dfa.c \

View file

@ -4362,10 +4362,6 @@ expand_builtin_alloca (tree exp, bool cannot_accumulate)
bool alloca_with_align = (DECL_FUNCTION_CODE (get_callee_fndecl (exp))
== BUILT_IN_ALLOCA_WITH_ALIGN);
/* Emit normal call if we use mudflap. */
if (flag_mudflap)
return NULL_RTX;
valid_arglist
= (alloca_with_align
? validate_arglist (exp, INTEGER_TYPE, INTEGER_TYPE, VOID_TYPE)

View file

@ -1,3 +1,8 @@
2013-10-26 Jeff Law <law@redhat.com>
* c-family/c-common.c (c_define_builtins): Remove mudflap support.
* c-family/c.opt: Ignore and warn for mudflap options.
2013-10-24 Tobias Burnus <burnus@net-b.de>
PR other/33426

View file

@ -39,7 +39,6 @@ along with GCC; see the file COPYING3. If not see
#include "diagnostic.h"
#include "tree-iterator.h"
#include "hashtab.h"
#include "tree-mudflap.h"
#include "opts.h"
#include "cgraph.h"
#include "target-def.h"
@ -5220,9 +5219,6 @@ c_define_builtins (tree va_list_ref_type_node, tree va_list_arg_type_node)
targetm.init_builtins ();
build_common_builtin_nodes ();
if (flag_mudflap)
mudflap_init ();
}
/* Like get_identifier, but avoid warnings about null arguments when

View file

@ -538,8 +538,7 @@ C ObjC Var(warn_missing_prototypes) Warning
Warn about global functions without prototypes
Wmudflap
C ObjC C++ ObjC++ Var(warn_mudflap) Init(1) Warning
Warn about constructs not instrumented by -fmudflap
C ObjC C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
Wmultichar
C ObjC C++ ObjC++ Warning
@ -997,16 +996,13 @@ C ObjC C++ ObjC++ Var(flag_ms_extensions)
Don't warn about uses of Microsoft extensions
fmudflap
C ObjC C++ ObjC++ RejectNegative Report Var(flag_mudflap)
Add mudflap bounds-checking instrumentation for single-threaded program
C ObjC C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
fmudflapth
C ObjC C++ ObjC++ RejectNegative Report Var(flag_mudflap,2)
Add mudflap bounds-checking instrumentation for multi-threaded program
C ObjC C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
fmudflapir
C ObjC C++ ObjC++ RejectNegative Report Var(flag_mudflap_ignore_reads)
Ignore read operations when inserting mudflap instrumentation
C ObjC C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
fname-mangling-version-
C++ ObjC++ Joined Ignore Warn(switch %qs is no longer supported)

View file

@ -32,14 +32,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
%{mfast-fp:-lbffastfp} %G %L %{mfast-fp:-lbffastfp} %G \
"
/* Like the definition in gcc.c, but for purposes of uClinux, every link is
static. */
#define MFWRAP_SPEC " %{fmudflap|fmudflapth: \
--wrap=malloc --wrap=free --wrap=calloc --wrap=realloc\
--wrap=mmap --wrap=munmap --wrap=alloca\
%{fmudflapth: --wrap=pthread_create\
}} %{fmudflap|fmudflapth: --wrap=main}"
#undef TARGET_SUPPORTS_SYNC_CALLS
#define TARGET_SUPPORTS_SYNC_CALLS 1

View file

@ -30,13 +30,5 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define TARGET_OS_CPP_BUILTINS() GNU_USER_TARGET_OS_CPP_BUILTINS()
/* Like the definition in gcc.c, but for purposes of uClinux, every link is
static. */
#define MFWRAP_SPEC " %{fmudflap|fmudflapth: \
--wrap=malloc --wrap=free --wrap=calloc --wrap=realloc\
--wrap=mmap --wrap=munmap --wrap=alloca\
%{fmudflapth: --wrap=pthread_create\
}} %{fmudflap|fmudflapth: --wrap=main}"
#undef TARGET_LIBC_HAS_FUNCTION
#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function

View file

@ -66,30 +66,6 @@
/* Because of the above, we must have gcc search itself to find libgcc.a. */
#define LINK_LIBGCC_SPECIAL_1
#define MFWRAP_SPEC " %{static: %{fmudflap|fmudflapth: \
-brename:malloc,__wrap_malloc -brename:__real_malloc,malloc \
-brename:free,__wrap_free -brename:__real_free,free \
-brename:calloc,__wrap_calloc -brename:__real_calloc,calloc \
-brename:realloc,__wrap_realloc -brename:__real_realloc,realloc \
-brename:mmap,__wrap_mmap -brename:__real_mmap,mmap \
-brename:munmap,__wrap_munmap -brename:__real_munmap,munmap \
-brename:alloca,__wrap_alloca -brename:__real_alloca,alloca \
} %{fmudflapth: \
-brename:pthread_create,__wrap_pthread_create \
-brename:__real_pthread_create,pthread_create \
-brename:pthread_join,__wrap_pthread_join \
-brename:__real_pthread_join,pthread_join \
-brename:pthread_exit,__wrap_pthread_exit \
-brename:__real_pthread_exit,pthread_exit \
}} %{fmudflap|fmudflapth: \
-brename:main,__wrap_main -brename:__real_main,main \
}"
#define MFLIB_SPEC " %{fmudflap: -lmudflap \
%{static:%(link_gcc_c_sequence) -lmudflap}} \
%{fmudflapth: -lmudflapth -lpthread \
%{static:%(link_gcc_c_sequence) -lmudflapth}} "
/* Names to predefine in the preprocessor for this target machine. */
#define TARGET_OS_AIX_CPP_BUILTINS() \
do \

View file

@ -194,11 +194,6 @@ along with GCC; see the file COPYING3. If not see
#endif /* HAVE_LD_EH_FRAME && TARGET_DL_ITERATE_PHDR */
#endif
#ifndef USE_GLD
/* The default MFLIB_SPEC is GNU ld specific. */
#define MFLIB_SPEC ""
#endif
/* collect2.c can only parse GNU nm -n output. Solaris nm needs -png to
produce the same format. */
#define NM_FLAGS "-png"

View file

@ -1391,7 +1391,7 @@ addition, @samp{libstdc++}'s include files will be installed into
@option{--with-gxx-include-dir=@var{dirname}}. Using this option is
particularly useful if you intend to use several versions of GCC in
parallel. This is currently supported by @samp{libgfortran},
@samp{libjava}, @samp{libmudflap}, @samp{libstdc++}, and @samp{libobjc}.
@samp{libjava}, @samp{libstdc++}, and @samp{libobjc}.
@item --enable-languages=@var{lang1},@var{lang2},@dots{}
Specify that only a particular subset of compilers and

View file

@ -256,7 +256,6 @@ Objective-C and Objective-C++ Dialects}.
-Wlogical-op -Wlong-long @gol
-Wmain -Wmaybe-uninitialized -Wmissing-braces -Wmissing-field-initializers @gol
-Wmissing-include-dirs @gol
-Wno-mudflap @gol
-Wno-multichar -Wnonnull -Wno-overflow @gol
-Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol
-Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
@ -308,7 +307,7 @@ Objective-C and Objective-C++ Dialects}.
-fdump-tree-ch @gol
-fdump-tree-ssa@r{[}-@var{n}@r{]} -fdump-tree-pre@r{[}-@var{n}@r{]} @gol
-fdump-tree-ccp@r{[}-@var{n}@r{]} -fdump-tree-dce@r{[}-@var{n}@r{]} @gol
-fdump-tree-gimple@r{[}-raw@r{]} -fdump-tree-mudflap@r{[}-@var{n}@r{]} @gol
-fdump-tree-gimple@r{[}-raw@r{]} @gol
-fdump-tree-dom@r{[}-@var{n}@r{]} @gol
-fdump-tree-dse@r{[}-@var{n}@r{]} @gol
-fdump-tree-phiprop@r{[}-@var{n}@r{]} @gol
@ -384,7 +383,7 @@ Objective-C and Objective-C++ Dialects}.
-floop-parallelize-all -flto -flto-compression-level @gol
-flto-partition=@var{alg} -flto-report -flto-report-wpa -fmerge-all-constants @gol
-fmerge-constants -fmodulo-sched -fmodulo-sched-allow-regmoves @gol
-fmove-loop-invariants fmudflap -fmudflapir -fmudflapth -fno-branch-count-reg @gol
-fmove-loop-invariants -fno-branch-count-reg @gol
-fno-defer-pop -fno-function-cse -fno-guess-branch-probability @gol
-fno-inline -fno-math-errno -fno-peephole -fno-peephole2 @gol
-fno-sched-interblock -fno-sched-spec -fno-signed-zeros @gol
@ -4991,11 +4990,6 @@ This option is only supported for C and Objective-C@. It is implied by
This option is only active when @option{-fstack-protector} is active. It
warns about functions that are not protected against stack smashing.
@item -Wno-mudflap
@opindex Wno-mudflap
Suppress warnings about constructs that cannot be instrumented by
@option{-fmudflap}.
@item -Woverlength-strings
@opindex Woverlength-strings
@opindex Wno-overlength-strings
@ -6200,11 +6194,6 @@ by appending @file{.store_copyprop} to the source file name.
Dump each function after dead code elimination. The file name is made by
appending @file{.dce} to the source file name.
@item mudflap
@opindex fdump-tree-mudflap
Dump each function after adding mudflap instrumentation. The file name is
made by appending @file{.mudflap} to the source file name.
@item sra
@opindex fdump-tree-sra
Dump each function after performing scalar replacement of aggregates. The
@ -7071,32 +7060,6 @@ assumptions based on that.
The default is @option{-fzero-initialized-in-bss}.
@item -fmudflap -fmudflapth -fmudflapir
@opindex fmudflap
@opindex fmudflapth
@opindex fmudflapir
@cindex bounds checking
@cindex mudflap
For front-ends that support it (C and C++), instrument all risky
pointer/array dereferencing operations, some standard library
string/heap functions, and some other associated constructs with
range/validity tests. Modules so instrumented should be immune to
buffer overflows, invalid heap use, and some other classes of C/C++
programming errors. The instrumentation relies on a separate runtime
library (@file{libmudflap}), which is linked into a program if
@option{-fmudflap} is given at link time. Run-time behavior of the
instrumented program is controlled by the @env{MUDFLAP_OPTIONS}
environment variable. See @code{env MUDFLAP_OPTIONS=-help a.out}
for its options.
Use @option{-fmudflapth} instead of @option{-fmudflap} to compile and to
link if your program is multi-threaded. Use @option{-fmudflapir}, in
addition to @option{-fmudflap} or @option{-fmudflapth}, if
instrumentation should ignore pointer reads. This produces less
instrumentation (and therefore faster execution) and still provides
some protection against outright memory corrupting writes, but allows
erroneously read data to propagate within a program.
@item -fthread-jumps
@opindex fthread-jumps
Perform optimizations that check to see if a jump branches to a

View file

@ -225,20 +225,6 @@ stuff quickly rather than wait until later when it's more work to get
rid of it. This pass is located in @file{tree-cfg.c} and described by
@code{pass_remove_useless_stmts}.
@item Mudflap declaration registration
If mudflap (@pxref{Optimize Options,,-fmudflap -fmudflapth
-fmudflapir,gcc,Using the GNU Compiler Collection (GCC)}) is
enabled, we generate code to register some variable declarations with
the mudflap runtime. Specifically, the runtime tracks the lifetimes of
those variable declarations that have their addresses taken, or whose
bounds are unknown at compile time (@code{extern}). This pass generates
new exception handling constructs (@code{try}/@code{finally}), and so
must run before those are lowered. In addition, the pass enqueues
declarations of static variables whose lifetimes extend to the entire
program. The pass is located in @file{tree-mudflap.c} and is described
by @code{pass_mudflap_1}.
@item OpenMP lowering
If OpenMP generation (@option{-fopenmp}) is enabled, this pass lowers
@ -576,18 +562,6 @@ run last so that we have as much time as possible to prove that the
statement is not reachable. It is located in @file{tree-cfg.c} and
is described by @code{pass_warn_function_return}.
@item Mudflap statement annotation
If mudflap is enabled, we rewrite some memory accesses with code to
validate that the memory access is correct. In particular, expressions
involving pointer dereferences (@code{INDIRECT_REF}, @code{ARRAY_REF},
etc.) are replaced by code that checks the selected address range
against the mudflap runtime's database of valid regions. This check
includes an inline lookup into a direct-mapped cache, based on
shift/mask operations of the pointer value, with a fallback function
call into the runtime. The pass is located in @file{tree-mudflap.c} and
is described by @code{pass_mudflap_2}.
@item Leave static single assignment form
This pass rewrites the function such that it is in normal form. At
@ -968,10 +942,7 @@ This pass outputs the assembler code for the function. The source files
are @file{final.c} plus @file{insn-output.c}; the latter is generated
automatically from the machine description by the tool @file{genoutput}.
The header file @file{conditions.h} is used for communication between
these files. If mudflap is enabled, the queue of deferred declarations
and any addressed constants (e.g., string literals) is processed by
@code{mudflap_finish_file} into a synthetic constructor function
containing calls into the mudflap runtime.
these files.
@item Debugging information output

View file

@ -103,10 +103,6 @@ The runtime support library for transactional memory.
@item libjava
The Java runtime library.
@item libmudflap
The @code{libmudflap} library, used for instrumenting pointer and array
dereferencing operations.
@item libobjc
The Objective-C and Objective-C++ runtime library.

View file

@ -523,28 +523,12 @@ proper position among the other output files. */
#define LIB_SPEC "%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}"
#endif
/* mudflap specs */
#ifndef MFWRAP_SPEC
/* XXX: valid only for GNU ld */
/* XXX: should exactly match hooks provided by libmudflap.a */
#define MFWRAP_SPEC " %{static: %{fmudflap|fmudflapth: \
--wrap=malloc --wrap=free --wrap=calloc --wrap=realloc\
--wrap=mmap --wrap=mmap64 --wrap=munmap --wrap=alloca\
} %{fmudflapth: --wrap=pthread_create\
}} %{fmudflap|fmudflapth: --wrap=main}"
#endif
#ifndef MFLIB_SPEC
#define MFLIB_SPEC "%{fmudflap|fmudflapth: -export-dynamic}"
#endif
/* When using -fsplit-stack we need to wrap pthread_create, in order
to initialize the stack guard. We always use wrapping, rather than
shared library ordering, and we keep the wrapper function in
libgcc. This is not yet a real spec, though it could become one;
it is currently just stuffed into LINK_SPEC. FIXME: This wrapping
only works with GNU ld and gold. FIXME: This is incompatible with
-fmudflap when linking statically, which wants to do its own
wrapping. */
only works with GNU ld and gold. */
#define STACK_SPLIT_SPEC " %{fsplit-stack: --wrap=pthread_create}"
#ifndef LIBASAN_SPEC
@ -820,8 +804,6 @@ static const char *asm_spec = ASM_SPEC;
static const char *asm_final_spec = ASM_FINAL_SPEC;
static const char *link_spec = LINK_SPEC;
static const char *lib_spec = LIB_SPEC;
static const char *mfwrap_spec = MFWRAP_SPEC;
static const char *mflib_spec = MFLIB_SPEC;
static const char *link_gomp_spec = "";
static const char *libgcc_spec = LIBGCC_SPEC;
static const char *endfile_spec = ENDFILE_SPEC;
@ -862,8 +844,6 @@ static const char *cpp_unique_options =
%{remap} %{g3|ggdb3|gstabs3|gcoff3|gxcoff3|gvms3:-dD}\
%{!iplugindir*:%{fplugin*:%:find-plugindir()}}\
%{H} %C %{D*&U*&A*} %{i*} %Z %i\
%{fmudflap:-D_MUDFLAP -include mf-runtime.h}\
%{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\
%{E|M|MM:%W{o*}}";
/* This contains cpp options which are common with cc1_options and are passed
@ -895,7 +875,6 @@ static const char *cc1_options =
%{-help=*:--help=%*}\
%{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
%{fsyntax-only:-o %j} %{-param*}\
%{fmudflap|fmudflapth:-fno-builtin -fno-merge-constants}\
%{coverage:-fprofile-arcs -ftest-coverage}";
static const char *asm_options =
@ -1309,8 +1288,6 @@ static struct spec_list static_specs[] =
INIT_STATIC_SPEC ("endfile", &endfile_spec),
INIT_STATIC_SPEC ("link", &link_spec),
INIT_STATIC_SPEC ("lib", &lib_spec),
INIT_STATIC_SPEC ("mfwrap", &mfwrap_spec),
INIT_STATIC_SPEC ("mflib", &mflib_spec),
INIT_STATIC_SPEC ("link_gomp", &link_gomp_spec),
INIT_STATIC_SPEC ("libgcc", &libgcc_spec),
INIT_STATIC_SPEC ("startfile", &startfile_spec),

View file

@ -51,7 +51,6 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks-def.h" /* FIXME: for lhd_set_decl_assembler_name */
#include "tree-pass.h" /* FIXME: only for PROP_gimple_any */
#include "tree-mudflap.h"
#include "expr.h"
#include "tm_p.h"
@ -1236,8 +1235,7 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p)
gimple stack_restore;
/* Save stack on entry and restore it on exit. Add a try_finally
block to achieve this. Note that mudflap depends on the
format of the emitted code: see mx_register_decls(). */
block to achieve this. */
build_stack_save_restore (&stack_save, &stack_restore);
gimplify_seq_add_stmt (&cleanup, stack_restore);
@ -1395,8 +1393,7 @@ static void
gimplify_vla_decl (tree decl, gimple_seq *seq_p)
{
/* This is a variable-sized decl. Simplify its size and mark it
for deferred expansion. Note that mudflap depends on the format
of the emitted code: see mx_register_decls(). */
for deferred expansion. */
tree t, addr, ptr_type;
gimplify_one_sizepos (&DECL_SIZE (decl), seq_p);

View file

@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. If not see
NEXT_PASS (pass_warn_unused_result);
NEXT_PASS (pass_diagnose_omp_blocks);
NEXT_PASS (pass_diagnose_tm_blocks);
NEXT_PASS (pass_mudflap_1);
NEXT_PASS (pass_lower_omp);
NEXT_PASS (pass_lower_cf);
NEXT_PASS (pass_lower_tm);
@ -305,7 +304,6 @@ along with GCC; see the file COPYING3. If not see
NEXT_PASS (pass_cleanup_eh);
NEXT_PASS (pass_lower_resx);
NEXT_PASS (pass_nrv);
NEXT_PASS (pass_mudflap_2);
NEXT_PASS (pass_cleanup_cfg_post_optimizing);
NEXT_PASS (pass_warn_function_noreturn);

View file

@ -1,3 +1,8 @@
2013-10-26 Jeff Law <law@redhat.com>
* g++.dg/torture/pr49309.C: Removed.
* gcc.dg/dfp/pr35739.c: Removed.
2013-10-25 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/58759

View file

@ -1,16 +0,0 @@
// PR tree-optimization/49309
// { dg-do compile }
// { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
// { dg-options "-fpreprocessed -fmudflap" }
struct A
{
int i;
A();
A(const A&);
};
inline void foo(A a) { a = A(); }
void bar() { foo(A()); }

View file

@ -1,16 +0,0 @@
/* PR c/35739 */
/* { dg-do compile { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O -fpreprocessed -fmudflap" } */
_Decimal128
foo (int n, ...)
{
int i;
_Decimal128 j = 0;
__builtin_va_list ap;
__builtin_va_start (ap, n);
for (i = 0; i < n; i++)
j += __builtin_va_arg (ap, _Decimal128);
__builtin_va_end (ap);
return j;
}

View file

@ -68,7 +68,6 @@ along with GCC; see the file COPYING3. If not see
#include "coverage.h"
#include "value-prof.h"
#include "alloc-pool.h"
#include "tree-mudflap.h"
#include "asan.h"
#include "tsan.h"
#include "gimple.h"
@ -568,10 +567,6 @@ compile_file (void)
basically finished. */
if (in_lto_p || !flag_lto || flag_fat_lto_objects)
{
/* Likewise for mudflap static object registrations. */
if (flag_mudflap)
mudflap_finish_file ();
/* File-scope initialization for AddressSanitizer. */
if (flag_sanitize & SANITIZE_ADDRESS)
asan_finish_file ();
@ -1287,9 +1282,6 @@ process_options (void)
"and -ftree-loop-linear)");
#endif
if (flag_mudflap && flag_lto)
sorry ("mudflap cannot be used together with link-time optimization");
/* One region RA really helps to decrease the code size. */
if (flag_ira_region == IRA_REGION_AUTODETECT)
flag_ira_region

View file

@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "tree-iterator.h"
#include "intl.h"
#include "tree-mudflap.h"
#include "gimple.h"
#include "gimple-ssa.h"
#include "tree-cfg.h"
@ -4592,10 +4591,6 @@ copy_tree_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
/* Copy the node. */
new_tree = copy_node (*tp);
/* Propagate mudflap marked-ness. */
if (flag_mudflap && mf_marked_p (*tp))
mf_mark (new_tree);
*tp = new_tree;
/* Now, restore the chain, if appropriate. That will cause
@ -4617,11 +4612,6 @@ copy_tree_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
tree new_tree;
new_tree = copy_node (*tp);
/* Propagate mudflap marked-ness. */
if (flag_mudflap && mf_marked_p (*tp))
mf_mark (new_tree);
CONSTRUCTOR_ELTS (new_tree) = vec_safe_copy (CONSTRUCTOR_ELTS (*tp));
*tp = new_tree;
}

File diff suppressed because it is too large Load diff

View file

@ -1,34 +0,0 @@
/* Mudflap: narrow-pointer bounds-checking by tree rewriting.
Copyright (C) 2001-2013 Free Software Foundation, Inc.
Contributed by Frank Ch. Eigler <fche@redhat.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#ifndef TREE_MUDFLAP_H
#define TREE_MUDFLAP_H
/* Instrumentation. */
extern void mudflap_init (void);
extern void mudflap_enqueue_decl (tree);
extern void mudflap_enqueue_constant (tree);
extern void mudflap_finish_file (void);
/* Tree node marking. */
extern int mf_marked_p (tree);
extern tree mf_mark (tree);
#endif /* TREE_MUDFLAP_H */

View file

@ -1,169 +0,0 @@
/* Mudflap: narrow-pointer bounds-checking by tree rewriting.
Copyright (C) 2001-2013 Free Software Foundation, Inc.
Contributed by Frank Ch. Eigler <fche@redhat.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "tree-inline.h"
#include "gimple.h"
#include "hashtab.h"
#include "langhooks.h"
#include "tree-mudflap.h"
#include "tree-pass.h"
#include "ggc.h"
#include "diagnostic-core.h"
/* This file contains placeholder functions, to be used only for
language processors that cannot handle tree-mudflap.c directly.
(e.g. Fortran). */
static void
nogo (void)
{
sorry ("mudflap: this language is not supported");
}
void
mudflap_enqueue_decl (tree obj ATTRIBUTE_UNUSED)
{
nogo ();
}
void
mudflap_enqueue_constant (tree obj ATTRIBUTE_UNUSED)
{
nogo ();
}
void
mudflap_finish_file (void)
{
nogo ();
}
int
mf_marked_p (tree t ATTRIBUTE_UNUSED)
{
nogo ();
return 0;
}
tree
mf_mark (tree t ATTRIBUTE_UNUSED)
{
nogo ();
return NULL;
}
/* The pass structures must exist, but need not do anything. */
static bool
gate_mudflap (void)
{
return flag_mudflap != 0;
}
namespace {
const pass_data pass_data_mudflap_1 =
{
GIMPLE_PASS, /* type */
"mudflap1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
false, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_mudflap_1 : public gimple_opt_pass
{
public:
pass_mudflap_1 (gcc::context *ctxt)
: gimple_opt_pass (pass_data_mudflap_1, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_mudflap (); }
}; // class pass_mudflap_1
} // anon namespace
gimple_opt_pass *
make_pass_mudflap_1 (gcc::context *ctxt)
{
return new pass_mudflap_1 (ctxt);
}
namespace {
const pass_data pass_data_mudflap_2 =
{
GIMPLE_PASS, /* type */
"mudflap2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
false, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_mudflap_2 : public gimple_opt_pass
{
public:
pass_mudflap_2 (gcc::context *ctxt)
: gimple_opt_pass (pass_data_mudflap_2, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_mudflap (); }
}; // class pass_mudflap_2
} // anon namespace
gimple_opt_pass *
make_pass_mudflap_2 (gcc::context *ctxt)
{
return new pass_mudflap_2 (ctxt);
}
/* Instead of:
#include "gt-tree-mudflap.h"
We prepare a little dummy struct here.
*/
EXPORTED_CONST struct ggc_root_tab gt_ggc_r_gt_tree_mudflap_h[] = {
LAST_GGC_ROOT_TAB
};

View file

@ -338,8 +338,6 @@ extern void register_pass (register_pass_info *);
extern void register_pass (opt_pass* pass, pass_positioning_ops pos,
const char* ref_pass_name, int ref_pass_inst_number);
extern gimple_opt_pass *make_pass_mudflap_1 (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_mudflap_2 (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_asan (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_asan_O0 (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tsan (gcc::context *ctxt);

View file

@ -46,7 +46,6 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "common/common-target.h"
#include "targhooks.h"
#include "tree-mudflap.h"
#include "cgraph.h"
#include "pointer-set.h"
#include "asan.h"
@ -1247,10 +1246,6 @@ make_decl_rtl (tree decl)
&& SYMBOL_REF_HAS_BLOCK_INFO_P (XEXP (x, 0)))
change_symbol_block (XEXP (x, 0), get_block_for_decl (decl));
/* Make this function static known to the mudflap runtime. */
if (flag_mudflap && TREE_CODE (decl) == VAR_DECL)
mudflap_enqueue_decl (decl);
return;
}
@ -1387,10 +1382,6 @@ make_decl_rtl (tree decl)
If the name is changed, the macro ASM_OUTPUT_LABELREF
will have to know how to strip this information. */
targetm.encode_section_info (decl, DECL_RTL (decl), true);
/* Make this function static known to the mudflap runtime. */
if (flag_mudflap && TREE_CODE (decl) == VAR_DECL)
mudflap_enqueue_decl (decl);
}
/* Like make_decl_rtl, but inhibit creation of new alias sets when
@ -1400,7 +1391,7 @@ make_decl_rtl (tree decl)
rtx
make_decl_rtl_for_debug (tree decl)
{
unsigned int save_aliasing_flag, save_mudflap_flag;
unsigned int save_aliasing_flag;
rtx rtl;
if (DECL_RTL_SET_P (decl))
@ -1411,12 +1402,9 @@ make_decl_rtl_for_debug (tree decl)
we do not want to create alias sets that will throw the alias
numbers off in the comparison dumps. So... clearing
flag_strict_aliasing will keep new_alias_set() from creating a
new set. It is undesirable to register decl with mudflap
in this case as well. */
new set. */
save_aliasing_flag = flag_strict_aliasing;
flag_strict_aliasing = 0;
save_mudflap_flag = flag_mudflap;
flag_mudflap = 0;
rtl = DECL_RTL (decl);
/* Reset DECL_RTL back, as various parts of the compiler expects
@ -1424,8 +1412,6 @@ make_decl_rtl_for_debug (tree decl)
SET_DECL_RTL (decl, NULL);
flag_strict_aliasing = save_aliasing_flag;
flag_mudflap = save_mudflap_flag;
return rtl;
}
@ -3206,10 +3192,6 @@ build_constant_desc (tree exp)
desc = ggc_alloc_constant_descriptor_tree ();
desc->value = copy_constant (exp);
/* Propagate marked-ness to copied constant. */
if (flag_mudflap && mf_marked_p (exp))
mf_mark (desc->value);
/* Create a string containing the label name, in LABEL. */
labelno = const_labelno++;
ASM_GENERATE_INTERNAL_LABEL (label, "LC", labelno);
@ -3405,8 +3387,6 @@ output_constant_def_contents (rtx symbol)
assemble_zeros (asan_red_zone_size (size));
}
}
if (flag_mudflap)
mudflap_enqueue_constant (exp);
}
/* Look up EXP in the table of constant descriptors. Return the rtl
@ -6294,9 +6274,8 @@ categorize_decl_for_section (const_tree decl, int reloc)
return SECCAT_TEXT;
else if (TREE_CODE (decl) == STRING_CST)
{
if (flag_mudflap
|| ((flag_sanitize & SANITIZE_ADDRESS)
&& asan_protect_global (CONST_CAST_TREE (decl))))
if ((flag_sanitize & SANITIZE_ADDRESS)
&& asan_protect_global (CONST_CAST_TREE (decl)))
/* or !flag_merge_constants */
return SECCAT_RODATA;
else
@ -6321,7 +6300,7 @@ categorize_decl_for_section (const_tree decl, int reloc)
}
else if (reloc & targetm.asm_out.reloc_rw_mask ())
ret = reloc == 1 ? SECCAT_DATA_REL_RO_LOCAL : SECCAT_DATA_REL_RO;
else if (reloc || flag_merge_constants < 2 || flag_mudflap
else if (reloc || flag_merge_constants < 2
|| ((flag_sanitize & SANITIZE_ADDRESS)
&& asan_protect_global (CONST_CAST_TREE (decl))))
/* C and C++ don't allow different variables to share the same

File diff suppressed because it is too large Load diff

View file

@ -1,97 +0,0 @@
## Makefile for the toplevel directory of the mudflap library.
##
## Copyright (C) 2002-2013 Free Software Foundation, Inc.
##
AUTOMAKE_OPTIONS = 1.8 foreign
ACLOCAL_AMFLAGS = -I .. -I ../config
MAINT_CHARSET = latin1
SUBDIRS = testsuite
# May be used by various substitution variables.
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
SECTION_FLAGS = @SECTION_FLAGS@
AM_CFLAGS = -Wall $(SECTION_FLAGS)
if LIBMUDFLAPTH
libmudflapth = libmudflapth.la
else
libmudflapth =
endif
toolexeclib_LTLIBRARIES = libmudflap.la $(libmudflapth)
target_noncanonical = @target_noncanonical@
libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include
nobase_libsubinclude_HEADERS = mf-runtime.h
libmudflap_la_SOURCES = \
mf-runtime.c \
mf-heuristics.c \
mf-hooks1.c \
mf-hooks2.c
libmudflap_la_LIBADD =
libmudflap_la_DEPENDENCIES = $(libmudflap_la_LIBADD)
libmudflap_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
libmudflapth_la_SOURCES = \
mf-runtime.c \
mf-heuristics.c \
mf-hooks1.c \
mf-hooks2.c \
mf-hooks3.c
libmudflapth_la_CFLAGS = -DLIBMUDFLAPTH
libmudflapth_la_LIBADD =
libmudflapth_la_DEPENDENCIES = $(libmudflapth_la_LIBADD)
libmudflapth_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
# XXX hack alert
# From libffi/Makefile.am
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile.
AM_MAKEFLAGS = \
"AR_FLAGS=$(AR_FLAGS)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CFLAGS=$(CFLAGS)" \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
"JC1FLAGS=$(JC1FLAGS)" \
"LDFLAGS=$(LDFLAGS)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"MAKE=$(MAKE)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
"PICFLAG=$(PICFLAG)" \
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"exec_prefix=$(exec_prefix)" \
"infodir=$(infodir)" \
"libdir=$(libdir)" \
"prefix=$(prefix)" \
"includedir=$(includedir)" \
"AR=$(AR)" \
"AS=$(AS)" \
"CC=$(CC)" \
"CXX=$(CXX)" \
"LD=$(LD)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"NM=$(NM)" \
"PICFLAG=$(PICFLAG)" \
"RANLIB=$(RANLIB)" \
"DESTDIR=$(DESTDIR)"
MAKEOVERRIDES=
## ################################################################

View file

@ -1,822 +0,0 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = .
DIST_COMMON = ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.h.in $(srcdir)/../mkinstalldirs \
$(srcdir)/../depcomp $(nobase_libsubinclude_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/enable.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/override.m4 \
$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../ltoptions.m4 \
$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(toolexeclibdir)" \
"$(DESTDIR)$(libsubincludedir)"
LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
am_libmudflap_la_OBJECTS = mf-runtime.lo mf-heuristics.lo mf-hooks1.lo \
mf-hooks2.lo
libmudflap_la_OBJECTS = $(am_libmudflap_la_OBJECTS)
libmudflap_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libmudflap_la_LDFLAGS) $(LDFLAGS) -o $@
am_libmudflapth_la_OBJECTS = libmudflapth_la-mf-runtime.lo \
libmudflapth_la-mf-heuristics.lo libmudflapth_la-mf-hooks1.lo \
libmudflapth_la-mf-hooks2.lo libmudflapth_la-mf-hooks3.lo
libmudflapth_la_OBJECTS = $(am_libmudflapth_la_OBJECTS)
libmudflapth_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmudflapth_la_CFLAGS) \
$(CFLAGS) $(libmudflapth_la_LDFLAGS) $(LDFLAGS) -o $@
@LIBMUDFLAPTH_TRUE@am_libmudflapth_la_rpath = -rpath $(toolexeclibdir)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/../depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libmudflap_la_SOURCES) $(libmudflapth_la_SOURCES)
MULTISRCTOP =
MULTIBUILDTOP =
MULTIDIRS =
MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
HEADERS = $(nobase_libsubinclude_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MF_HAVE_STDINT_H = @MF_HAVE_STDINT_H@
MF_HAVE_UINTPTR_T = @MF_HAVE_UINTPTR_T@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_libmudflapth = @build_libmudflapth@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
multi_basedir = @multi_basedir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_noncanonical = @target_noncanonical@
target_os = @target_os@
target_vendor = @target_vendor@
toolexecdir = @toolexecdir@
toolexeclibdir = @toolexeclibdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.8 foreign
ACLOCAL_AMFLAGS = -I .. -I ../config
MAINT_CHARSET = latin1
SUBDIRS = testsuite
# May be used by various substitution variables.
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
AM_CFLAGS = -Wall $(SECTION_FLAGS)
@LIBMUDFLAPTH_FALSE@libmudflapth =
@LIBMUDFLAPTH_TRUE@libmudflapth = libmudflapth.la
toolexeclib_LTLIBRARIES = libmudflap.la $(libmudflapth)
libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include
nobase_libsubinclude_HEADERS = mf-runtime.h
libmudflap_la_SOURCES = \
mf-runtime.c \
mf-heuristics.c \
mf-hooks1.c \
mf-hooks2.c
libmudflap_la_LIBADD =
libmudflap_la_DEPENDENCIES = $(libmudflap_la_LIBADD)
libmudflap_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
libmudflapth_la_SOURCES = \
mf-runtime.c \
mf-heuristics.c \
mf-hooks1.c \
mf-hooks2.c \
mf-hooks3.c
libmudflapth_la_CFLAGS = -DLIBMUDFLAPTH
libmudflapth_la_LIBADD =
libmudflapth_la_DEPENDENCIES = $(libmudflapth_la_LIBADD)
libmudflapth_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
# XXX hack alert
# From libffi/Makefile.am
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile.
AM_MAKEFLAGS = \
"AR_FLAGS=$(AR_FLAGS)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CFLAGS=$(CFLAGS)" \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
"JC1FLAGS=$(JC1FLAGS)" \
"LDFLAGS=$(LDFLAGS)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"MAKE=$(MAKE)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
"PICFLAG=$(PICFLAG)" \
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"exec_prefix=$(exec_prefix)" \
"infodir=$(infodir)" \
"libdir=$(libdir)" \
"prefix=$(prefix)" \
"includedir=$(includedir)" \
"AR=$(AR)" \
"AS=$(AS)" \
"CC=$(CC)" \
"CXX=$(CXX)" \
"LD=$(LD)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"NM=$(NM)" \
"PICFLAG=$(PICFLAG)" \
"RANLIB=$(RANLIB)" \
"DESTDIR=$(DESTDIR)"
MAKEOVERRIDES =
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
am--refresh:
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(toolexeclibdir)" || $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)"
@list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(toolexeclibdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(toolexeclibdir)"; \
}
uninstall-toolexeclibLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(toolexeclibdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(toolexeclibdir)/$$f"; \
done
clean-toolexeclibLTLIBRARIES:
-test -z "$(toolexeclib_LTLIBRARIES)" || rm -f $(toolexeclib_LTLIBRARIES)
@list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libmudflap.la: $(libmudflap_la_OBJECTS) $(libmudflap_la_DEPENDENCIES)
$(libmudflap_la_LINK) -rpath $(toolexeclibdir) $(libmudflap_la_OBJECTS) $(libmudflap_la_LIBADD) $(LIBS)
libmudflapth.la: $(libmudflapth_la_OBJECTS) $(libmudflapth_la_DEPENDENCIES)
$(libmudflapth_la_LINK) $(am_libmudflapth_la_rpath) $(libmudflapth_la_OBJECTS) $(libmudflapth_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmudflapth_la-mf-heuristics.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmudflapth_la-mf-hooks1.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmudflapth_la-mf-hooks2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmudflapth_la-mf-hooks3.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmudflapth_la-mf-runtime.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mf-heuristics.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mf-hooks1.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mf-hooks2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mf-runtime.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
libmudflapth_la-mf-runtime.lo: mf-runtime.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmudflapth_la_CFLAGS) $(CFLAGS) -MT libmudflapth_la-mf-runtime.lo -MD -MP -MF $(DEPDIR)/libmudflapth_la-mf-runtime.Tpo -c -o libmudflapth_la-mf-runtime.lo `test -f 'mf-runtime.c' || echo '$(srcdir)/'`mf-runtime.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmudflapth_la-mf-runtime.Tpo $(DEPDIR)/libmudflapth_la-mf-runtime.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mf-runtime.c' object='libmudflapth_la-mf-runtime.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmudflapth_la_CFLAGS) $(CFLAGS) -c -o libmudflapth_la-mf-runtime.lo `test -f 'mf-runtime.c' || echo '$(srcdir)/'`mf-runtime.c
libmudflapth_la-mf-heuristics.lo: mf-heuristics.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmudflapth_la_CFLAGS) $(CFLAGS) -MT libmudflapth_la-mf-heuristics.lo -MD -MP -MF $(DEPDIR)/libmudflapth_la-mf-heuristics.Tpo -c -o libmudflapth_la-mf-heuristics.lo `test -f 'mf-heuristics.c' || echo '$(srcdir)/'`mf-heuristics.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmudflapth_la-mf-heuristics.Tpo $(DEPDIR)/libmudflapth_la-mf-heuristics.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mf-heuristics.c' object='libmudflapth_la-mf-heuristics.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmudflapth_la_CFLAGS) $(CFLAGS) -c -o libmudflapth_la-mf-heuristics.lo `test -f 'mf-heuristics.c' || echo '$(srcdir)/'`mf-heuristics.c
libmudflapth_la-mf-hooks1.lo: mf-hooks1.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmudflapth_la_CFLAGS) $(CFLAGS) -MT libmudflapth_la-mf-hooks1.lo -MD -MP -MF $(DEPDIR)/libmudflapth_la-mf-hooks1.Tpo -c -o libmudflapth_la-mf-hooks1.lo `test -f 'mf-hooks1.c' || echo '$(srcdir)/'`mf-hooks1.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmudflapth_la-mf-hooks1.Tpo $(DEPDIR)/libmudflapth_la-mf-hooks1.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mf-hooks1.c' object='libmudflapth_la-mf-hooks1.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmudflapth_la_CFLAGS) $(CFLAGS) -c -o libmudflapth_la-mf-hooks1.lo `test -f 'mf-hooks1.c' || echo '$(srcdir)/'`mf-hooks1.c
libmudflapth_la-mf-hooks2.lo: mf-hooks2.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmudflapth_la_CFLAGS) $(CFLAGS) -MT libmudflapth_la-mf-hooks2.lo -MD -MP -MF $(DEPDIR)/libmudflapth_la-mf-hooks2.Tpo -c -o libmudflapth_la-mf-hooks2.lo `test -f 'mf-hooks2.c' || echo '$(srcdir)/'`mf-hooks2.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmudflapth_la-mf-hooks2.Tpo $(DEPDIR)/libmudflapth_la-mf-hooks2.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mf-hooks2.c' object='libmudflapth_la-mf-hooks2.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmudflapth_la_CFLAGS) $(CFLAGS) -c -o libmudflapth_la-mf-hooks2.lo `test -f 'mf-hooks2.c' || echo '$(srcdir)/'`mf-hooks2.c
libmudflapth_la-mf-hooks3.lo: mf-hooks3.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmudflapth_la_CFLAGS) $(CFLAGS) -MT libmudflapth_la-mf-hooks3.lo -MD -MP -MF $(DEPDIR)/libmudflapth_la-mf-hooks3.Tpo -c -o libmudflapth_la-mf-hooks3.lo `test -f 'mf-hooks3.c' || echo '$(srcdir)/'`mf-hooks3.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmudflapth_la-mf-hooks3.Tpo $(DEPDIR)/libmudflapth_la-mf-hooks3.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mf-hooks3.c' object='libmudflapth_la-mf-hooks3.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmudflapth_la_CFLAGS) $(CFLAGS) -c -o libmudflapth_la-mf-hooks3.lo `test -f 'mf-hooks3.c' || echo '$(srcdir)/'`mf-hooks3.c
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool config.lt
# GNU Make needs to see an explicit $(MAKE) variable in the command it
# runs to enable its job server during parallel builds. Hence the
# comments below.
all-multi:
$(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
install-multi:
$(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE)
mostlyclean-multi:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean # $(MAKE)
clean-multi:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean # $(MAKE)
distclean-multi:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean # $(MAKE)
maintainer-clean-multi:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean # $(MAKE)
install-nobase_libsubincludeHEADERS: $(nobase_libsubinclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(libsubincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libsubincludedir)"
@list='$(nobase_libsubinclude_HEADERS)'; test -n "$(libsubincludedir)" || list=; \
$(am__nobase_list) | while read dir files; do \
xfiles=; for file in $$files; do \
if test -f "$$file"; then xfiles="$$xfiles $$file"; \
else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
test -z "$$xfiles" || { \
test "x$$dir" = x. || { \
echo "$(MKDIR_P) '$(DESTDIR)$(libsubincludedir)/$$dir'"; \
$(MKDIR_P) "$(DESTDIR)$(libsubincludedir)/$$dir"; }; \
echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(libsubincludedir)/$$dir'"; \
$(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(libsubincludedir)/$$dir" || exit $$?; }; \
done
uninstall-nobase_libsubincludeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(nobase_libsubinclude_HEADERS)'; test -n "$(libsubincludedir)" || list=; \
$(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(libsubincludedir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(libsubincludedir)" && rm -f $$files
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
check-am: all-am
check: check-recursive
all-am: Makefile $(LTLIBRARIES) all-multi $(HEADERS) config.h
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(libsubincludedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-multi clean-recursive
clean-am: clean-generic clean-libtool clean-toolexeclibLTLIBRARIES \
mostlyclean-am
distclean: distclean-multi distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am: install-nobase_libsubincludeHEADERS
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am: install-multi install-toolexeclibLTLIBRARIES
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-multi maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-multi mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-nobase_libsubincludeHEADERS \
uninstall-toolexeclibLTLIBRARIES
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all all-multi \
clean-multi ctags-recursive distclean-multi install-am \
install-multi install-strip maintainer-clean-multi \
mostlyclean-multi tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am all-multi am--refresh check check-am clean \
clean-generic clean-libtool clean-multi \
clean-toolexeclibLTLIBRARIES ctags ctags-recursive distclean \
distclean-compile distclean-generic distclean-hdr \
distclean-libtool distclean-multi distclean-tags dvi dvi-am \
html html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-multi \
install-nobase_libsubincludeHEADERS install-pdf install-pdf-am \
install-ps install-ps-am install-strip \
install-toolexeclibLTLIBRARIES installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic maintainer-clean-multi mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
mostlyclean-multi pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-nobase_libsubincludeHEADERS \
uninstall-toolexeclibLTLIBRARIES
# 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:

View file

@ -1,12 +0,0 @@
dnl ----------------------------------------------------------------------
dnl This whole bit snagged from libgfortran.
sinclude(../libtool.m4)
dnl The lines below arrange for aclocal not to bring an installed
dnl libtool.m4 into aclocal.m4, while still arranging for automake to
dnl add a definition of LIBTOOL to Makefile.in.
ifelse(,,,[AC_SUBST(LIBTOOL)
AC_DEFUN([AM_PROG_LIBTOOL])
AC_DEFUN([AC_LIBTOOL_DLOPEN])
AC_DEFUN([AC_PROG_LD])
])

982
libmudflap/aclocal.m4 vendored
View file

@ -1,982 +0,0 @@
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
# This file 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.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
[m4_warning([this file was generated for autoconf 2.64.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
#
# This file 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.
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.11.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
# _AM_AUTOCONF_VERSION(VERSION)
# -----------------------------
# aclocal traces this macro to find the Autoconf version.
# This is a private macro too. Using m4_define simplifies
# the logic in aclocal, which can simply ignore this definition.
m4_define([_AM_AUTOCONF_VERSION], [])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.11.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file 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.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
# therefore $ac_aux_dir as well) can be either absolute or relative,
# depending on how configure is run. This is pretty annoying, since
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
# source directory, any form will work fine, but in subdirectories a
# relative path needs to be adjusted first.
#
# $ac_aux_dir/missing
# fails when called from a subdirectory if $ac_aux_dir is relative
# $top_srcdir/$ac_aux_dir/missing
# fails if $ac_aux_dir is absolute,
# fails when called from a subdirectory in a VPATH build with
# a relative $ac_aux_dir
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
# harmless because $srcdir is `.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
# and then we would define $MISSING as
# MISSING="\${SHELL} $am_aux_dir/missing"
# This will work as long as MISSING is not called from configure, because
# unfortunately $(top_srcdir) has no meaning in configure.
# However there are other variables, like CC, which are often used in
# configure, and could therefore not use this "fixed" $ac_aux_dir.
#
# Another solution, used here, is to always expand $ac_aux_dir to an
# absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
[dnl Rely on autoconf to set up CDPATH properly.
AC_PREREQ([2.50])dnl
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
# Free Software Foundation, Inc.
#
# This file 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.
# serial 9
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ(2.52)dnl
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
m4_define([_AM_COND_VALUE_$1], [$2])dnl
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([[conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
# Free Software Foundation, Inc.
#
# This file 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.
# serial 10
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
# NAME is "CC", "CXX", "GCJ", or "OBJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
# dependency, and given that the user is not expected to run this macro,
# just rely on AC_PROG_CC.
AC_DEFUN([_AM_DEPENDENCIES],
[AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=],
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], UPC, [depcc="$UPC" am_compiler_list=],
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
am__universal=false
m4_case([$1], [CC],
[case " $depcc " in #(
*\ -arch\ *\ -arch\ *) am__universal=true ;;
esac],
[CXX],
[case " $depcc " in #(
*\ -arch\ *\ -arch\ *) am__universal=true ;;
esac])
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
gcc)
# This depmode causes a compiler race in universal mode.
test "$am__universal" = false || continue
;;
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
am__minus_obj=
;;
none) break ;;
esac
if depmode=$depmode \
source=sub/conftest.c object=$am__obj \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_$1_dependencies_compiler_type=none
fi
])
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
AM_CONDITIONAL([am__fastdep$1], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
[AC_ARG_ENABLE(dependency-tracking,
[ --disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file 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.
#serial 5
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[{
# Autoconf 2.62 quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
*\'*) eval set x "$CONFIG_FILES" ;;
*) set x $CONFIG_FILES ;;
esac
shift
for mf
do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
# AM_OUTPUT_DEPENDENCY_COMMANDS
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each `.P' file that we will
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
#
# This file 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.
# serial 16
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
# The call with PACKAGE and VERSION arguments is the old style
# call (pre autoconf-2.50), which is being phased out. PACKAGE
# and VERSION should now be passed to AC_INIT and removed from
# the call to AM_INIT_AUTOMAKE.
# We support both call styles for the transition. After
# the next Automake release, Autoconf can make the AC_INIT
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.62])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
fi
# test whether we have cygpath
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)],
[define([AC_PROG_CC],
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_CXX],
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
[_AM_DEPENDENCIES(OBJC)],
[define([AC_PROG_OBJC],
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
])
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
])
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
# loop where config.status creates the headers, so we can generate
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
_am_arg=$1
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
#
# This file 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.
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
if test x"${install_sh}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
*)
install_sh="\${SHELL} $am_aux_dir/install-sh"
esac
fi
AC_SUBST(install_sh)])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file 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.
# serial 5
# AM_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
# Control maintainer-specific portions of Makefiles.
# Default is to disable them, unless `enable' is passed literally.
# For symmetry, `disable' may be passed as well. Anyway, the user
# can override the default with the --enable/--disable switch.
AC_DEFUN([AM_MAINTAINER_MODE],
[m4_case(m4_default([$1], [disable]),
[enable], [m4_define([am_maintainer_other], [disable])],
[disable], [m4_define([am_maintainer_other], [enable])],
[m4_define([am_maintainer_other], [enable])
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
(and sometimes confusing) to the casual installer],
[USE_MAINTAINER_MODE=$enableval],
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST([MAINT])dnl
]
)
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
#
# This file 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.
# serial 4
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
@echo this is the am__doit target
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# Ignore all kinds of additional output from `make'.
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=include
am__quote=
_am_result=GNU
;;
esac
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=.include
am__quote="\""
_am_result=BSD
;;
esac
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file 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.
# serial 6
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
[AC_REQUIRE([AM_MISSING_HAS_RUN])
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it supports --run.
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
*)
MISSING="\${SHELL} $am_aux_dir/missing" ;;
esac
fi
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
AC_MSG_WARN([`missing' script is too old or missing])
fi
])
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
#
# This file 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.
# AM_PROG_MKDIR_P
# ---------------
# Check for `mkdir -p'.
AC_DEFUN([AM_PROG_MKDIR_P],
[AC_PREREQ([2.60])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
dnl while keeping a definition of mkdir_p for backward compatibility.
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
dnl Makefile.ins that do not define MKDIR_P, so we do our own
dnl adjustment using top_builddir (which is defined more often than
dnl MKDIR_P).
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
case $mkdir_p in
[[\\/$]]* | ?:[[\\/]]*) ;;
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
esac
])
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
#
# This file 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.
# serial 4
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# ------------------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
# ----------------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
# Free Software Foundation, Inc.
#
# This file 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.
# serial 5
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
'
case `pwd` in
*[[\\\"\#\$\&\'\`$am_lf]]*)
AC_MSG_ERROR([unsafe absolute working directory name]);;
esac
case $srcdir in
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
esac
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
rm -f conftest.file
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
test "$[2]" = conftest.file
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
AC_MSG_RESULT(yes)])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file 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.
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
# always use install-sh in `make install-strip', and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the `STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
#
# This file 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.
# serial 2
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])
# AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
#
# This file 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.
# serial 2
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
# FORMAT should be one of `v7', `ustar', or `pax'.
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
# $tardir.
# tardir=directory && $(am__tar) > result.tar
#
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility.
AM_MISSING_PROG([AMTAR], [tar])
m4_if([$1], [v7],
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
# Loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
# Do not fold the above two line into one, because Tru64 sh and
# Solaris sh will not grok spaces in the rhs of `-'.
for _am_tool in $_am_tools
do
case $_am_tool in
gnutar)
for _am_tar in tar gnutar gtar;
do
AM_RUN_LOG([$_am_tar --version]) && break
done
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
am__untar="$_am_tar -xf -"
;;
plaintar)
# Must skip GNU tar: if it does not support --format= it doesn't create
# ustar tarball either.
(tar --version) >/dev/null 2>&1 && continue
am__tar='tar chf - "$$tardir"'
am__tar_='tar chf - "$tardir"'
am__untar='tar xf -'
;;
pax)
am__tar='pax -L -x $1 -w "$$tardir"'
am__tar_='pax -L -x $1 -w "$tardir"'
am__untar='pax -r'
;;
cpio)
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
am__untar='cpio -i -H $1 -d'
;;
none)
am__tar=false
am__tar_=false
am__untar=false
;;
esac
# If the value was cached, stop now. We just wanted to have am__tar
# and am__untar set.
test -n "${am_cv_prog_tar_$1}" && break
# tar/untar a dummy directory, and stop if the command works
rm -rf conftest.dir
mkdir conftest.dir
echo GrepMe > conftest.dir/file
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
rm -rf conftest.dir
if test -s conftest.tar; then
AM_RUN_LOG([$am__untar <conftest.tar])
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
fi
done
rm -rf conftest.dir
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([../config/acx.m4])
m4_include([../config/depstand.m4])
m4_include([../config/enable.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/multi.m4])
m4_include([../config/override.m4])
m4_include([../config/tls.m4])
m4_include([../ltoptions.m4])
m4_include([../ltsugar.m4])
m4_include([../ltversion.m4])
m4_include([../lt~obsolete.m4])
m4_include([acinclude.m4])

View file

@ -1,308 +0,0 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to the name of the symbol used for the entry point. */
#undef ENTRY_POINT
/* Define to 1 if you have the `addmntent' function. */
#undef HAVE_ADDMNTENT
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
/* Define to 1 if you have the `backtrace' function. */
#undef HAVE_BACKTRACE
/* Define to 1 if you have the `backtrace_symbols' function. */
#undef HAVE_BACKTRACE_SYMBOLS
/* Define to 1 if the target assembler supports thread-local storage. */
#undef HAVE_CC_TLS
/* Define to 1 if you have the <ctype.h> header file. */
#undef HAVE_CTYPE_H
/* Define to 1 if you have the `cuserid' function. */
#undef HAVE_CUSERID
/* Define to 1 if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the `dlvsym' function. */
#undef HAVE_DLVSYM
/* Define to 1 if you have the <execinfo.h> header file. */
#undef HAVE_EXECINFO_H
/* Define to 1 if you have the `fopen64' function. */
#undef HAVE_FOPEN64
/* Define to 1 if you have the `freopen64' function. */
#undef HAVE_FREOPEN64
/* Define to 1 if you have the `fseeko64' function. */
#undef HAVE_FSEEKO64
/* Define to 1 if you have the `ftello64' function. */
#undef HAVE_FTELLO64
/* Define to 1 if you have the `gai_strerror' function. */
#undef HAVE_GAI_STRERROR
/* Define to 1 if you have the `getaddrinfo' function. */
#undef HAVE_GETADDRINFO
/* Define to 1 if you have the `getgrent' function. */
#undef HAVE_GETGRENT
/* Define to 1 if you have the `getgrgid' function. */
#undef HAVE_GETGRGID
/* Define to 1 if you have the `getgrgid_r' function. */
#undef HAVE_GETGRGID_R
/* Define to 1 if you have the `getgrnam' function. */
#undef HAVE_GETGRNAM
/* Define to 1 if you have the `getgrnam_r' function. */
#undef HAVE_GETGRNAM_R
/* Define to 1 if you have the `getlogin' function. */
#undef HAVE_GETLOGIN
/* Define to 1 if you have the `getlogin_r' function. */
#undef HAVE_GETLOGIN_R
/* Define to 1 if you have the `getmntent' function. */
#undef HAVE_GETMNTENT
/* Define to 1 if you have the `getprotobyname' function. */
#undef HAVE_GETPROTOBYNAME
/* Define to 1 if you have the `getprotobynumber' function. */
#undef HAVE_GETPROTOBYNUMBER
/* Define to 1 if you have the `getprotoent' function. */
#undef HAVE_GETPROTOENT
/* Define to 1 if you have the `getpwent' function. */
#undef HAVE_GETPWENT
/* Define to 1 if you have the `getpwnam' function. */
#undef HAVE_GETPWNAM
/* Define to 1 if you have the `getpwnam_r' function. */
#undef HAVE_GETPWNAM_R
/* Define to 1 if you have the `getpwuid' function. */
#undef HAVE_GETPWUID
/* Define to 1 if you have the `getpwuid_r' function. */
#undef HAVE_GETPWUID_R
/* Define to 1 if you have the `getservbyname' function. */
#undef HAVE_GETSERVBYNAME
/* Define to 1 if you have the `getservbyport' function. */
#undef HAVE_GETSERVBYPORT
/* Define to 1 if you have the `getservent' function. */
#undef HAVE_GETSERVENT
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define to 1 if you have the <grp.h> header file. */
#undef HAVE_GRP_H
/* Define to 1 if you have the `inet_ntoa' function. */
#undef HAVE_INET_NTOA
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `dl' library (-ldl). */
#undef HAVE_LIBDL
/* Define to 1 if you have the `rt' library (-lrt). */
#undef HAVE_LIBRT
/* Define to 1 if you have the `socket' library (-lsocket). */
#undef HAVE_LIBSOCKET
/* Define to 1 if you have the `memmem' function. */
#undef HAVE_MEMMEM
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `mempcpy' function. */
#undef HAVE_MEMPCPY
/* Define to 1 if you have the `memrchr' function. */
#undef HAVE_MEMRCHR
/* Define to 1 if you have the `mmap' function. */
#undef HAVE_MMAP
/* Define to 1 if you have the `mmap64' function. */
#undef HAVE_MMAP64
/* Define to 1 if you have the <mntent.h> header file. */
#undef HAVE_MNTENT_H
/* Define to 1 if you have the `munmap' function. */
#undef HAVE_MUNMAP
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* Define to 1 if you have the <pthread.h> header file. */
#undef HAVE_PTHREAD_H
/* Define to 1 if you have the <pwd.h> header file. */
#undef HAVE_PWD_H
/* Define to 1 if you have the `rawmemchr' function. */
#undef HAVE_RAWMEMCHR
/* Define to 1 if you have the `setbuf' function. */
#undef HAVE_SETBUF
/* Define to 1 if you have the `setbuffer' function. */
#undef HAVE_SETBUFFER
/* Define to 1 if you have the `sethostname' function. */
#undef HAVE_SETHOSTNAME
/* Define to 1 if you have the `setlinebuf' function. */
#undef HAVE_SETLINEBUF
/* Define to 1 if you have the `setmntent' function. */
#undef HAVE_SETMNTENT
/* Define to 1 if you have the `setvbuf' function. */
#undef HAVE_SETVBUF
/* Define to 1 if you have the `signal' function. */
#undef HAVE_SIGNAL
/* Define to 1 if you have the <signal.h> header file. */
#undef HAVE_SIGNAL_H
/* Define it socklen_t typedef is in sys/socket.h. */
#undef HAVE_SOCKLEN_T
/* Define to 1 if you have the `stat64' function. */
#undef HAVE_STAT64
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `stpcpy' function. */
#undef HAVE_STPCPY
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strncpy' function. */
#undef HAVE_STRNCPY
/* Define to 1 if you have the `strnlen' function. */
#undef HAVE_STRNLEN
/* Define to 1 if you have the <sys/ipc.h> header file. */
#undef HAVE_SYS_IPC_H
/* Define to 1 if you have the <sys/mman.h> header file. */
#undef HAVE_SYS_MMAN_H
/* Define to 1 if you have the <sys/mnttab.h> header file. */
#undef HAVE_SYS_MNTTAB_H
/* Define to 1 if you have the <sys/sem.h> header file. */
#undef HAVE_SYS_SEM_H
/* Define to 1 if you have the <sys/shm.h> header file. */
#undef HAVE_SYS_SHM_H
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H
/* Define to 1 if the target supports thread-local storage. */
#undef HAVE_TLS
/* union semun defined in sys/ipc.h or sys/sem.h */
#undef HAVE_UNION_SEMUN
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `__ctype_b_loc' function. */
#undef HAVE___CTYPE_B_LOC
/* Define to 1 if you have the `__ctype_tolower_loc' function. */
#undef HAVE___CTYPE_TOLOWER_LOC
/* Define to 1 if you have the `__ctype_toupper_loc' function. */
#undef HAVE___CTYPE_TOUPPER_LOC
/* Define to 1 if you have the `__libc_freeres' function. */
#undef HAVE___LIBC_FREERES
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* pthread_create symbol version */
#undef PTHREAD_CREATE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if the target use emutls for thread-local storage. */
#undef USE_EMUTLS
/* Version number of package */
#undef VERSION

14050
libmudflap/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -1,270 +0,0 @@
# Process this file with autoconf to produce a configure script, like so:
# aclocal -I .. -I ../config && autoconf && autoheader && automake
AC_PREREQ(2.64)
AC_INIT(libmudflap, 1.0)
AC_CONFIG_SRCDIR(mf-runtime.c)
AC_CANONICAL_SYSTEM
ACX_NONCANONICAL_TARGET
AM_INIT_AUTOMAKE([no-dist])
AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
AC_ARG_ENABLE(version-specific-runtime-libs,
[ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
[case "$enableval" in
yes) version_specific_libs=yes ;;
no) version_specific_libs=no ;;
*) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
esac],
[version_specific_libs=no])
AC_MSG_RESULT($version_specific_libs)
AM_MAINTAINER_MODE
AC_EXEEXT
AM_ENABLE_MULTILIB(, ..)
target_alias=${target_alias-$host_alias}
AC_SUBST(target_alias)
AC_CONFIG_HEADERS(config.h)
AC_LANG_C
# The same as in boehm-gc and libstdc++. Have to borrow it from there.
# We must force CC to /not/ be precious variables; otherwise
# the wrong, non-multilib-adjusted value will be used in multilibs.
# As a side effect, we have to subst CFLAGS ourselves.
m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
m4_define([_AC_ARG_VAR_PRECIOUS],[])
AC_PROG_CC
m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
AC_SUBST(CFLAGS)
if test "x$GCC" != "xyes"; then
AC_MSG_ERROR([libmudflap must be built with GCC])
fi
AC_PROG_CPP
# Some hosts don't have dlsym(RTLD_NEXT, "symbol") for use in
# symbol interposition. We disable shared libraries for these.
AC_MSG_CHECKING([whether dlsym(RTLD_NEXT,...) is available])
AC_TRY_COMPILE([
#define _GNU_SOURCE
#include <dlfcn.h>
],
[void *foo = dlsym (RTLD_NEXT, "exit");],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
enable_shared=no])
AC_CHECK_HEADERS(stdint.h execinfo.h signal.h dlfcn.h dirent.h pwd.h grp.h \
netdb.h sys/ipc.h sys/sem.h sys/shm.h sys/wait.h ctype.h mntent.h \
sys/mnttab.h sys/socket.h netinet/in.h arpa/inet.h dlfcn.h sys/mman.h)
AC_CHECK_FUNCS(backtrace backtrace_symbols gettimeofday signal)
AC_CHECK_FUNCS(fopen64 fseeko64 ftello64 stat64 freopen64)
AC_CHECK_FUNCS(setbuf setbuffer setlinebuf setvbuf)
AC_CHECK_FUNCS(strnlen memrchr strncpy memmem sethostname)
AC_CHECK_FUNCS(__ctype_b_loc __ctype_tolower_loc __ctype_toupper_loc)
AC_CHECK_FUNCS(getlogin cuserid getpwnam getpwuid getpwent getgrnam getgrgid getgrent)
AC_CHECK_FUNCS(getlogin_r getpwnam_r getpwuid_r getgrnam_r getgrgid_r)
AC_CHECK_FUNCS(getservent getservbyname getservbyport getaddrinfo gai_strerror)
AC_CHECK_FUNCS(getprotoent getprotobyname getprotobynumber)
AC_CHECK_FUNCS(getmntent setmntent addmntent)
AC_CHECK_FUNCS(inet_ntoa mmap munmap)
AC_CHECK_FUNCS(mmap64)
AC_CHECK_FUNCS(__libc_freeres)
AC_CHECK_FUNCS(rawmemchr stpcpy mempcpy)
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>],[union semun foo;], [mf_have_semun=1], [mf_have_semun=0])
if test $mf_have_semun = 1
then
AC_DEFINE(HAVE_UNION_SEMUN, 1, [union semun defined in sys/ipc.h or sys/sem.h])
fi
AC_MSG_CHECKING([for socklen_t in sys/socket.h])
AC_TRY_COMPILE([#define _POSIX_PII_SOCKET
#include <sys/types.h>
#include <sys/socket.h>], [socklen_t x = 5;],
[AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define it socklen_t typedef is in sys/socket.h.])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
AC_SUBST(enable_shared)
AC_SUBST(enable_static)
AC_CHECK_HEADER(stdint.h, [MF_HAVE_STDINT_H=1], [MF_HAVE_STDINT_H=0])
AC_SUBST(MF_HAVE_STDINT_H)
if test $MF_HAVE_STDINT_H = 1
then
MF_HAVE_UINTPTR_T=1
else
AC_TRY_COMPILE([#include <sys/types.h>], [uintptr_t k = 0;],
[MF_HAVE_UINTPTR_T=1], [MF_HAVE_UINTPTR_T=0])
fi
AC_SUBST(MF_HAVE_UINTPTR_T)
AC_CHECK_HEADERS(pthread.h)
AC_MSG_CHECKING([for thread model used by GCC])
target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
AC_MSG_RESULT([$target_thread_file])
# We only support posix threads, or no threads at all.
posix_threads=
case ${target_thread_file} in
posix)
posix_threads=yes
;;
single)
;;
*)
echo "${target_thread_file} is an unsupported thread package" 1>&2
exit 1
;;
esac
AM_CONDITIONAL(LIBMUDFLAPTH, [test "x$posix_threads" != "x"])
if test "x$posix_threads" != "x"
then
build_libmudflapth=1
else
build_libmudflapth=0
fi
AC_SUBST(build_libmudflapth)
AC_CHECK_LIB(dl, dlsym)
AC_CHECK_FUNC(connect,, AC_CHECK_LIB(socket, connect))
AC_CHECK_FUNC(sched_yield,, AC_CHECK_LIB(rt, sched_yield))
# Calculate toolexeclibdir
# Also toolexecdir, though it's only used in toolexeclibdir
case ${version_specific_libs} in
yes)
# Need the gcc compiler version to know where to install libraries
# and header files if --enable-version-specific-runtime-libs option
# is selected.
toolexecdir='$(libdir)/gcc/$(target_alias)'
toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
;;
no)
if test -n "$with_cross_host" &&
test x"$with_cross_host" != x"no"; then
# Install a library built with a cross compiler in tooldir, not libdir.
toolexecdir='$(exec_prefix)/$(target_alias)'
toolexeclibdir='$(toolexecdir)/lib'
else
toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
toolexeclibdir='$(libdir)'
fi
multi_os_directory=`$CC -print-multi-os-directory`
case $multi_os_directory in
.) ;; # Avoid trailing /.
*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
esac
;;
esac
AC_SUBST(toolexecdir)
AC_SUBST(toolexeclibdir)
includedir=${toolexecdir}/include
AC_SUBST(includedir)
pthread_create_version='""'
if test "x$enable_shared" = "xyes" && test "x$posix_threads" != "x"; then
# NB: don't check for -lpthread here, because then it would be
# added to LIBS. For the thread-unaware libmudflap.la, we don't
# want it there.
# glibc-related hacks. dlsym() may pick the wrong version of
# interposed functions like pthread_create on modern glibc.
# We need to find the proper symbol version string, and use
# the nonstandard dlvsym().
AC_CHECK_FUNCS(dlvsym)
AC_CHECK_TOOL(NM, nm)
if test "x$ac_cv_have_dlvsym" != "x"; then
# Try compiling a simple pthreads program. Find the shared libraries it
# ends up with. Then use "nm" on those libraries to extract the
# default symbol versioning suffix ("@@"), if any. But that's tricky.
# Rather, run nm on the resulting executable. Unfortunately, autoconf
# doesn't appear to have a macro that builds a test executable for
# subsequent analysis ... so we do it by hand here.
cat >> conftest.c << EOF
#include <pthread.h>
int main () { void *p = (void *) & pthread_create; return (int) p; }
EOF
oldLIBS="$LIBS"
LIBS="$LIBS -lpthread"
pthread_create_version="\"\""
AC_MSG_CHECKING(pthread_create symbol version)
if eval $ac_link 2>&5 && test -s conftest${ac_exeext}; then
version=`$NM conftest${ac_exeect} | grep 'pthread_create@@' | sed -e 's/^.*@@//'`
if test "x$version" != "x"; then
pthread_create_version="\"$version\""
fi
fi
AC_MSG_RESULT($pthread_create_version)
LIBS="$oldLIBS"
fi
fi
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_VERSION, $pthread_create_version, [pthread_create symbol version])
# Figure out whether the compiler supports "-ffunction-sections -fdata-sections",
# similarly to how libstdc++ does it
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
# Check for -ffunction-sections -fdata-sections
AC_MSG_CHECKING([for gcc that supports -ffunction-sections -fdata-sections])
CFLAGS='-Werror -ffunction-sections -fdata-sections'
AC_TRY_COMPILE(, [int foo;], [ac_fdsections=yes], [ac_fdsections=no])
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
else
# this is the suspicious part
CFLAGS=""
fi
if test x"$ac_fdsections" = x"yes"; then
SECTION_FLAGS='-ffunction-sections -fdata-sections'
fi
AC_MSG_RESULT($ac_fdsections)
AC_SUBST(SECTION_FLAGS)
# Check for the name of the symbol used for the entry point.
AC_CACHE_CHECK([for the name of the symbol used for the entry point],
[mudflap_cv_entry_point], [
for name in _start __start unknown; do
AC_LINK_IFELSE([AC_LANG_PROGRAM([extern char $name@<:@@:>@;], [$name@<:@0@:>@ = 0;])],
[break])
done
mudflap_cv_entry_point="$name"])
if test "$mudflap_cv_entry_point" = unknown; then
AC_MSG_ERROR([none of the known symbol names works])
fi
AC_DEFINE_UNQUOTED([ENTRY_POINT], [$mudflap_cv_entry_point],
[Define to the name of the symbol used for the entry point.])
if test ${multilib} = yes; then
multilib_arg="--enable-multilib"
else
multilib_arg=
fi
# See if we support thread-local storage.
GCC_CHECK_TLS
GCC_CHECK_EMUTLS
AC_CONFIG_FILES([Makefile testsuite/Makefile testsuite/mfconfig.exp])
AC_OUTPUT

View file

@ -1,6 +0,0 @@
# This file is used to maintain libtool version info for libmudflap. See
# the libtool manual to understand the meaning of the fields. This is
# a separate file so that version updates don't involve re-running
# automake.
# CURRENT:REVISION:AGE
0:0:0

View file

@ -1,169 +0,0 @@
/* Mudflap: narrow-pointer bounds-checking by tree rewriting.
Copyright (C) 2002-2013 Free Software Foundation, Inc.
Contributed by Frank Ch. Eigler <fche@redhat.com>
and Graydon Hoare <graydon@redhat.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#include <stdio.h>
#include "mf-runtime.h"
#include "mf-impl.h"
#ifdef _MUDFLAP
#error "Do not compile this file with -fmudflap!"
#endif
extern char _end[];
extern char ENTRY_POINT[];
/* Run some quick validation of the given region.
Return -1 / 0 / 1 if the access known-invalid, possibly-valid, or known-valid.
*/
int
__mf_heuristic_check (uintptr_t ptr, uintptr_t ptr_high)
{
VERBOSE_TRACE ("mf: heuristic check\n");
/* XXX: Disable the stack bounding check for libmudflapth. We do
actually have enough information to track stack bounds (see
__mf_pthread_info in mf-hooks.c), so with a bit of future work,
this heuristic can be turned on. */
#ifndef LIBMUDFLAPTH
/* The first heuristic is to check stack bounds. This is a
transient condition and quick to check. */
if (__mf_opts.heur_stack_bound)
{
uintptr_t stack_top_guess = (uintptr_t)__builtin_frame_address(0);
#if defined(__i386__) && defined (__linux__)
uintptr_t stack_segment_base = 0xC0000000; /* XXX: Bad assumption. */
#else
/* Cause tests to fail. */
uintptr_t stack_segment_base = 0;
#endif
VERBOSE_TRACE ("mf: stack estimated as %p-%p\n",
(void *) stack_top_guess, (void *) stack_segment_base);
if (ptr_high <= stack_segment_base &&
ptr >= stack_top_guess &&
ptr_high >= ptr)
{
return 1;
}
}
#endif
/* The second heuristic is to scan the range of memory regions
listed in /proc/self/maps, a special file provided by the Linux
kernel. Its results may be cached, and in fact, a GUESS object
may as well be recorded for interesting matching sections. */
if (__mf_opts.heur_proc_map)
{
/* Keep a record of seen records from /proc/self/map. */
enum { max_entries = 500 };
struct proc_self_map_entry
{
uintptr_t low;
uintptr_t high;
};
static struct proc_self_map_entry entry [max_entries];
static unsigned entry_used [max_entries];
/* Look for a known proc_self_map entry that may cover this
region. If one exists, then this heuristic has already run,
and should not be run again. The check should be allowed to
fail. */
unsigned i;
unsigned deja_vu = 0;
for (i=0; i<max_entries; i++)
{
if (entry_used[i] &&
(entry[i].low <= ptr) &&
(entry[i].high >= ptr_high))
deja_vu = 1;
}
if (! deja_vu)
{
/* Time to run the heuristic. Rescan /proc/self/maps; update the
entry[] array; XXX: remove expired entries, add new ones.
XXX: Consider entries that have grown (e.g., stack). */
char buf[512];
char flags[4];
void *low, *high;
FILE *fp;
fp = fopen ("/proc/self/maps", "r");
if (fp)
{
while (fgets (buf, sizeof(buf), fp))
{
if (sscanf (buf, "%p-%p %4c", &low, &high, flags) == 3)
{
if ((uintptr_t) low <= ptr &&
(uintptr_t) high >= ptr_high)
{
for (i=0; i<max_entries; i++)
{
if (! entry_used[i])
{
entry[i].low = (uintptr_t) low;
entry[i].high = (uintptr_t) high;
entry_used[i] = 1;
break;
}
}
VERBOSE_TRACE ("mf: registering region #%d "
"%p-%p given %s",
i, (void *) low, (void *) high, buf);
__mfu_register ((void *) low, (size_t) (high-low),
__MF_TYPE_GUESS,
"/proc/self/maps segment");
return 0; /* undecided (tending to cachable) */
}
}
}
fclose (fp);
}
}
}
/* The third heuristic is to approve all accesses between _start (or its
equivalent for the given target) and _end, which should include all
text and initialized data. */
if (__mf_opts.heur_start_end)
if (ptr >= (uintptr_t) & ENTRY_POINT && ptr_high <= (uintptr_t) & _end)
return 1; /* uncacheable */
return 0; /* unknown */
}

View file

@ -1,555 +0,0 @@
/* Mudflap: narrow-pointer bounds-checking by tree rewriting.
Copyright (C) 2002-2013 Free Software Foundation, Inc.
Contributed by Frank Ch. Eigler <fche@redhat.com>
and Graydon Hoare <graydon@redhat.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#ifndef HAVE_SOCKLEN_T
#define socklen_t int
#endif
/* These attempt to coax various unix flavours to declare all our
needed tidbits in the system headers. */
#if !defined(__FreeBSD__) && !defined(__APPLE__)
#define _POSIX_SOURCE
#endif /* Some BSDs break <sys/socket.h> if this is defined. */
#define _GNU_SOURCE
#define _XOPEN_SOURCE
#define _BSD_TYPES
#define __EXTENSIONS__
#define _ALL_SOURCE
#define _LARGE_FILE_API
#define _XOPEN_SOURCE_EXTENDED 1
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <assert.h>
#include <errno.h>
#include <limits.h>
#include <time.h>
#include "mf-runtime.h"
#include "mf-impl.h"
#ifdef _MUDFLAP
#error "Do not compile this file with -fmudflap!"
#endif
/* Memory allocation related hook functions. Some of these are
intercepted via linker wrapping or symbol interposition. Others
use plain macros in mf-runtime.h. */
#if PIC
enum { BS = 4096, NB=10 };
static char __mf_0fn_bufs[NB][BS];
static unsigned __mf_0fn_bufs_used[NB];
/* A special bootstrap variant. */
void *
__mf_0fn_malloc (size_t c)
{
unsigned i;
for (i=0; i<NB; i++)
{
if (! __mf_0fn_bufs_used[i] && c < BS)
{
__mf_0fn_bufs_used[i] = 1;
return & __mf_0fn_bufs[i][0];
}
}
return NULL;
}
#endif
#undef malloc
WRAPPER(void *, malloc, size_t c)
{
size_t size_with_crumple_zones;
DECLARE(void *, malloc, size_t c);
void *result;
BEGIN_PROTECT (malloc, c);
size_with_crumple_zones =
CLAMPADD(c,CLAMPADD(__mf_opts.crumple_zone,
__mf_opts.crumple_zone));
BEGIN_MALLOC_PROTECT ();
result = (char *) CALL_REAL (malloc, size_with_crumple_zones);
END_MALLOC_PROTECT ();
if (LIKELY(result))
{
result += __mf_opts.crumple_zone;
__mf_register (result, c, __MF_TYPE_HEAP, "malloc region");
/* XXX: register __MF_TYPE_NOACCESS for crumple zones. */
}
return result;
}
#ifdef PIC
/* A special bootstrap variant. */
void *
__mf_0fn_calloc (size_t c, size_t n)
{
return __mf_0fn_malloc (c * n);
}
#endif
#undef calloc
WRAPPER(void *, calloc, size_t c, size_t n)
{
size_t size_with_crumple_zones;
DECLARE(void *, calloc, size_t, size_t);
DECLARE(void *, malloc, size_t);
DECLARE(void *, memset, void *, int, size_t);
char *result;
BEGIN_PROTECT (calloc, c, n);
size_with_crumple_zones =
CLAMPADD((c * n), /* XXX: CLAMPMUL */
CLAMPADD(__mf_opts.crumple_zone,
__mf_opts.crumple_zone));
BEGIN_MALLOC_PROTECT ();
result = (char *) CALL_REAL (malloc, size_with_crumple_zones);
END_MALLOC_PROTECT ();
if (LIKELY(result))
memset (result, 0, size_with_crumple_zones);
if (LIKELY(result))
{
result += __mf_opts.crumple_zone;
__mf_register (result, c*n /* XXX: clamp */, __MF_TYPE_HEAP_I, "calloc region");
/* XXX: register __MF_TYPE_NOACCESS for crumple zones. */
}
return result;
}
#if PIC
/* A special bootstrap variant. */
void *
__mf_0fn_realloc (void *buf, size_t c)
{
return NULL;
}
#endif
#undef realloc
WRAPPER(void *, realloc, void *buf, size_t c)
{
DECLARE(void * , realloc, void *, size_t);
size_t size_with_crumple_zones;
char *base = buf;
unsigned saved_wipe_heap;
char *result;
BEGIN_PROTECT (realloc, buf, c);
if (LIKELY(buf))
base -= __mf_opts.crumple_zone;
size_with_crumple_zones =
CLAMPADD(c, CLAMPADD(__mf_opts.crumple_zone,
__mf_opts.crumple_zone));
BEGIN_MALLOC_PROTECT ();
result = (char *) CALL_REAL (realloc, base, size_with_crumple_zones);
END_MALLOC_PROTECT ();
/* Ensure heap wiping doesn't occur during this peculiar
unregister/reregister pair. */
LOCKTH ();
__mf_set_state (reentrant);
saved_wipe_heap = __mf_opts.wipe_heap;
__mf_opts.wipe_heap = 0;
if (LIKELY(buf))
__mfu_unregister (buf, 0, __MF_TYPE_HEAP_I);
/* NB: underlying region may have been __MF_TYPE_HEAP. */
if (LIKELY(result))
{
result += __mf_opts.crumple_zone;
__mfu_register (result, c, __MF_TYPE_HEAP_I, "realloc region");
/* XXX: register __MF_TYPE_NOACCESS for crumple zones. */
}
/* Restore previous setting. */
__mf_opts.wipe_heap = saved_wipe_heap;
__mf_set_state (active);
UNLOCKTH ();
return result;
}
#if PIC
/* A special bootstrap variant. */
void
__mf_0fn_free (void *buf)
{
return;
}
#endif
#undef free
WRAPPER(void, free, void *buf)
{
/* Use a circular queue to delay some number (__mf_opts.free_queue_length) of free()s. */
static void *free_queue [__MF_FREEQ_MAX];
static unsigned free_ptr = 0;
static int freeq_initialized = 0;
DECLARE(void, free, void *);
if (UNLIKELY(buf == NULL))
return;
BEGIN_PROTECT (free, buf);
#if PIC
/* Check whether the given buffer might have come from a
__mf_0fn_malloc/calloc call that for whatever reason was not
redirected back to __mf_0fn_free. If so, we just ignore the
call. */
if (UNLIKELY((uintptr_t) buf >= (uintptr_t) __mf_0fn_bufs &&
(uintptr_t) buf < ((uintptr_t) __mf_0fn_bufs + sizeof(__mf_0fn_bufs))))
{
VERBOSE_TRACE ("skipping free of boot (0fn) alloc buffer %p\n", buf);
return;
}
#endif
LOCKTH ();
if (UNLIKELY(!freeq_initialized))
{
memset (free_queue, 0,
__MF_FREEQ_MAX * sizeof (void *));
freeq_initialized = 1;
}
UNLOCKTH ();
__mf_unregister (buf, 0, __MF_TYPE_HEAP_I);
/* NB: underlying region may have been __MF_TYPE_HEAP. */
if (UNLIKELY(__mf_opts.free_queue_length > 0))
{
char *freeme = NULL;
LOCKTH ();
if (free_queue [free_ptr] != NULL)
{
freeme = free_queue [free_ptr];
freeme -= __mf_opts.crumple_zone;
}
free_queue [free_ptr] = buf;
free_ptr = (free_ptr == (__mf_opts.free_queue_length-1) ? 0 : free_ptr + 1);
UNLOCKTH ();
if (freeme)
{
if (__mf_opts.trace_mf_calls)
{
VERBOSE_TRACE ("freeing deferred pointer %p (crumple %u)\n",
(void *) freeme,
__mf_opts.crumple_zone);
}
BEGIN_MALLOC_PROTECT ();
CALL_REAL (free, freeme);
END_MALLOC_PROTECT ();
}
}
else
{
/* back pointer up a bit to the beginning of crumple zone */
char *base = (char *)buf;
base -= __mf_opts.crumple_zone;
if (__mf_opts.trace_mf_calls)
{
VERBOSE_TRACE ("freeing pointer %p = %p - %u\n",
(void *) base,
(void *) buf,
__mf_opts.crumple_zone);
}
BEGIN_MALLOC_PROTECT ();
CALL_REAL (free, base);
END_MALLOC_PROTECT ();
}
}
/* We can only wrap mmap if the target supports it. Likewise for munmap.
We assume we have both if we have mmap. */
#ifdef HAVE_MMAP
#if PIC
/* A special bootstrap variant. */
void *
__mf_0fn_mmap (void *start, size_t l, int prot, int f, int fd, off_t off)
{
#if defined(__FreeBSD__)
if (f == 0x1000 && fd == -1 && prot == 0 && off == 0)
return 0;
#endif /* Ignore red zone allocation request for initial thread's stack. */
return (void *) -1;
}
#endif
#undef mmap
WRAPPER(void *, mmap,
void *start, size_t length, int prot,
int flags, int fd, off_t offset)
{
DECLARE(void *, mmap, void *, size_t, int,
int, int, off_t);
void *result;
BEGIN_PROTECT (mmap, start, length, prot, flags, fd, offset);
result = CALL_REAL (mmap, start, length, prot,
flags, fd, offset);
/*
VERBOSE_TRACE ("mmap (%08lx, %08lx, ...) => %08lx\n",
(uintptr_t) start, (uintptr_t) length,
(uintptr_t) result);
*/
if (result != (void *)-1)
{
/* Register each page as a heap object. Why not register it all
as a single segment? That's so that a later munmap() call
can unmap individual pages. XXX: would __MF_TYPE_GUESS make
this more automatic? */
size_t ps = getpagesize ();
uintptr_t base = (uintptr_t) result;
uintptr_t offset;
for (offset=0; offset<length; offset+=ps)
{
/* XXX: We could map PROT_NONE to __MF_TYPE_NOACCESS. */
/* XXX: Unaccessed HEAP pages are reported as leaks. Is this
appropriate for unaccessed mmap pages? */
__mf_register ((void *) CLAMPADD (base, offset), ps,
__MF_TYPE_HEAP_I, "mmap page");
}
}
return result;
}
#if PIC
/* A special bootstrap variant. */
int
__mf_0fn_munmap (void *start, size_t length)
{
return -1;
}
#endif
#undef munmap
WRAPPER(int , munmap, void *start, size_t length)
{
DECLARE(int, munmap, void *, size_t);
int result;
BEGIN_PROTECT (munmap, start, length);
result = CALL_REAL (munmap, start, length);
/*
VERBOSE_TRACE ("munmap (%08lx, %08lx, ...) => %08lx\n",
(uintptr_t) start, (uintptr_t) length,
(uintptr_t) result);
*/
if (result == 0)
{
/* Unregister each page as a heap object. */
size_t ps = getpagesize ();
uintptr_t base = (uintptr_t) start & (~ (ps - 1)); /* page align */
uintptr_t offset;
for (offset=0; offset<length; offset+=ps)
__mf_unregister ((void *) CLAMPADD (base, offset), ps, __MF_TYPE_HEAP_I);
}
return result;
}
#endif /* HAVE_MMAP */
#ifdef HAVE_MMAP64
#if PIC
/* A special bootstrap variant. */
void *
__mf_0fn_mmap64 (void *start, size_t l, int prot, int f, int fd, off64_t off)
{
return (void *) -1;
}
#endif
#undef mmap
WRAPPER(void *, mmap64,
void *start, size_t length, int prot,
int flags, int fd, off64_t offset)
{
DECLARE(void *, mmap64, void *, size_t, int,
int, int, off64_t);
void *result;
BEGIN_PROTECT (mmap64, start, length, prot, flags, fd, offset);
result = CALL_REAL (mmap64, start, length, prot,
flags, fd, offset);
/*
VERBOSE_TRACE ("mmap64 (%08lx, %08lx, ...) => %08lx\n",
(uintptr_t) start, (uintptr_t) length,
(uintptr_t) result);
*/
if (result != (void *)-1)
{
/* Register each page as a heap object. Why not register it all
as a single segment? That's so that a later munmap() call
can unmap individual pages. XXX: would __MF_TYPE_GUESS make
this more automatic? */
size_t ps = getpagesize ();
uintptr_t base = (uintptr_t) result;
uintptr_t offset;
for (offset=0; offset<length; offset+=ps)
{
/* XXX: We could map PROT_NONE to __MF_TYPE_NOACCESS. */
/* XXX: Unaccessed HEAP pages are reported as leaks. Is this
appropriate for unaccessed mmap pages? */
__mf_register ((void *) CLAMPADD (base, offset), ps,
__MF_TYPE_HEAP_I, "mmap64 page");
}
}
return result;
}
#endif /* HAVE_MMAP64 */
/* This wrapper is a little different, as it's called indirectly from
__mf_fini also to clean up pending allocations. */
void *
__mf_wrap_alloca_indirect (size_t c)
{
DECLARE (void *, malloc, size_t);
DECLARE (void, free, void *);
/* This struct, a linked list, tracks alloca'd objects. The newest
object is at the head of the list. If we detect that we've
popped a few levels of stack, then the listed objects are freed
as needed. NB: The tracking struct is allocated with
real_malloc; the user data with wrap_malloc.
*/
struct alloca_tracking { void *ptr; void *stack; struct alloca_tracking* next; };
static struct alloca_tracking *alloca_history = NULL;
void *stack = __builtin_frame_address (0);
void *result;
struct alloca_tracking *track;
TRACE ("%s\n", __PRETTY_FUNCTION__);
VERBOSE_TRACE ("alloca stack level %p\n", (void *) stack);
/* XXX: thread locking! */
/* Free any previously alloca'd blocks that belong to deeper-nested functions,
which must therefore have exited by now. */
#define DEEPER_THAN < /* XXX: for x86; steal find_stack_direction() from libiberty/alloca.c */
while (alloca_history &&
((uintptr_t) alloca_history->stack DEEPER_THAN (uintptr_t) stack))
{
struct alloca_tracking *next = alloca_history->next;
__mf_unregister (alloca_history->ptr, 0, __MF_TYPE_HEAP);
BEGIN_MALLOC_PROTECT ();
CALL_REAL (free, alloca_history->ptr);
CALL_REAL (free, alloca_history);
END_MALLOC_PROTECT ();
alloca_history = next;
}
/* Allocate new block. */
result = NULL;
if (LIKELY (c > 0)) /* alloca(0) causes no allocation. */
{
BEGIN_MALLOC_PROTECT ();
track = (struct alloca_tracking *) CALL_REAL (malloc,
sizeof (struct alloca_tracking));
END_MALLOC_PROTECT ();
if (LIKELY (track != NULL))
{
BEGIN_MALLOC_PROTECT ();
result = CALL_REAL (malloc, c);
END_MALLOC_PROTECT ();
if (UNLIKELY (result == NULL))
{
BEGIN_MALLOC_PROTECT ();
CALL_REAL (free, track);
END_MALLOC_PROTECT ();
/* Too bad. XXX: What about errno? */
}
else
{
__mf_register (result, c, __MF_TYPE_HEAP, "alloca region");
track->ptr = result;
track->stack = stack;
track->next = alloca_history;
alloca_history = track;
}
}
}
return result;
}
#undef alloca
WRAPPER(void *, alloca, size_t c)
{
return __mf_wrap_alloca_indirect (c);
}

File diff suppressed because it is too large Load diff

View file

@ -1,284 +0,0 @@
/* Mudflap: narrow-pointer bounds-checking by tree rewriting.
Copyright (C) 2002-2013 Free Software Foundation, Inc.
Contributed by Frank Ch. Eigler <fche@redhat.com>
and Graydon Hoare <graydon@redhat.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#ifndef HAVE_SOCKLEN_T
#define socklen_t int
#endif
/* These attempt to coax various unix flavours to declare all our
needed tidbits in the system headers. */
#if !defined(__FreeBSD__) && !defined(__APPLE__)
#define _POSIX_SOURCE
#endif /* Some BSDs break <sys/socket.h> if this is defined. */
#define _GNU_SOURCE
#define _XOPEN_SOURCE
#define _BSD_TYPES
#define __EXTENSIONS__
#define _ALL_SOURCE
#define _LARGE_FILE_API
#define _XOPEN_SOURCE_EXTENDED 1
#define _REENTRANT
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
#include <errno.h>
#include <stdbool.h>
#include "mf-runtime.h"
#include "mf-impl.h"
#ifdef _MUDFLAP
#error "Do not compile this file with -fmudflap!"
#endif
#ifndef LIBMUDFLAPTH
#error "pthreadstuff is to be included only in libmudflapth"
#endif
/* ??? Why isn't this done once in the header files. */
DECLARE(void *, malloc, size_t sz);
DECLARE(void, free, void *ptr);
DECLARE(int, pthread_create, pthread_t *thr, const pthread_attr_t *attr,
void * (*start) (void *), void *arg);
/* Multithreading support hooks. */
#if !defined(HAVE_TLS) || defined(USE_EMUTLS)
/* We don't have TLS. Ordinarily we could use pthread keys, but since we're
commandeering malloc/free that presents a few problems. The first is that
we'll recurse from __mf_get_state to pthread_setspecific to malloc back to
__mf_get_state during thread startup. This can be solved with clever uses
of a mutex. The second problem is that thread shutdown is indistinguishable
from thread startup, since libpthread is deallocating our state variable.
I've no good solution for this.
Which leaves us to handle this mess by totally by hand. */
/* Yes, we want this prime. If pthread_t is a pointer, it's almost always
page aligned, and if we use a smaller power of 2, this results in "%N"
being the worst possible hash -- all threads hash to zero. */
#define LIBMUDFLAPTH_THREADS_MAX 1021
struct mf_thread_data
{
pthread_t self;
unsigned char used_p;
unsigned char state;
};
static struct mf_thread_data mf_thread_data[LIBMUDFLAPTH_THREADS_MAX];
static pthread_mutex_t mf_thread_data_lock = PTHREAD_MUTEX_INITIALIZER;
#define PTHREAD_HASH(p) ((unsigned long) (p) % LIBMUDFLAPTH_THREADS_MAX)
static struct mf_thread_data *
__mf_find_threadinfo (int alloc)
{
pthread_t self = pthread_self ();
unsigned long hash = PTHREAD_HASH (self);
unsigned long rehash;
#ifdef __alpha__
/* Alpha has the loosest memory ordering rules of all. We need a memory
barrier to flush the reorder buffer before considering a *read* of a
shared variable. Since we're not always taking a lock, we have to do
this by hand. */
__sync_synchronize ();
#endif
rehash = hash;
while (1)
{
if (mf_thread_data[rehash].used_p && mf_thread_data[rehash].self == self)
return &mf_thread_data[rehash];
rehash += 7;
if (rehash >= LIBMUDFLAPTH_THREADS_MAX)
rehash -= LIBMUDFLAPTH_THREADS_MAX;
if (rehash == hash)
break;
}
if (alloc)
{
pthread_mutex_lock (&mf_thread_data_lock);
rehash = hash;
while (1)
{
if (!mf_thread_data[rehash].used_p)
{
mf_thread_data[rehash].self = self;
__sync_synchronize ();
mf_thread_data[rehash].used_p = 1;
pthread_mutex_unlock (&mf_thread_data_lock);
return &mf_thread_data[rehash];
}
rehash += 7;
if (rehash >= LIBMUDFLAPTH_THREADS_MAX)
rehash -= LIBMUDFLAPTH_THREADS_MAX;
if (rehash == hash)
break;
}
pthread_mutex_unlock (&mf_thread_data_lock);
}
return NULL;
}
enum __mf_state_enum
__mf_get_state (void)
{
struct mf_thread_data *data = __mf_find_threadinfo (0);
if (data)
return data->state;
/* If we've never seen this thread before, consider it to be in the
reentrant state. The state gets reset to active for the main thread
in __mf_init, and for child threads in __mf_pthread_spawner.
The trickiest bit here is that the LinuxThreads pthread_manager thread
should *always* be considered to be reentrant, so that none of our
hooks actually do anything. Why? Because that thread isn't a real
thread from the point of view of the thread library, and so lots of
stuff isn't initialized, leading to SEGV very quickly. Even calling
pthread_self is a bit suspect, but it happens to work. */
return reentrant;
}
void
__mf_set_state (enum __mf_state_enum new_state)
{
struct mf_thread_data *data = __mf_find_threadinfo (1);
data->state = new_state;
}
#endif
/* The following two functions are used only with __mf_opts.heur_std_data.
We're interested in recording the location of the thread-local errno
variable.
Note that this doesn't handle TLS references in general; we have no
visibility into __tls_get_data for when that memory is allocated at
runtime. Hopefully we get to see the malloc or mmap operation that
eventually allocates the backing store. */
/* Describe the startup information for a new user thread. */
struct mf_thread_start_info
{
/* The user's thread entry point and argument. */
void * (*user_fn)(void *);
void *user_arg;
};
static void
__mf_pthread_cleanup (void *arg)
{
if (__mf_opts.heur_std_data)
__mf_unregister (&errno, sizeof (errno), __MF_TYPE_GUESS);
#if !defined(HAVE_TLS) || defined(USE_EMUTLS)
struct mf_thread_data *data = __mf_find_threadinfo (0);
if (data)
data->used_p = 0;
#endif
}
static void *
__mf_pthread_spawner (void *arg)
{
void *result = NULL;
__mf_set_state (active);
/* NB: We could use __MF_TYPE_STATIC here, but we guess that the thread
errno is coming out of some dynamically allocated pool that we already
know of as __MF_TYPE_HEAP. */
if (__mf_opts.heur_std_data)
__mf_register (&errno, sizeof (errno), __MF_TYPE_GUESS,
"errno area (thread)");
/* We considered using pthread_key_t objects instead of these
cleanup stacks, but they were less cooperative with the
interposed malloc hooks in libmudflap. */
/* ??? The pthread_key_t problem is solved above... */
pthread_cleanup_push (__mf_pthread_cleanup, NULL);
/* Extract given entry point and argument. */
struct mf_thread_start_info *psi = arg;
void * (*user_fn)(void *) = psi->user_fn;
void *user_arg = psi->user_arg;
CALL_REAL (free, arg);
result = (*user_fn)(user_arg);
pthread_cleanup_pop (1 /* execute */);
return result;
}
#if PIC
/* A special bootstrap variant. */
int
__mf_0fn_pthread_create (pthread_t *thr, const pthread_attr_t *attr,
void * (*start) (void *), void *arg)
{
return -1;
}
#endif
#undef pthread_create
WRAPPER(int, pthread_create, pthread_t *thr, const pthread_attr_t *attr,
void * (*start) (void *), void *arg)
{
struct mf_thread_start_info *si;
TRACE ("pthread_create\n");
/* Fill in startup-control fields. */
si = CALL_REAL (malloc, sizeof (*si));
si->user_fn = start;
si->user_arg = arg;
/* Actually create the thread. */
return CALL_REAL (pthread_create, thr, attr, __mf_pthread_spawner, si);
}

View file

@ -1,419 +0,0 @@
/* Implementation header for mudflap runtime library.
Mudflap: narrow-pointer bounds-checking by tree rewriting.
Copyright (C) 2002-2013 Free Software Foundation, Inc.
Contributed by Frank Ch. Eigler <fche@redhat.com>
and Graydon Hoare <graydon@redhat.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
#ifndef __MF_IMPL_H
#define __MF_IMPL_H
#ifdef _MUDFLAP
#error "Do not compile this file with -fmudflap!"
#endif
#if HAVE_PTHREAD_H
#include <pthread.h>
#elif LIBMUDFLAPTH
#error "Cannot build libmudflapth without pthread.h."
#endif
#if HAVE_STDINT_H
#include <stdint.h>
#else
typedef __mf_uintptr_t uintptr_t;
#endif
/* Private definitions related to mf-runtime.h */
#define __MF_TYPE_MAX_CEM __MF_TYPE_STACK /* largest type# for the cemetery */
#define __MF_TYPE_MAX __MF_TYPE_GUESS
#ifndef max
#define max(a,b) ((a) > (b) ? (a) : (b))
#endif
#ifndef min
#define min(a,b) ((a) < (b) ? (a) : (b))
#endif
/* Address calculation macros. */
#define MINPTR ((uintptr_t) 0)
#define MAXPTR (~ (uintptr_t) 0)
/* Clamp the addition/subtraction of uintptr_t's to [MINPTR,MAXPTR] */
#define CLAMPSUB(ptr,offset) (((uintptr_t) ptr) >= (offset) ? ((uintptr_t) ptr)-((uintptr_t) offset) : MINPTR)
#define CLAMPADD(ptr,offset) (((uintptr_t) ptr) <= MAXPTR-(offset) ? ((uintptr_t) ptr)+((uintptr_t) offset) : MAXPTR)
#define CLAMPSZ(ptr,size) ((size) ? (((uintptr_t) ptr) <= MAXPTR-(size)+1 ? ((uintptr_t) ptr)+((uintptr_t) size) - 1 : MAXPTR) : ((uintptr_t) ptr))
#define __MF_CACHE_INDEX(ptr) ((((uintptr_t) (ptr)) >> __mf_lc_shift) & __mf_lc_mask)
#define __MF_CACHE_MISS_P(ptr,sz) ({ \
struct __mf_cache *elem = & __mf_lookup_cache[__MF_CACHE_INDEX((ptr))]; \
((elem->low > (uintptr_t) (ptr)) || \
(elem->high < (CLAMPADD((uintptr_t) (ptr), (uintptr_t) CLAMPSUB(sz,1) )))); })
/* XXX: the above should use CLAMPSZ () */
/* Private functions. */
extern void __mf_violation (void *ptr, size_t sz,
uintptr_t pc, const char *location,
int type);
extern size_t __mf_backtrace (char ***, void *, unsigned);
extern int __mf_heuristic_check (uintptr_t, uintptr_t);
/* ------------------------------------------------------------------------ */
/* Type definitions. */
/* ------------------------------------------------------------------------ */
/* The mf_state type codes describe recursion and initialization order.
reentrant means we are inside a mf-runtime support routine, such as
__mf_register, and thus there should be no calls to any wrapped functions,
such as the wrapped malloc. This indicates a bug if it occurs.
in_malloc means we are inside a real malloc call inside a wrapped malloc
call, and thus there should be no calls to any wrapped functions like the
wrapped mmap. This happens on some systems due to how the system libraries
are constructed. */
enum __mf_state_enum { active, reentrant, in_malloc };
/* The __mf_options structure records optional or tunable aspects of the
mudflap library's behavior. There is a single global instance of this
structure which is populated from user input (in an environment variable)
when the library initializes. */
struct __mf_options
{
/* Emit a trace message for each call. */
unsigned trace_mf_calls;
/* Collect and emit statistics. */
unsigned collect_stats;
/* Set up a SIGUSR1 -> __mf_report handler. */
unsigned sigusr1_report;
/* Execute internal checking code. */
unsigned internal_checking;
/* Age object liveness periodically. */
unsigned tree_aging;
/* Adapt the lookup cache to working set. */
unsigned adapt_cache;
/* Print list of leaked heap objects on shutdown. */
unsigned print_leaks;
#ifdef HAVE___LIBC_FREERES
/* Call __libc_freeres before leak analysis. */
unsigned call_libc_freeres;
#endif
/* Detect reads of uninitialized objects. */
unsigned check_initialization;
/* Print verbose description of violations. */
unsigned verbose_violations;
/* Abbreviate duplicate object descriptions. */
unsigned abbreviate;
/* Emit internal tracing message. */
unsigned verbose_trace;
/* Wipe stack/heap objects upon unwind. */
unsigned wipe_stack;
unsigned wipe_heap;
/* Maintain a queue of this many deferred free()s,
to trap use of freed memory. */
unsigned free_queue_length;
/* Maintain a history of this many past unregistered objects. */
unsigned persistent_count;
/* Pad allocated extents by this many bytes on either side. */
unsigned crumple_zone;
/* Maintain this many stack frames for contexts. */
unsigned backtrace;
/* Ignore read operations even if mode_check is in effect. */
unsigned ignore_reads;
/* Collect register/unregister timestamps. */
unsigned timestamps;
#ifdef LIBMUDFLAPTH
/* Thread stack size. */
unsigned thread_stack;
#endif
/* Major operation mode */
#define mode_nop 0 /* Do nothing. */
#define mode_populate 1 /* Populate tree but do not check for violations. */
#define mode_check 2 /* Populate and check for violations (normal). */
#define mode_violate 3 /* Trigger a violation on every call (diagnostic). */
unsigned mudflap_mode;
/* How to handle a violation. */
#define viol_nop 0 /* Return control to application. */
#define viol_segv 1 /* Signal self with segv. */
#define viol_abort 2 /* Call abort (). */
#define viol_gdb 3 /* Fork a debugger on self */
unsigned violation_mode;
/* Violation heuristics selection. */
unsigned heur_stack_bound; /* allow current stack region */
unsigned heur_proc_map; /* allow & cache /proc/self/map regions. */
unsigned heur_start_end; /* allow _start .. _end */
unsigned heur_std_data; /* allow & cache stdlib data */
};
#ifdef PIC
/* This is a table of dynamically resolved function pointers. */
struct __mf_dynamic_entry
{
void *pointer;
char *name;
char *version;
};
/* The definition of the array (mf-runtime.c) must match the enums! */
extern struct __mf_dynamic_entry __mf_dynamic[];
enum __mf_dynamic_index
{
dyn_calloc, dyn_free, dyn_malloc, dyn_mmap,
#ifdef HAVE_MMAP64
dyn_mmap64,
#endif
dyn_munmap, dyn_realloc,
dyn_INITRESOLVE, /* Marker for last init-time resolution. */
#ifdef LIBMUDFLAPTH
dyn_pthread_create
#endif
};
#endif /* PIC */
/* ------------------------------------------------------------------------ */
/* Private global variables. */
/* ------------------------------------------------------------------------ */
#ifdef LIBMUDFLAPTH
extern pthread_mutex_t __mf_biglock;
#define LOCKTH() do { extern unsigned long __mf_lock_contention; \
int rc = pthread_mutex_trylock (& __mf_biglock); \
if (rc) { __mf_lock_contention ++; \
rc = pthread_mutex_lock (& __mf_biglock); } \
assert (rc==0); } while (0)
#define UNLOCKTH() do { int rc = pthread_mutex_unlock (& __mf_biglock); \
assert (rc==0); } while (0)
#else
#define LOCKTH() do {} while (0)
#define UNLOCKTH() do {} while (0)
#endif
#if defined(LIBMUDFLAPTH) && (!defined(HAVE_TLS) || defined(USE_EMUTLS))
extern enum __mf_state_enum __mf_get_state (void);
extern void __mf_set_state (enum __mf_state_enum);
#else
# ifdef LIBMUDFLAPTH
extern __thread enum __mf_state_enum __mf_state_1;
# else
extern enum __mf_state_enum __mf_state_1;
# endif
static inline enum __mf_state_enum __mf_get_state (void)
{
return __mf_state_1;
}
static inline void __mf_set_state (enum __mf_state_enum s)
{
__mf_state_1 = s;
}
#endif
extern int __mf_starting_p;
extern struct __mf_options __mf_opts;
/* ------------------------------------------------------------------------ */
/* Utility macros. */
/* ------------------------------------------------------------------------ */
#define UNLIKELY(e) (__builtin_expect (!!(e), 0))
#define LIKELY(e) (__builtin_expect (!!(e), 1))
#define STRINGIFY2(e) #e
#define STRINGIFY(e) STRINGIFY2(e)
#ifdef LIBMUDFLAPTH
#define VERBOSE_TRACE(...) \
do { if (UNLIKELY (__mf_opts.verbose_trace)) { \
fprintf (stderr, "mf(%u): ", (unsigned) pthread_self ()); \
fprintf (stderr, __VA_ARGS__); \
} } while (0)
#define TRACE(...) \
do { if (UNLIKELY (__mf_opts.trace_mf_calls)) { \
fprintf (stderr, "mf(%u): ", (unsigned) pthread_self ()); \
fprintf (stderr, __VA_ARGS__); \
} } while (0)
#else
#define VERBOSE_TRACE(...) \
do { if (UNLIKELY (__mf_opts.verbose_trace)) { \
fprintf (stderr, "mf: "); \
fprintf (stderr, __VA_ARGS__); \
} } while (0)
#define TRACE(...) \
do { if (UNLIKELY (__mf_opts.trace_mf_calls)) { \
fprintf (stderr, "mf: "); \
fprintf (stderr, __VA_ARGS__); \
} } while (0)
#endif
#define __MF_PERSIST_MAX 256
#define __MF_FREEQ_MAX 256
/*
Wrapping and redirection:
Mudflap redirects a number of libc functions into itself, for "cheap"
verification (eg. strcpy, bzero, memcpy) and also to register /
unregister regions of memory as they are manipulated by the program
(eg. malloc/free, mmap/munmap).
There are two methods of wrapping.
(1) The static method involves a list of -wrap=foo flags being passed to
the linker, which then links references to "foo" to the symbol
"__wrap_foo", and links references to "__real_foo" to the symbol "foo".
When compiled without -DPIC, libmudflap.a contains such __wrap_foo
functions which delegate to __real_foo functions in libc to get their
work done.
(2) The dynamic method involves providing a definition of symbol foo in
libmudflap.so and linking it earlier in the compiler command line,
before libc.so. The function "foo" in libmudflap must then call
dlsym(RTLD_NEXT, "foo") to acquire a pointer to the "real" libc foo, or
at least the "next" foo in the dynamic link resolution order.
We switch between these two techniques by the presence of the -DPIC
#define passed in by libtool when building libmudflap.
*/
#ifdef PIC
extern void __mf_resolve_single_dynamic (struct __mf_dynamic_entry *);
#define _GNU_SOURCE
#include <dlfcn.h>
#define WRAPPER(ret, fname, ...) \
ret __wrap_ ## fname (__VA_ARGS__) \
__attribute__ (( alias (#fname) )); \
ret __real_ ## fname (__VA_ARGS__) \
__attribute__ (( alias (#fname) )); \
ret fname (__VA_ARGS__)
#define DECLARE(ty, fname, ...) \
typedef ty (*__mf_fn_ ## fname) (__VA_ARGS__); \
extern ty __mf_0fn_ ## fname (__VA_ARGS__);
#define CALL_REAL(fname, ...) \
({__mf_starting_p \
? __mf_0fn_ ## fname (__VA_ARGS__) \
: (__mf_resolve_single_dynamic (& __mf_dynamic[dyn_ ## fname]), \
(((__mf_fn_ ## fname)(__mf_dynamic[dyn_ ## fname].pointer)) (__VA_ARGS__)));})
#define CALL_BACKUP(fname, ...) \
__mf_0fn_ ## fname(__VA_ARGS__)
#else /* not PIC --> static library */
#define WRAPPER(ret, fname, ...) \
ret __wrap_ ## fname (__VA_ARGS__)
#define DECLARE(ty, fname, ...) \
extern ty __real_ ## fname (__VA_ARGS__)
#define CALL_REAL(fname, ...) \
__real_ ## fname (__VA_ARGS__)
#define CALL_BACKUP(fname, ...) \
__real_ ## fname(__VA_ARGS__)
#endif /* PIC */
/* WRAPPER2 is for functions intercepted via macros at compile time. */
#define WRAPPER2(ret, fname, ...) \
ret __mfwrap_ ## fname (__VA_ARGS__)
/* Utility macros for mf-hooks*.c */
#define MF_VALIDATE_EXTENT(value,size,acc,context) \
do { \
if (UNLIKELY (size > 0 && __MF_CACHE_MISS_P (value, size))) \
if (acc == __MF_CHECK_WRITE || ! __mf_opts.ignore_reads) \
__mf_check ((void *) (value), (size), acc, "(" context ")"); \
} while (0)
#define BEGIN_PROTECT(fname, ...) \
if (UNLIKELY (__mf_starting_p)) \
{ \
return CALL_BACKUP(fname, __VA_ARGS__); \
} \
else if (UNLIKELY (__mf_get_state () == reentrant)) \
{ \
extern unsigned long __mf_reentrancy; \
__mf_reentrancy ++; \
return CALL_REAL(fname, __VA_ARGS__); \
} \
else if (UNLIKELY (__mf_get_state () == in_malloc)) \
{ \
return CALL_REAL(fname, __VA_ARGS__); \
} \
else \
{ \
TRACE ("%s\n", __PRETTY_FUNCTION__); \
}
/* There is an assumption here that these will only be called in routines
that call BEGIN_PROTECT at the start, and hence the state must always
be active when BEGIN_MALLOC_PROTECT is called. */
#define BEGIN_MALLOC_PROTECT() \
__mf_set_state (in_malloc)
#define END_MALLOC_PROTECT() \
__mf_set_state (active)
/* Unlocked variants of main entry points from mf-runtime.h. */
extern void __mfu_check (void *ptr, size_t sz, int type, const char *location);
extern void __mfu_register (void *ptr, size_t sz, int type, const char *name);
extern void __mfu_unregister (void *ptr, size_t sz, int type);
extern void __mfu_report ();
extern int __mfu_set_options (const char *opts);
#endif /* __MF_IMPL_H */

File diff suppressed because it is too large Load diff

View file

@ -1,244 +0,0 @@
/* Implementation header for mudflap runtime library.
Mudflap: narrow-pointer bounds-checking by tree rewriting.
Copyright (C) 2002-2013 Free Software Foundation, Inc.
Contributed by Frank Ch. Eigler <fche@redhat.com>
and Graydon Hoare <graydon@redhat.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
/* Public libmudflap declarations -*- C -*- */
#ifndef MF_RUNTIME_H
#define MF_RUNTIME_H
typedef void *__mf_ptr_t;
typedef unsigned int __mf_uintptr_t __attribute__ ((__mode__ (__pointer__)));
typedef __SIZE_TYPE__ __mf_size_t;
/* Global declarations used by instrumentation. When _MUDFLAP is
defined, these have been auto-declared by the compiler and we
should not declare them again (ideally we *would* declare them
again, to verify that the compiler's declarations match the
library's, but the C++ front end has no mechanism for allowing
the re-definition of a structure type). */
#ifndef _MUDFLAP
struct __mf_cache { __mf_uintptr_t low; __mf_uintptr_t high; };
extern struct __mf_cache __mf_lookup_cache [];
extern __mf_uintptr_t __mf_lc_mask;
extern unsigned char __mf_lc_shift;
#endif
/* Multithreading support. */
#ifdef _MUDFLAPTH
/* extern pthread_mutex_t __mf_biglock; */
#ifndef _REENTRANT
#define _REENTRANT
#endif
#ifndef _THREAD_SAFE
#define _THREAD_SAFE
#endif
#endif
/* Codes to describe the type of access to check: __mf_check arg 3 */
#define __MF_CHECK_READ 0
#define __MF_CHECK_WRITE 1
/* Codes to describe a region of memory being registered: __mf_*register arg 3 */
#define __MF_TYPE_NOACCESS 0
#define __MF_TYPE_HEAP 1
#define __MF_TYPE_HEAP_I 2
#define __MF_TYPE_STACK 3
#define __MF_TYPE_STATIC 4
#define __MF_TYPE_GUESS 5
/* The public mudflap API */
#ifdef __cplusplus
extern "C" {
#endif
extern void __mf_check (void *ptr, __mf_size_t sz, int type, const char *location)
__attribute((nothrow));
extern void __mf_register (void *ptr, __mf_size_t sz, int type, const char *name)
__attribute((nothrow));
extern void __mf_unregister (void *ptr, __mf_size_t sz, int type)
__attribute((nothrow));
extern unsigned __mf_watch (void *ptr, __mf_size_t sz);
extern unsigned __mf_unwatch (void *ptr, __mf_size_t sz);
extern void __mf_report ();
extern int __mf_set_options (const char *opts);
/* Redirect some standard library functions to libmudflap. These are
done by simple #define rather than linker wrapping, since only
instrumented modules are meant to be affected. */
#ifdef _MUDFLAP
#pragma redefine_extname memcpy __mfwrap_memcpy
#pragma redefine_extname memmove __mfwrap_memmove
#pragma redefine_extname memset __mfwrap_memset
#pragma redefine_extname memcmp __mfwrap_memcmp
#pragma redefine_extname memchr __mfwrap_memchr
#pragma redefine_extname memrchr __mfwrap_memrchr
#pragma redefine_extname strcpy __mfwrap_strcpy
#pragma redefine_extname strncpy __mfwrap_strncpy
#pragma redefine_extname strcat __mfwrap_strcat
#pragma redefine_extname strncat __mfwrap_strncat
#pragma redefine_extname strcmp __mfwrap_strcmp
#pragma redefine_extname strcasecmp __mfwrap_strcasecmp
#pragma redefine_extname strncmp __mfwrap_strncmp
#pragma redefine_extname strncasecmp __mfwrap_strncasecmp
#pragma redefine_extname strdup __mfwrap_strdup
#pragma redefine_extname strndup __mfwrap_strndup
#pragma redefine_extname strchr __mfwrap_strchr
#pragma redefine_extname strrchr __mfwrap_strrchr
#pragma redefine_extname strstr __mfwrap_strstr
#pragma redefine_extname memmem __mfwrap_memmem
#pragma redefine_extname strlen __mfwrap_strlen
#pragma redefine_extname strnlen __mfwrap_strnlen
#pragma redefine_extname bzero __mfwrap_bzero
#pragma redefine_extname bcopy __mfwrap_bcopy
#pragma redefine_extname bcmp __mfwrap_bcmp
#pragma redefine_extname index __mfwrap_index
#pragma redefine_extname rindex __mfwrap_rindex
#pragma redefine_extname asctime __mfwrap_asctime
#pragma redefine_extname ctime __mfwrap_ctime
#pragma redefine_extname gmtime __mfwrap_gmtime
#pragma redefine_extname localtime __mfwrap_localtime
#pragma redefine_extname time __mfwrap_time
#pragma redefine_extname strerror __mfwrap_strerror
#pragma redefine_extname fopen __mfwrap_fopen
#pragma redefine_extname fdopen __mfwrap_fdopen
#pragma redefine_extname freopen __mfwrap_freopen
#pragma redefine_extname fclose __mfwrap_fclose
#pragma redefine_extname fread __mfwrap_fread
#pragma redefine_extname fwrite __mfwrap_fwrite
#pragma redefine_extname fgetc __mfwrap_fgetc
#pragma redefine_extname fgets __mfwrap_fgets
#pragma redefine_extname getc __mfwrap_getc
#pragma redefine_extname gets __mfwrap_gets
#pragma redefine_extname ungetc __mfwrap_ungetc
#pragma redefine_extname fputc __mfwrap_fputc
#pragma redefine_extname fputs __mfwrap_fputs
#pragma redefine_extname putc __mfwrap_putc
#pragma redefine_extname puts __mfwrap_puts
#pragma redefine_extname clearerr __mfwrap_clearerr
#pragma redefine_extname feof __mfwrap_feof
#pragma redefine_extname ferror __mfwrap_ferror
#pragma redefine_extname fileno __mfwrap_fileno
#pragma redefine_extname printf __mfwrap_printf
#pragma redefine_extname fprintf __mfwrap_fprintf
#pragma redefine_extname sprintf __mfwrap_sprintf
#pragma redefine_extname snprintf __mfwrap_snprintf
#pragma redefine_extname vprintf __mfwrap_vprintf
#pragma redefine_extname vfprintf __mfwrap_vfprintf
#pragma redefine_extname vsprintf __mfwrap_vsprintf
#pragma redefine_extname vsnprintf __mfwrap_vsnprintf
#pragma redefine_extname access __mfwrap_access
#pragma redefine_extname remove __mfwrap_remove
#pragma redefine_extname fflush __mfwrap_fflush
#pragma redefine_extname fseek __mfwrap_fseek
#pragma redefine_extname ftell __mfwrap_ftell
#pragma redefine_extname rewind __mfwrap_rewind
#pragma redefine_extname fgetpos __mfwrap_fgetpos
#pragma redefine_extname fsetpos __mfwrap_fsetpos
#pragma redefine_extname stat __mfwrap_stat
#pragma redefine_extname fstat __mfwrap_fstat
#pragma redefine_extname lstat __mfwrap_lstat
#pragma redefine_extname mkfifo __mfwrap_mkfifo
#pragma redefine_extname setvbuf __mfwrap_setvbuf
#pragma redefine_extname setbuf __mfwrap_setbuf
#pragma redefine_extname setbuffer __mfwrap_setbuffer
#pragma redefine_extname setlinebuf __mfwrap_setlinebuf
#pragma redefine_extname opendir __mfwrap_opendir
#pragma redefine_extname closedir __mfwrap_closedir
#pragma redefine_extname readdir __mfwrap_readdir
#pragma redefine_extname recv __mfwrap_recv
#pragma redefine_extname recvfrom __mfwrap_recvfrom
#pragma redefine_extname recvmsg __mfwrap_recvmsg
#pragma redefine_extname send __mfwrap_send
#pragma redefine_extname sendto __mfwrap_sendto
#pragma redefine_extname sendmsg __mfwrap_sendmsg
#pragma redefine_extname setsockopt __mfwrap_setsockopt
#pragma redefine_extname getsockopt __mfwrap_getsockopt
#pragma redefine_extname accept __mfwrap_accept
#pragma redefine_extname bind __mfwrap_bind
#pragma redefine_extname connect __mfwrap_connect
#pragma redefine_extname gethostname __mfwrap_gethostname
#pragma redefine_extname sethostname __mfwrap_sethostname
#pragma redefine_extname gethostbyname __mfwrap_gethostbyname
#pragma redefine_extname wait __mfwrap_wait
#pragma redefine_extname waitpid __mfwrap_waitpid
#pragma redefine_extname popen __mfwrap_popen
#pragma redefine_extname pclose __mfwrap_pclose
#pragma redefine_extname execve __mfwrap_execve
#pragma redefine_extname execv __mfwrap_execv
#pragma redefine_extname execvp __mfwrap_execvp
#pragma redefine_extname system __mfwrap_system
#pragma redefine_extname dlopen __mfwrap_dlopen
#pragma redefine_extname dlerror __mfwrap_dlerror
#pragma redefine_extname dlsym __mfwrap_dlsym
#pragma redefine_extname dlclose __mfwrap_dlclose
#pragma redefine_extname fopen64 __mfwrap_fopen64
#pragma redefine_extname freopen64 __mfwrap_freopen64
#pragma redefine_extname stat64 __mfwrap_stat64
#pragma redefine_extname fseeko64 __mfwrap_fseeko64
#pragma redefine_extname ftello64 __mfwrap_ftello64
#pragma redefine_extname semop __mfwrap_semop
#pragma redefine_extname semctl __mfwrap_semctl
#pragma redefine_extname shmctl __mfwrap_shmctl
#pragma redefine_extname shmat __mfwrap_shmat
#pragma redefine_extname shmdt __mfwrap_shmdt
#pragma redefine_extname __ctype_b_loc __mfwrap___ctype_b_loc
#pragma redefine_extname __ctype_toupper_loc __mfwrap___ctype_toupper_loc
#pragma redefine_extname __ctype_tolower_loc __mfwrap___ctype_tolower_loc
#pragma redefine_extname getlogin __mfwrap_getlogin
#pragma redefine_extname cuserid __mfwrap_cuserid
#pragma redefine_extname getpwnam __mfwrap_getpwnam
#pragma redefine_extname getpwuid __mfwrap_getpwuid
#pragma redefine_extname getgrnam __mfwrap_getgrnam
#pragma redefine_extname getgrgid __mfwrap_getgrgid
#pragma redefine_extname getservent __mfwrap_getservent
#pragma redefine_extname getservbyname __mfwrap_getservbyname
#pragma redefine_extname getservbyport __mfwrap_getservbyport
#pragma redefine_extname gai_strerror __mfwrap_gai_strerror
#pragma redefine_extname getmntent __mfwrap_getmntent
#pragma redefine_extname inet_ntoa __mfwrap_inet_ntoa
#pragma redefine_extname getprotoent __mfwrap_getprotoent
#pragma redefine_extname getprotobyname __mfwrap_getprotobyname
#pragma redefine_extname getprotobynumber __mfwrap_getprotobynumber
/* Disable glibc macros. */
#define __NO_STRING_INLINES
#endif /* _MUDFLAP */
#ifdef __cplusplus
}
#endif
#endif /* MF_RUNTIME_H */

View file

@ -1,11 +0,0 @@
## Process this with automake to create Makefile.in
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`

View file

@ -1,392 +0,0 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = testsuite
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/mfconfig.exp.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/enable.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/override.m4 \
$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../ltoptions.m4 \
$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
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 = mfconfig.exp
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DEJATOOL = $(PACKAGE)
RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MF_HAVE_STDINT_H = @MF_HAVE_STDINT_H@
MF_HAVE_UINTPTR_T = @MF_HAVE_UINTPTR_T@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_libmudflapth = @build_libmudflapth@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
multi_basedir = @multi_basedir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_noncanonical = @target_noncanonical@
target_os = @target_os@
target_vendor = @target_vendor@
toolexecdir = @toolexecdir@
toolexeclibdir = @toolexeclibdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
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`
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 ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign testsuite/Makefile'; \
$(am__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
$(am__aclocal_m4_deps):
mfconfig.exp: $(top_builddir)/config.status $(srcdir)/mfconfig.exp.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
check-DEJAGNU: site.exp
srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
EXPECT=$(EXPECT); export EXPECT; \
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
then :; else exit_status=1; fi; \
done; \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi; \
exit $$exit_status
site.exp: Makefile
@echo 'Making a new site.exp file...'
@echo '## these variables are automatically generated by make ##' >site.tmp
@echo '# Do not edit here. If you wish to override these values' >>site.tmp
@echo '# edit the last section' >>site.tmp
@echo 'set srcdir $(srcdir)' >>site.tmp
@echo "set objdir `pwd`" >>site.tmp
@echo 'set build_alias "$(build_alias)"' >>site.tmp
@echo 'set build_triplet $(build_triplet)' >>site.tmp
@echo 'set host_alias "$(host_alias)"' >>site.tmp
@echo 'set host_triplet $(host_triplet)' >>site.tmp
@echo 'set target_alias "$(target_alias)"' >>site.tmp
@echo 'set target_triplet $(target_triplet)' >>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
@-rm -f site.bak
@test ! -f site.exp || mv site.exp site.bak
@mv site.tmp site.exp
distclean-DEJAGNU:
-rm -f site.exp site.bak
-l='$(DEJATOOL)'; for tool in $$l; do \
rm -f $$tool.sum $$tool.log; \
done
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-DEJAGNU distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: check-am install-am install-strip
.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
clean-libtool distclean distclean-DEJAGNU distclean-generic \
distclean-libtool dvi dvi-am html html-am info info-am install \
install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
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
# 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:

View file

@ -1,3 +0,0 @@
load_lib standard.exp
load_lib libmudflap.exp
load_lib mfconfig.exp

View file

@ -1,311 +0,0 @@
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
# Define libmudflap callbacks for dg.exp.
# This file is a copy of libstdc++-v3's dejagnu driver, with minor changes.
# Useful hook: if ${hostname}_init exists, it will be called, almost
# the last thing before testing begins. This can be defined in, e.g.,
# ~/.dejagnurc or $DEJAGNU.
proc load_gcc_lib { filename } {
global srcdir
load_file $srcdir/../../gcc/testsuite/lib/$filename
}
load_lib mfdg.exp
load_lib libgloss.exp
load_gcc_lib target-libpath.exp
load_gcc_lib target-supports.exp
load_gcc_lib timeout.exp
load_gcc_lib timeout-dg.exp
proc libmudflap-init { language } {
global env
global srcdir outdir blddir objdir tool_root_dir
global cxx cxxflags
global includes
global libs
global gluefile wrap_flags
global ld_library_path
switch $language {
"c" { set cxx [find_gcc] }
"c++" { set cxx [find_g++] }
default { error "bad language code $language"; return }
}
verbose -log "libmudflap-init $cxx"
set blddir [lookfor_file [get_multilibs] libmudflap]
set cxxblddir [lookfor_file [get_multilibs] libstdc++-v3]
set cxxflags_file "${cxxblddir}/scripts/testsuite_flags"
# By default, we assume we want to run program images.
global dg-do-what-default
set dg-do-what-default run
# set LD_LIBRARY_PATH so that libgcc_s, libstdc++ binaries can be found.
# locate libgcc.a so we don't need to account for different values of
# SHLIB_EXT on different platforms
set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
if {$gccdir != ""} {
set gccdir [file dirname $gccdir]
}
set ld_library_path "."
append ld_library_path ":${gccdir}"
append ld_library_path ":${cxxblddir}/src/.libs"
if {[is_remote host] == 0} {
foreach i "[exec ${gccdir}/xgcc --print-multi-lib]" {
set mldir ""
regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
set mldir [string trimright $mldir "\;@"]
if { "$mldir" == "." } {
continue
}
if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
append ld_library_path ":${gccdir}/${mldir}"
}
}
}
append ld_library_path ":${blddir}/.libs"
set libs "-L${blddir}/.libs"
set cxxflags "-ggdb3 -DDEBUG_ASSERT -fdiagnostics-color=never"
set includes "-I${srcdir} -I${srcdir}/.. -I.."
if {$language == "c++"} {
if {[file exists $cxxflags_file]} then {
set includes "${includes} [exec sh $cxxflags_file --build-includes]"
set cxxflags "${cxxflags} [exec sh $cxxflags_file --cxxflags]"
# c++ libs are included by --build-cxx below
set cxx "[exec sh $cxxflags_file --build-cxx]"
} else {
lappend libs "-L${cxxblddir}src/.libs"
lappend includes "-I../../libstdc++-v3/include"
}
}
global mfconfig_libs
global add_flags
append add_flags " $mfconfig_libs"
set_ld_library_path_env_vars
if [info exists env(LD_LIBRARY_PATH)] {
verbose -log "LD_LIBRARY_PATH = $env(LD_LIBRARY_PATH)"
}
if { [target_info needs_status_wrapper]!=""} {
file delete ${objdir}/testglue.o;
set gluefile ${objdir}/testglue.o;
set result [build_wrapper $gluefile];
if { $result != "" } {
set gluefile [lindex $result 0];
set wrap_flags [lindex $result 1];
} else {
unset gluefile
}
}
# If there is no static library then don't run tests with -static.
global tool
global mfconfig_libs
set opts "additional_flags=-static"
lappend opts "additional_flags=-fmudflap"
lappend opts "additional_flags=-lmudflap"
lappend opts "libs=$mfconfig_libs"
set src stlm[pid].c
set exe stlm[pid].x
set f [open $src "w"]
puts $f "int main () { }"
close $f
set lines [${tool}_target_compile $src $exe executable "$opts"]
file delete $src
remote_file build delete $exe
if { ![string match "" $lines] } {
# Compilation failed; assume static library is not available.
global MUDFLAP_FLAGS
set i [lsearch $MUDFLAP_FLAGS "*static*"]
set MUDFLAP_FLAGS [lreplace $MUDFLAP_FLAGS $i $i]
}
}
proc libmudflap-dg-test { prog do_what extra_tool_flags } {
# Set up the compiler flags, based on what we're going to do.
switch $do_what {
"preprocess" {
set compile_type "preprocess"
set output_file "[file rootname [file tail $prog]].i"
}
"compile" {
set compile_type "assembly"
set output_file "[file rootname [file tail $prog]].s"
}
"assemble" {
set compile_type "object"
set output_file "[file rootname [file tail $prog]].o"
}
"link" {
set compile_type "executable"
set output_file "./[file rootname [file tail $prog]].exe"
}
"run" {
set compile_type "executable"
# FIXME: "./" is to cope with "." not being in $PATH.
# Should this be handled elsewhere?
# YES.
set output_file "./[file rootname [file tail $prog]].exe"
# This is the only place where we care if an executable was
# created or not. If it was, dg.exp will try to run it.
remote_file build delete $output_file;
}
default {
perror "$do_what: not a valid dg-do keyword"
return ""
}
}
set options ""
if { $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];
return [list $comp_output $output_file]
}
proc libmudflap_target_compile { source dest type options } {
global gluefile
global wrap_flags
global cxx
global cxxflags
global includes
global libs
global blddir
if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
lappend options "libs=${gluefile}"
lappend options "ldflags=${wrap_flags}"
}
set cxx_final $cxx
set cxxlibglossflags [libgloss_link_flags]
set cxx_final [concat $cxx_final $cxxlibglossflags]
set cxx_final [concat $cxx_final $cxxflags]
set cxx_final [concat $cxx_final $includes]
set cxx_final [concat $cxx_final $libs]
lappend options "compiler=$cxx_final"
lappend options "timeout=[timeout_value]"
# Picks up the freshly-built testsuite library corresponding to the
# multilib under test.
lappend options "ldflags=-L${blddir}/testsuite"
return [target_compile $source $dest $type $options]
}
# A bit sloppy... Returns a list of source files (full pathnames) to
# compile. We mimic the mkcheck script in that the first time this is run,
# all existing files are listed in "testsuite_files" in the output
# directory. Subsequent runs pull the list from that file, allowing users
# to trim the list down to problematic tests.
### This is supposed to be done via RUNTESTFLAGS, but that doesn't work.
proc libmudflap-list-sourcefiles { } {
global srcdir
global outdir
set files_file "${outdir}/testsuite_files"
set sfiles ""
if { [file exists $files_file] } {
set f [open $files_file]
while { ! [eof $f] } {
set t [gets $f]
if { [string length "$t"] != 0 } {
lappend sfiles ${srcdir}/${t}
}
}
} else {
set f [open $files_file "w"]
set where_we_were [pwd]
cd $srcdir
foreach s [lsort [glob -nocomplain "*/*.cc" "*/*/*.cc" "{,*/}*/*/*/*.cc" ]] {
lappend sfiles ${srcdir}/${s}
puts $f $s
}
cd $where_we_were
}
close $f
# Disable wchar_t tests if library not configured to support
# wchar_t testing.
set wchar_file "${outdir}/testsuite_wchar_t"
if { [file exists $wchar_file] } {
return $sfiles
} else {
# Remove wchar_t tests files from list.
set res {}
foreach w $sfiles {
if [regexp "wchar_t" $w] {
verbose -log "element out list is $w"
} else {
verbose -log "element in list is $w"
lappend res $w
}
}
return $res
}
}
proc libmudflap-dg-prune { system text } {
global additional_prunes
set text [prune_gcc_output $text]
foreach p $additional_prunes {
if { [string length $p] > 0 } {
# Following regexp matches a complete line containing $p.
regsub -all "(^|\n)\[^\n\]*$p\[^\n\]*" $text "" text
}
}
return $text
}
proc prune_gcc_output { text } {
# Ignore caret diagnostics. Unfortunately dejaGNU trims leading
# spaces, so one cannot rely on them being present.
regsub -all "(^|\n)\[^\n\]+\n *\\^\n" $text "\n" 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
}

View file

@ -1,375 +0,0 @@
# `mfdg' - overrides parts of general purpose testcase driver.
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
# This is a modified excerpt of dejagnu/lib/dg.exp.
load_lib dg.exp
# We set LC_ALL and LANG to C so that we get the same error messages as expected.
setenv LC_ALL C
setenv LANG C
# Many hosts now default to a non-ASCII C locale, however, so
# they can set a charset encoding here if they need.
if { [ishost "*-*-cygwin*"] } {
setenv LC_ALL C.ASCII
setenv LANG C.ASCII
}
# dg-test -- runs a new style DejaGnu test
#
# Syntax: dg-test [-keep-output] prog tool_flags default_extra_tool_flags
#
# PROG is the full path name of the file to pass to the tool (eg: compiler).
# TOOL_FLAGS is a set of options to always pass.
# DEFAULT_EXTRA_TOOL_FLAGS are additional options if the testcase has none.
#proc dg-test { prog tool_flags default_extra_tool_flags } {
proc dg-test { args } {
global dg-do-what-default dg-interpreter-batch-mode dg-linenum-format
global errorCode errorInfo
global additional_prunes
global tool
global srcdir ;# eg: /calvin/dje/build/gcc/./testsuite/
global host_triplet target_triplet
set keep 0
set i 0
set dg-repetitions 1 ;# may be overridden by { dg-repetitions N }
unset_timeout_vars
if { [string index [lindex $args 0] 0] == "-" } {
for { set i 0 } { $i < [llength $args] } { incr i } {
if { [lindex $args $i] == "--" } {
incr i
break
} elseif { [lindex $args $i] == "-keep-output" } {
set keep 1
} elseif { [string index [lindex $args $i] 0] == "-" } {
clone_output "ERROR: dg-test: illegal argument: [lindex $args $i]"
return
} else {
break
}
}
}
if { $i + 3 != [llength $args] } {
clone_output "ERROR: dg-test: missing arguments in call"
return
}
set prog [lindex $args $i]
set tool_flags [lindex $args [expr $i + 1]]
set default_extra_tool_flags [lindex $args [expr $i + 2]]
set text "\[- A-Za-z0-9\.\;\"\_\:\'\`\(\)\!\#\=\+\?\&\*]*"
set name [dg-trim-dirname $srcdir $prog]
# If we couldn't rip $srcdir out of `prog' then just do the best we can.
# The point is to reduce the unnecessary noise in the logs. Don't strip
# out too much because different testcases with the same name can confuse
# `test-tool'.
if [string match "/*" $name] {
set name "[file tail [file dirname $prog]]/[file tail $prog]"
}
if {$tool_flags != ""} {
append name " ($tool_flags)"
}
# Process any embedded dg options in the testcase.
# Use "" for the second element of dg-do-what so we can tell if it's been
# explicitly set to "S".
set dg-do-what [list ${dg-do-what-default} "" P]
set dg-excess-errors-flag 0
set dg-messages ""
set dg-extra-tool-flags $default_extra_tool_flags
set dg-final-code ""
set additional_prunes ""
# `dg-output-text' is a list of two elements: pass/fail and text.
# Leave second element off for now (indicates "don't perform test")
set dg-output-text "P"
# Define our own "special function" `unknown' so we catch spelling errors.
# But first rename the existing one so we can restore it afterwards.
catch {rename dg-save-unknown ""}
rename unknown dg-save-unknown
proc unknown { args } {
return -code error "unknown dg option: $args"
}
set tmp [dg-get-options $prog]
foreach op $tmp {
verbose "Processing option: $op" 3
set status [catch "$op" errmsg]
if { $status != 0 } {
if { 0 && [info exists errorInfo] } {
# This also prints a backtrace which will just confuse
# testcase writers, so it's disabled.
perror "$name: $errorInfo\n"
} else {
perror "$name: $errmsg for \"$op\"\n"
}
# ??? The call to unresolved here is necessary to clear `errcnt'.
# What we really need is a proc like perror that doesn't set errcnt.
# It should also set exit_status to 1.
unresolved "$name: $errmsg for \"$op\""
return
}
}
# Restore normal error handling.
rename unknown ""
rename dg-save-unknown unknown
# If we're not supposed to try this test on this target, we're done.
if { [lindex ${dg-do-what} 1] == "N" } {
unsupported "$name"
verbose "$name not supported on this target, skipping it" 3
return
}
# Run the tool and analyze the results.
# The result of ${tool}-dg-test is in a bit of flux.
# Currently it is the name of the output file (or "" if none).
# If we need more than this it will grow into a list of things.
# No intention is made (at this point) to preserve upward compatibility
# (though at some point we'll have to).
set results [${tool}-dg-test $prog [lindex ${dg-do-what} 0] "$tool_flags ${dg-extra-tool-flags}"];
set comp_output [lindex $results 0];
set output_file [lindex $results 1];
#send_user "\nold_dejagnu.exp: comp_output1 = :$comp_output:\n\n"
#send_user "\nold_dejagnu.exp: message = :$message:\n\n"
#send_user "\nold_dejagnu.exp: message length = [llength $message]\n\n"
foreach i ${dg-messages} {
verbose "Scanning for message: $i" 4
# Remove all error messages for the line [lindex $i 0]
# in the source file. If we find any, success!
set line [lindex $i 0]
set pattern [lindex $i 2]
set comment [lindex $i 3]
#send_user "Before:\n$comp_output\n"
if [regsub -all "(^|\n)(\[^\n\]+$line\[^\n\]*($pattern)\[^\n\]*\n?)+" $comp_output "\n" comp_output] {
set comp_output [string trimleft $comp_output]
set ok pass
set uhoh fail
} else {
set ok fail
set uhoh pass
}
#send_user "After:\n$comp_output\n"
# $line will either be a formatted line number or a number all by
# itself. Delete the formatting.
scan $line ${dg-linenum-format} line
switch [lindex $i 1] {
"ERROR" {
$ok "$name $comment (test for errors, line $line)"
}
"XERROR" {
x$ok "$name $comment (test for errors, line $line)"
}
"WARNING" {
$ok "$name $comment (test for warnings, line $line)"
}
"XWARNING" {
x$ok "$name $comment (test for warnings, line $line)"
}
"BOGUS" {
$uhoh "$name $comment (test for bogus messages, line $line)"
}
"XBOGUS" {
x$uhoh "$name $comment (test for bogus messages, line $line)"
}
"BUILD" {
$uhoh "$name $comment (test for build failure, line $line)"
}
"XBUILD" {
x$uhoh "$name $comment (test for build failure, line $line)"
}
"EXEC" { }
"XEXEC" { }
}
#send_user "\nold_dejagnu.exp: comp_output2= :$comp_output:\n\n"
}
#send_user "\nold_dejagnu.exp: comp_output3 = :$comp_output:\n\n"
# Remove messages from the tool that we can ignore.
#send_user "comp_output: $comp_output\n"
set comp_output [prune_warnings $comp_output]
if { [info proc ${tool}-dg-prune] != "" } {
set comp_output [${tool}-dg-prune $target_triplet $comp_output]
switch -glob $comp_output {
"::untested::*" {
regsub "::untested::" $comp_output "" message
untested "$name: $message"
return
}
"::unresolved::*" {
regsub "::unresolved::" $comp_output "" message
unresolved "$name: $message"
return
}
"::unsupported::*" {
regsub "::unsupported::" $comp_output "" message
unsupported "$name: $message"
return
}
}
}
# See if someone forgot to delete the extra lines.
regsub -all "\n+" $comp_output "\n" comp_output
regsub "^\n+" $comp_output "" comp_output
#send_user "comp_output: $comp_output\n"
# Don't do this if we're testing an interpreter.
# FIXME: why?
if { ${dg-interpreter-batch-mode} == 0 } {
# Catch excess errors (new bugs or incomplete testcases).
if ${dg-excess-errors-flag} {
setup_xfail "*-*-*"
}
if ![string match "" $comp_output] {
fail "$name (test for excess errors)"
send_log "Excess errors:\n$comp_output\n"
} else {
pass "$name (test for excess errors)"
}
}
# Run the executable image if asked to do so.
# FIXME: This is the only place where we assume a standard meaning to
# the `keyword' argument of dg-do. This could be cleaned up.
if { [lindex ${dg-do-what} 0] == "run" } {
if ![file exists $output_file] {
warning "$name compilation failed to produce executable"
} else {
set testname $name
for {set rep 0} {$rep < ${dg-repetitions}} {incr rep} {
# include repetition number in test name
if {$rep > 0} { set name "$testname (rerun $rep)" }
set status -1
set result [${tool}_load $output_file]
set status [lindex $result 0];
set output [lindex $result 1];
#send_user "After exec, status: $status\n"
if { "$status" == "pass" } {
verbose "Exec succeeded." 3
} elseif { "$status" == "fail" } {
# It would be nice to get some info out of errorCode.
if [info exists errorCode] {
verbose "Exec failed, errorCode: $errorCode" 3
} else {
verbose "Exec failed, errorCode not defined!" 3
}
}
if { [lindex ${dg-do-what} 2] == "F" } {
# Instead of modelling this as an xfail (via setup_xfail),
# treat an expected crash as a success.
if { $status == "pass" } then { set status fail } else { set status pass }
set testtype "crash"
} else { set testtype "execution" }
$status "$name $testtype test"
if { [llength ${dg-output-text}] > 1 } {
#send_user "${dg-output-text}\n"
if { [lindex ${dg-output-text} 0] == "F" } {
setup_xfail "*-*-*"
}
set texttmp [lindex ${dg-output-text} 1]
if { ![regexp $texttmp ${output}] } {
fail "$name output pattern test"
} else {
pass "$name output pattern test"
}
verbose -log "Output pattern $texttmp"
unset texttmp
}
}
}
}
# Are there any further tests to perform?
# Note that if the program has special run-time requirements, running
# of the program can be delayed until here. Ditto for other situations.
# It would be a bit cumbersome though.
if ![string match ${dg-final-code} ""] {
regsub -all "\\\\(\[{}\])" ${dg-final-code} "\\1" dg-final-code
# Note that the use of `args' here makes this a varargs proc.
proc dg-final-proc { args } ${dg-final-code}
verbose "Running dg-final tests." 3
verbose "dg-final-proc:\n[info body dg-final-proc]" 4
if [catch "dg-final-proc $prog" errmsg] {
perror "$name: error executing dg-final: $errmsg"
# ??? The call to unresolved here is necessary to clear `errcnt'.
# What we really need is a proc like perror that doesn't set errcnt.
# It should also set exit_status to 1.
unresolved "$name: error executing dg-final: $errmsg"
}
}
# Do some final clean up.
# When testing an interpreter, we don't compile something and leave an
# output file.
if { ! ${keep} && ${dg-interpreter-batch-mode} == 0 } {
catch "exec rm -f $output_file"
}
}
#
# Indicate that this test case is to be rerun several times. This
# is useful if it is nondeterministic. This applies to rerunning the
# test program only, not rebuilding it.
# The embedded format is "{ dg-repetitions N }", where N is the number
# of repetitions. It better be greater than zero.
#
proc dg-repetitions { line value } {
upvar dg-repetitions repetitions
set repetitions $value
}
# Prune any messages matching ARGS[1] (a regexp) from test output.
proc dg-prune-output { args } {
global additional_prunes
if { [llength $args] != 2 } {
error "[lindex $args 1]: need one argument"
return
}
lappend additional_prunes [lindex $args 1]
}
set additional_prunes ""

View file

@ -1,22 +0,0 @@
global MUDFLAP_FLAGS
set MUDFLAP_FLAGS [list {-O0} {-static} { -O} {-O2} {-O3}]
libmudflap-init c++
if {$cxx == "g++"} then {
unsupported "g++ not found"
return
}
dg-init
global srcdir
foreach flags $MUDFLAP_FLAGS {
foreach srcfile [lsort [glob -nocomplain ${srcdir}/libmudflap.c++/*frag.cxx]] {
set bsrc [file tail $srcfile]
setenv MUDFLAP_OPTIONS "-viol-segv"
dg-runtest $srcfile $flags "-fmudflap -lmudflap"
}
}
dg-finish

View file

@ -1,20 +0,0 @@
#include <iostream>
extern char k [];
class foo
{
public:
foo (char *m) { m [40] = 20; }
};
foo f1 (k);
foo f2 (k);
foo f3 (k);
int main ()
{
return 0;
}

View file

@ -1 +0,0 @@
char k [500];

View file

@ -1,48 +0,0 @@
global MUDFLAP_FLAGS
set MUDFLAP_FLAGS [list {-O0} {-static} {-O2} {-O3}]
libmudflap-init c++
if {$cxx == "g++"} then {
unsupported "g++ not found"
return
}
dg-init
global srcdir subdir
foreach flags $MUDFLAP_FLAGS {
set l1 [libmudflap_target_compile "$srcdir/$subdir/ctors-1.cxx" "ctors-1.o" object {additional_flags=-fmudflap}]
set test "ctors-1 compilation ${flags}"
if [string match "*mudflap cannot track unknown size extern *k*" $l1] { pass $test } { fail $test }
set l2 [libmudflap_target_compile "$srcdir/$subdir/ctors-2.cxx" "ctors-2.o" object {additional_flags=-fmudflap}]
set test "ctors-2 compilation ${flags}"
if [string match "" $l2] { pass $test } { fail $test }
set l3 [libmudflap_target_compile "ctors-1.o ctors-2.o" "ctors-12.exe" executable {additional_flags=-fmudflap additional_flags=-lmudflap additional_flags=-lstdc++}]
set test "ctors-12 linkage ${flags}"
if [string match "" $l3] { pass $test } { fail $test }
set l4 [libmudflap_target_compile "ctors-2.o ctors-1.o" "ctors-21.exe" executable {additional_flags=-fmudflap additional_flags=-lmudflap additional_flags=-lstdc++}]
set test "ctors-21 linkage ${flags}"
if [string match "" $l3] { pass $test } { fail $test }
setenv MUDFLAP_OPTIONS "-viol-segv"
remote_spawn host "./ctors-12.exe"
set l5 [remote_wait host 10]
set test "ctors-12 execution ${flags}"
if {[lindex $l5 0] == 0} { pass $test } { fail $test }
remote_spawn host "./ctors-21.exe"
set l6 [remote_wait host 10]
set test "ctors-21 execution ${flags}"
if {[lindex $l6 0] == 0} { pass $test } { fail $test }
foreach f [glob -nocomplain "ctors-*"] {
remote_file build delete $f
}
}
dg-finish

View file

@ -1,5 +0,0 @@
// PR 26789
// { dg-do compile }
struct A;
A a; // { dg-error "incomplete" }

View file

@ -1,10 +0,0 @@
// PR 26790
// { dg-do compile }
struct A;
A foo() // { dg-error "incomplete" }
{
A a; // { dg-error "incomplete" }
return a;
}

View file

@ -1,16 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char zoo [10];
int main ()
{
int i = strlen ("twelve") + strlen ("zero") + strlen ("seventeen");
zoo[i] = 'a';
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object.*" } */
/* { dg-output "mudflap object.*zoo.*static.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,12 +0,0 @@
class foo {
char z [10];
public:
char *get_z () { return & this->z[0]; }
};
int main ()
{
foo x;
x.get_z()[9] = 'a';
return 0;
}

View file

@ -1,20 +0,0 @@
class foo {
char z [10];
public:
virtual char *get_z () { return & this->z[0]; }
};
class bar: public foo {
char q [20];
public:
char *get_z () { return & this->q[0]; }
};
int main () {
foo *x = new bar ();
x->get_z()[9] = 'a';
delete x;
return 0;
}

View file

@ -1,12 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char zoo [10];
int main ()
{
int i = strlen ("eight") + strlen ("one");
zoo[i] = 'a';
return 0;
}

View file

@ -1,13 +0,0 @@
#include <string>
#include <iostream>
int
main (int argc, char *argv[])
{
std::string myStr = "Hello, World!";
std::cout << myStr << std::endl;
return 0;
}
/* Ignore a warning that is irrelevant to the purpose of this test. */
/* { dg-prune-output ".*mudflap cannot track unknown size extern.*" } */

View file

@ -1,7 +0,0 @@
#include <vector>
int main() {
std::vector<int> v;
v.push_back(1);
return 0;
}

View file

@ -1,28 +0,0 @@
#include <vector>
#include <string>
class fitscolumn
{
private:
std::string name_, unit_;
int i, t;
public:
fitscolumn (const std::string &nm, const std::string &un,int i1,int t1)
: name_(nm), unit_(un), i(i1), t(t1){}
};
void init_bintab(std::vector<fitscolumn> & columns_)
{
char ttype[81], tunit[81], tform[81];
long repc;
int typecode;
columns_.push_back (fitscolumn (ttype,tunit,1,typecode));
}
int main ()
{
return 0;
}
/* Ignore a warning that is irrelevant to the purpose of this test. */
/* { dg-prune-output ".*mudflap cannot track unknown size extern.*" } */

View file

@ -1,12 +0,0 @@
// PR 19319
struct k {
int data;
k(int j): data(j) {}
};
k make_k () { return k(1); }
int main ()
{
k foo = make_k ();
return 0;
}

View file

@ -1,13 +0,0 @@
// PR 26442
struct A
{
A();
};
int main()
{
if (0)
A();
return 0;
}

View file

@ -1,20 +0,0 @@
// PR c++/34619
// { dg-do compile }
template <typename> struct A
{
typedef int X;
static const int N = 1;
};
template <typename T> struct B
{
typedef typename A <int [A <T>::N]>::X Y;
template <typename U> B (Y, U) {}
};
int main ()
{
}
B <int>b (0, 0);

View file

@ -1,17 +0,0 @@
// PR c++/37568
// { dg-do compile }
// { dg-options "-fmudflap -O" }
struct A
{
int i;
};
A
foo ()
{
A a = { 1 };
return a;
}
A a = foo ();

View file

@ -1,21 +0,0 @@
global MUDFLAP_FLAGS
set MUDFLAP_FLAGS [list {-O0} {-static} {-O2} {-O3}]
libmudflap-init c
dg-init
global srcdir
foreach flags $MUDFLAP_FLAGS {
foreach srcfile [lsort [glob -nocomplain \
${srcdir}/libmudflap.c/*frag.c \
${srcdir}/libmudflap.c/heap*.c \
${srcdir}/libmudflap.c/hook*.c \
${srcdir}/libmudflap.c/pass*.c]] {
set bsrc [file tail $srcfile]
setenv MUDFLAP_OPTIONS "-viol-segv"
dg-runtest $srcfile $flags "-fmudflap -lmudflap"
}
}
dg-finish

View file

@ -1,16 +0,0 @@
typedef struct { char *name; } dummy;
extern dummy d[];
int
main (void)
{
dummy *pd = d;
while (pd->name)
{
printf ("%s\n", pd->name);
pd++;
}
return 0;
}

View file

@ -1,2 +0,0 @@
typedef struct { char *name; } dummy;
dummy d[] = { {"a"}, {0} };

View file

@ -1,43 +0,0 @@
global MUDFLAP_FLAGS
set MUDFLAP_FLAGS [list {-O0} {-static} {-O2} {-O3}]
libmudflap-init c
dg-init
global srcdir subdir
foreach flags $MUDFLAP_FLAGS {
set l1 [libmudflap_target_compile "$srcdir/$subdir/externs-1.c" "externs-1.o" object {additional_flags=-fmudflap}]
set test "externs-1 compilation ${flags}"
if [string match "*mudflap cannot track unknown size extern *d*" $l1] { pass $test } { fail $test }
set l2 [libmudflap_target_compile "$srcdir/$subdir/externs-2.c" "externs-2.o" object {additional_flags=-fmudflap}]
set test "externs-2 compilation ${flags}"
if [string match "" $l2] { pass $test } { fail $test }
set l3 [libmudflap_target_compile "externs-1.o externs-2.o" "externs-12.exe" executable {additional_flags=-fmudflap additional_flags=-lmudflap}]
set test "externs-12 linkage ${flags}"
if [string match "" $l3] { pass $test } { fail $test }
set l4 [libmudflap_target_compile "externs-2.o externs-1.o" "externs-21.exe" executable {additional_flags=-fmudflap additional_flags=-lmudflap}]
set test "externs-21 linkage ${flags}"
if [string match "" $l3] { pass $test } { fail $test }
setenv MUDFLAP_OPTIONS "-viol-segv"
remote_spawn host "./externs-12.exe"
set l5 [remote_wait host 10]
set test "externs-12 execution ${flags}"
if {[lindex $l5 0] == 0} { pass $test } { fail $test }
remote_spawn host "./externs-21.exe"
set l6 [remote_wait host 10]
set test "externs-21 execution ${flags}"
if {[lindex $l6 0] == 0} { pass $test } { fail $test }
foreach f [glob -nocomplain "externs-*"] {
remote_file build delete $f
}
}
dg-finish

View file

@ -1,13 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
volatile int foo [10];
foo[10] = 0;
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*.main. foo.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,16 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
volatile int foo[10];
int sz = sizeof (int);
volatile char *bar = (char *)foo;
bar [sz * 10] = 0;
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*.main. foo.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,20 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char *y;
int main ()
{
int i = 10;
char *x = (char *) malloc (i * sizeof (char));
y = x;
while (i--)
{
++x;
*x = i;
}
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*malloc region.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,20 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int *y;
int main ()
{
int i = 10;
int *x = (int *) malloc (i * sizeof (int));
y = x;
while (i--)
{
++x;
*x = i;
}
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*malloc region.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,26 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
struct a {
int x;
int y;
char z;
};
struct b {
int x;
int y;
};
struct b k;
(*((volatile struct a *) &k)).z = 'q';
return 0;
}
/* { dg-output "mudflap violation 1..check/write.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*.main. k.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,29 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
struct a {
int x;
int y;
char z;
};
struct b {
int x;
int y;
};
volatile struct b k;
volatile struct a *p;
p = (struct a*) &k;
p->z = 'q';
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*.main. k.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,27 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
struct base {
int basic;
};
struct derived {
struct base common;
char extra;
};
volatile struct base b;
volatile struct base *bp;
bp = (struct base *)&b;
bp->basic = 10;
((struct derived volatile *)bp)->extra = 'x';
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*.main. b.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,27 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void *p;
int main ()
{
struct base {
int basic;
};
struct derived {
struct base common;
char extra;
};
struct base *bp;
bp = (struct base *) malloc (sizeof (struct base));;
p = bp;
bp->basic = 10;
((struct derived *)bp)->extra = 'x';
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*.malloc region.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,18 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
char * x;
int foo;
x = (char *) malloc (10);
strcpy (x, "123456789");
foo = strlen (x+10);
x [foo] = 1; /* we just just use foo to force execution of strlen */
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*.malloc region.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,16 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
/* One cannot redeclare __mf_lc_mask in proper C from instrumented
code, because of the way the instrumentation code emits its decls. */
extern unsigned foo __asm__ ("__mf_lc_mask");
unsigned * volatile bar = &foo;
*bar = 4;
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*.__mf_lc_mask.*no-access.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,18 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
struct foo {
int bar [10];
};
struct foo *k = (struct foo *) malloc (2 * sizeof(int));
k->bar[5] = 9;
free (k);
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*.malloc region.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,13 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
volatile int foo [10][10];
foo[10][0] = 0;
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*.main. foo.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,13 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
volatile char *p = (char *) 0;
*p = 5;
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*.NULL.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,18 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
int *bar = (int *) malloc (sizeof (int));
/* Make an access here to get &foo into the lookup cache. */
*bar = 5;
__mf_watch (bar, sizeof(int));
/* This access should trigger the watch violation. */
*bar = 10;
/* NOTREACHED */
return 0;
}
/* { dg-output "mudflap violation 1.*watch.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*malloc region.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,17 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
struct boo { int a; };
int c;
struct boo *b = malloc (sizeof (struct boo));
__mf_set_options ("-check-initialization");
c = b->a;
(void) malloc (c); /* some dummy use of c */
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*.malloc region.*1r/0w.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,16 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char zoo [10];
int main ()
{
int i = strlen ("012345") + strlen ("6789") + strlen ("01"); /* 11 */
zoo[i] = 'a';
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object.*" } */
/* { dg-output "mudflap object.*zoo.*static.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,18 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
char *foo;
char *bar;
__mf_set_options ("-check-initialization");
foo = (char *)malloc (10);
bar = (char *)malloc (10);
/* bar[2] = 'z'; */ /* don't touch memcpy source */
memcpy(foo+1, bar+1, 9);
return 0;
}
/* { dg-output "mudflap violation 1.*check.read.*memcpy source.*" } */
/* { dg-output "Nearby object.*" } */
/* { dg-output "mudflap object.*malloc region.*alloc time.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,24 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
char *foo;
__mf_set_options ("-check-initialization");
foo = (char *)malloc (1);
/* These two operations each expand to a read-modify-write.
* Even though the end result is that every bit of foo[0] is
* eventually written to deterministically, the first read
* triggers an uninit error. Ideally, it shouldn't, so this
* should be treated more like a regular XFAIL. */
foo[0] &= 0xfe;
foo[0] |= 0x01;
return foo[0];
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object.*" } */
/* { dg-output "mudflap object.*malloc region.*1r/0w.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,24 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char volatile *
__attribute__((noinline))
foo (unsigned i)
{
char volatile buffer[10];
char volatile *k = i ? & buffer[i] : NULL; /* defeat addr-of-local-returned warning */
return k;
}
int main ()
{
char volatile *f = foo (5);
f[0] = 'b';
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object.*" } */
/* { dg-output "mudflap dead object.*buffer.*alloc.*dealloc" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,18 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int foo (int *u, int i)
{
return u[i]; /* this dereference should be instrumented */
}
int main ()
{
int *k = malloc (6);
return foo (k, 8);
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object.*" } */
/* { dg-output "mudflap object.*malloc region.*alloc" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,17 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
int foo (int u[10])
{
return u[8]; /* this dereference should be instrumented */
}
int main ()
{
int *k = malloc (6);
return foo (k);
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object.*" } */
/* { dg-output "mudflap object.*malloc region.*alloc" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,13 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
volatile int foo [10][10][10];
foo[9][10][0] = 0;
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*.main. foo.*" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,18 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
int foo (int u)
{
return u*u;
}
int main ()
{
int *k = malloc(5);
int j = foo (k[8]); /* this call argument should be instrumented */
return j;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object.*" } */
/* { dg-output "mudflap object.*malloc region.*alloc" } */
/* { dg-do run { xfail *-*-* } } */

View file

@ -1,24 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
extern int h (int i, int j);
int main ()
{
int z = h (4, 10);
return 0;
}
int *p;
__attribute__((noinline))
int h (int i, int j)
{
int k[i];
k[j] = i;
p = k;
return j;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object.*" } */
/* { dg-output "mudflap object.*\(h\).*k" } */
/* { dg-do run { xfail *-*-* } } */

Some files were not shown because too many files have changed in this diff Show more