mirror of git://gcc.gnu.org/git/gcc.git
re PR sanitizer/82595 (bootstrap fails in libsanitizer on powerpc64-unknown-linux-gnu)
PR sanitizer/82595 * config/gnu-user.h (LIBTSAN_EARLY_SPEC): Add libtsan_preinit.o for -fsanitize=thread link of executables. (LIBLSAN_EARLY_SPEC): Add liblsan_preinit.o for -fsanitize=leak link of executables. * lsan/lsan.h (__lsan_init): Add SANITIZER_INTERFACE_ATTRIBUTE. * lsan/Makefile.am (nodist_toolexeclib_HEADERS): Add liblsan_preinit.o. (lsan_files): Remove lsan_preinit.cc. (liblsan_preinit.o): New rule. * lsan/Makefile.in: Regenerated. From-SVN: r253925
This commit is contained in:
parent
42a764f76f
commit
9a45ffbd12
|
@ -1,5 +1,11 @@
|
||||||
2017-10-20 Jakub Jelinek <jakub@redhat.com>
|
2017-10-20 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR sanitizer/82595
|
||||||
|
* config/gnu-user.h (LIBTSAN_EARLY_SPEC): Add libtsan_preinit.o
|
||||||
|
for -fsanitize=thread link of executables.
|
||||||
|
(LIBLSAN_EARLY_SPEC): Add liblsan_preinit.o for -fsanitize=leak
|
||||||
|
link of executables.
|
||||||
|
|
||||||
PR target/82370
|
PR target/82370
|
||||||
* config/i386/sse.md (VI248_AVX2, VI248_AVX512BW, VI248_AVX512BW_2):
|
* config/i386/sse.md (VI248_AVX2, VI248_AVX512BW, VI248_AVX512BW_2):
|
||||||
New mode iterators.
|
New mode iterators.
|
||||||
|
|
|
@ -162,11 +162,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
|
LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
|
||||||
LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
|
LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
|
||||||
#undef LIBTSAN_EARLY_SPEC
|
#undef LIBTSAN_EARLY_SPEC
|
||||||
#define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
|
#define LIBTSAN_EARLY_SPEC "%{!shared:libtsan_preinit%O%s} " \
|
||||||
|
"%{static-libtsan:%{!shared:" \
|
||||||
LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
|
LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
|
||||||
LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
|
LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
|
||||||
#undef LIBLSAN_EARLY_SPEC
|
#undef LIBLSAN_EARLY_SPEC
|
||||||
#define LIBLSAN_EARLY_SPEC "%{static-liblsan:%{!shared:" \
|
#define LIBLSAN_EARLY_SPEC "%{!shared:liblsan_preinit%O%s} " \
|
||||||
|
"%{static-liblsan:%{!shared:" \
|
||||||
LD_STATIC_OPTION " --whole-archive -llsan --no-whole-archive " \
|
LD_STATIC_OPTION " --whole-archive -llsan --no-whole-archive " \
|
||||||
LD_DYNAMIC_OPTION "}}%{!static-liblsan:-llsan}"
|
LD_DYNAMIC_OPTION "}}%{!static-liblsan:-llsan}"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
2017-10-20 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR sanitizer/82595
|
||||||
|
* lsan/lsan.h (__lsan_init): Add SANITIZER_INTERFACE_ATTRIBUTE.
|
||||||
|
* lsan/Makefile.am (nodist_toolexeclib_HEADERS): Add
|
||||||
|
liblsan_preinit.o.
|
||||||
|
(lsan_files): Remove lsan_preinit.cc.
|
||||||
|
(liblsan_preinit.o): New rule.
|
||||||
|
* lsan/Makefile.in: Regenerated.
|
||||||
|
|
||||||
2017-10-19 Jakub Jelinek <jakub@redhat.com>
|
2017-10-19 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* All source files: Merge from upstream 315899.
|
* All source files: Merge from upstream 315899.
|
||||||
|
|
|
@ -12,6 +12,7 @@ ACLOCAL_AMFLAGS = -I m4
|
||||||
noinst_LTLIBRARIES = libsanitizer_lsan.la
|
noinst_LTLIBRARIES = libsanitizer_lsan.la
|
||||||
if LSAN_SUPPORTED
|
if LSAN_SUPPORTED
|
||||||
toolexeclib_LTLIBRARIES = liblsan.la
|
toolexeclib_LTLIBRARIES = liblsan.la
|
||||||
|
nodist_toolexeclib_HEADERS = liblsan_preinit.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
sanitizer_lsan_files = \
|
sanitizer_lsan_files = \
|
||||||
|
@ -27,7 +28,6 @@ lsan_files = \
|
||||||
lsan_malloc_mac.cc \
|
lsan_malloc_mac.cc \
|
||||||
lsan_allocator.cc \
|
lsan_allocator.cc \
|
||||||
lsan_interceptors.cc \
|
lsan_interceptors.cc \
|
||||||
lsan_preinit.cc \
|
|
||||||
lsan_thread.cc
|
lsan_thread.cc
|
||||||
|
|
||||||
libsanitizer_lsan_la_SOURCES = $(sanitizer_lsan_files)
|
libsanitizer_lsan_la_SOURCES = $(sanitizer_lsan_files)
|
||||||
|
@ -40,6 +40,9 @@ endif
|
||||||
liblsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS)
|
liblsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS)
|
||||||
liblsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_liblsan)
|
liblsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_liblsan)
|
||||||
|
|
||||||
|
liblsan_preinit.o: lsan_preinit.o
|
||||||
|
cp $< $@
|
||||||
|
|
||||||
# Work around what appears to be a GNU make bug handling MAKEFLAGS
|
# 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
|
# values defined in terms of make variables, as is the case for CC and
|
||||||
# friends when we are called from the top level Makefile.
|
# friends when we are called from the top level Makefile.
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
|
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
am__make_dryrun = \
|
am__make_dryrun = \
|
||||||
{ \
|
{ \
|
||||||
|
@ -100,7 +101,8 @@ am__uninstall_files_from_dir = { \
|
||||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||||
}
|
}
|
||||||
am__installdirs = "$(DESTDIR)$(toolexeclibdir)"
|
am__installdirs = "$(DESTDIR)$(toolexeclibdir)" \
|
||||||
|
"$(DESTDIR)$(toolexeclibdir)"
|
||||||
LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
|
LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
|
||||||
am__DEPENDENCIES_1 =
|
am__DEPENDENCIES_1 =
|
||||||
liblsan_la_DEPENDENCIES = \
|
liblsan_la_DEPENDENCIES = \
|
||||||
|
@ -110,7 +112,7 @@ liblsan_la_DEPENDENCIES = \
|
||||||
am__objects_1 = lsan_common.lo lsan_common_linux.lo lsan_common_mac.lo
|
am__objects_1 = lsan_common.lo lsan_common_linux.lo lsan_common_mac.lo
|
||||||
am__objects_2 = $(am__objects_1) lsan.lo lsan_linux.lo lsan_mac.lo \
|
am__objects_2 = $(am__objects_1) lsan.lo lsan_linux.lo lsan_mac.lo \
|
||||||
lsan_malloc_mac.lo lsan_allocator.lo lsan_interceptors.lo \
|
lsan_malloc_mac.lo lsan_allocator.lo lsan_interceptors.lo \
|
||||||
lsan_preinit.lo lsan_thread.lo
|
lsan_thread.lo
|
||||||
am_liblsan_la_OBJECTS = $(am__objects_2)
|
am_liblsan_la_OBJECTS = $(am__objects_2)
|
||||||
liblsan_la_OBJECTS = $(am_liblsan_la_OBJECTS)
|
liblsan_la_OBJECTS = $(am_liblsan_la_OBJECTS)
|
||||||
liblsan_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
liblsan_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||||
|
@ -139,6 +141,7 @@ am__can_run_installinfo = \
|
||||||
n|no|NO) false;; \
|
n|no|NO) false;; \
|
||||||
*) (install-info --version) >/dev/null 2>&1;; \
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
esac
|
esac
|
||||||
|
HEADERS = $(nodist_toolexeclib_HEADERS)
|
||||||
ETAGS = etags
|
ETAGS = etags
|
||||||
CTAGS = ctags
|
CTAGS = ctags
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
|
@ -298,6 +301,7 @@ AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
noinst_LTLIBRARIES = libsanitizer_lsan.la
|
noinst_LTLIBRARIES = libsanitizer_lsan.la
|
||||||
@LSAN_SUPPORTED_TRUE@toolexeclib_LTLIBRARIES = liblsan.la
|
@LSAN_SUPPORTED_TRUE@toolexeclib_LTLIBRARIES = liblsan.la
|
||||||
|
@LSAN_SUPPORTED_TRUE@nodist_toolexeclib_HEADERS = liblsan_preinit.o
|
||||||
sanitizer_lsan_files = \
|
sanitizer_lsan_files = \
|
||||||
lsan_common.cc \
|
lsan_common.cc \
|
||||||
lsan_common_linux.cc \
|
lsan_common_linux.cc \
|
||||||
|
@ -311,7 +315,6 @@ lsan_files = \
|
||||||
lsan_malloc_mac.cc \
|
lsan_malloc_mac.cc \
|
||||||
lsan_allocator.cc \
|
lsan_allocator.cc \
|
||||||
lsan_interceptors.cc \
|
lsan_interceptors.cc \
|
||||||
lsan_preinit.cc \
|
|
||||||
lsan_thread.cc
|
lsan_thread.cc
|
||||||
|
|
||||||
libsanitizer_lsan_la_SOURCES = $(sanitizer_lsan_files)
|
libsanitizer_lsan_la_SOURCES = $(sanitizer_lsan_files)
|
||||||
|
@ -456,7 +459,6 @@ distclean-compile:
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsan_linux.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsan_linux.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsan_mac.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsan_mac.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsan_malloc_mac.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsan_malloc_mac.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsan_preinit.Plo@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsan_thread.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsan_thread.Plo@am__quote@
|
||||||
|
|
||||||
.cc.o:
|
.cc.o:
|
||||||
|
@ -485,6 +487,27 @@ mostlyclean-libtool:
|
||||||
|
|
||||||
clean-libtool:
|
clean-libtool:
|
||||||
-rm -rf .libs _libs
|
-rm -rf .libs _libs
|
||||||
|
install-nodist_toolexeclibHEADERS: $(nodist_toolexeclib_HEADERS)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
@list='$(nodist_toolexeclib_HEADERS)'; test -n "$(toolexeclibdir)" || list=; \
|
||||||
|
if test -n "$$list"; then \
|
||||||
|
echo " $(MKDIR_P) '$(DESTDIR)$(toolexeclibdir)'"; \
|
||||||
|
$(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)" || exit 1; \
|
||||||
|
fi; \
|
||||||
|
for p in $$list; do \
|
||||||
|
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||||
|
echo "$$d$$p"; \
|
||||||
|
done | $(am__base_list) | \
|
||||||
|
while read files; do \
|
||||||
|
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(toolexeclibdir)'"; \
|
||||||
|
$(INSTALL_HEADER) $$files "$(DESTDIR)$(toolexeclibdir)" || exit $$?; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-nodist_toolexeclibHEADERS:
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@list='$(nodist_toolexeclib_HEADERS)'; test -n "$(toolexeclibdir)" || list=; \
|
||||||
|
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||||
|
dir='$(DESTDIR)$(toolexeclibdir)'; $(am__uninstall_files_from_dir)
|
||||||
|
|
||||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
@ -539,9 +562,9 @@ distclean-tags:
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
check-am: all-am
|
check-am: all-am
|
||||||
check: check-am
|
check: check-am
|
||||||
all-am: Makefile $(LTLIBRARIES)
|
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
|
||||||
installdirs:
|
installdirs:
|
||||||
for dir in "$(DESTDIR)$(toolexeclibdir)"; do \
|
for dir in "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(toolexeclibdir)"; do \
|
||||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||||
done
|
done
|
||||||
install: install-am
|
install: install-am
|
||||||
|
@ -603,7 +626,8 @@ install-dvi: install-dvi-am
|
||||||
|
|
||||||
install-dvi-am:
|
install-dvi-am:
|
||||||
|
|
||||||
install-exec-am: install-toolexeclibLTLIBRARIES
|
install-exec-am: install-nodist_toolexeclibHEADERS \
|
||||||
|
install-toolexeclibLTLIBRARIES
|
||||||
|
|
||||||
install-html: install-html-am
|
install-html: install-html-am
|
||||||
|
|
||||||
|
@ -643,7 +667,8 @@ ps: ps-am
|
||||||
|
|
||||||
ps-am:
|
ps-am:
|
||||||
|
|
||||||
uninstall-am: uninstall-toolexeclibLTLIBRARIES
|
uninstall-am: uninstall-nodist_toolexeclibHEADERS \
|
||||||
|
uninstall-toolexeclibLTLIBRARIES
|
||||||
|
|
||||||
.MAKE: install-am install-strip
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
|
@ -654,15 +679,20 @@ uninstall-am: uninstall-toolexeclibLTLIBRARIES
|
||||||
html html-am info info-am install install-am install-data \
|
html html-am info info-am install install-am install-data \
|
||||||
install-data-am install-dvi install-dvi-am install-exec \
|
install-data-am install-dvi install-dvi-am install-exec \
|
||||||
install-exec-am install-html install-html-am install-info \
|
install-exec-am install-html install-html-am install-info \
|
||||||
install-info-am install-man install-pdf install-pdf-am \
|
install-info-am install-man install-nodist_toolexeclibHEADERS \
|
||||||
install-ps install-ps-am install-strip \
|
install-pdf install-pdf-am install-ps install-ps-am \
|
||||||
install-toolexeclibLTLIBRARIES installcheck installcheck-am \
|
install-strip install-toolexeclibLTLIBRARIES installcheck \
|
||||||
installdirs maintainer-clean maintainer-clean-generic \
|
installcheck-am installdirs maintainer-clean \
|
||||||
mostlyclean mostlyclean-compile mostlyclean-generic \
|
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||||
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
|
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||||
uninstall-am uninstall-toolexeclibLTLIBRARIES
|
tags uninstall uninstall-am \
|
||||||
|
uninstall-nodist_toolexeclibHEADERS \
|
||||||
|
uninstall-toolexeclibLTLIBRARIES
|
||||||
|
|
||||||
|
|
||||||
|
liblsan_preinit.o: lsan_preinit.o
|
||||||
|
cp $< $@
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# 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.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
.NOEXPORT:
|
.NOEXPORT:
|
||||||
|
|
|
@ -64,4 +64,4 @@ void GetStackTraceWithPcBpAndContext(__sanitizer::BufferedStackTrace *stack,
|
||||||
extern bool lsan_inited;
|
extern bool lsan_inited;
|
||||||
extern bool lsan_init_is_running;
|
extern bool lsan_init_is_running;
|
||||||
|
|
||||||
extern "C" void __lsan_init();
|
extern "C" SANITIZER_INTERFACE_ATTRIBUTE void __lsan_init();
|
||||||
|
|
Loading…
Reference in New Issue