diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2023-11-28 14:54:34 +0100 |
---|---|---|
committer | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2023-11-28 14:54:34 +0100 |
commit | 088d3cbc5f906444a7dee98bc9a6f4b724ddfc21 (patch) | |
tree | ef1a523363cc1a1fe6484ceb4872a98ce7512527 /libsanitizer/asan | |
parent | 099b15e2bdb78c21ad3f9001af77072413f4e159 (diff) | |
download | gcc-088d3cbc5f906444a7dee98bc9a6f4b724ddfc21.zip gcc-088d3cbc5f906444a7dee98bc9a6f4b724ddfc21.tar.gz gcc-088d3cbc5f906444a7dee98bc9a6f4b724ddfc21.tar.bz2 |
libsanitizer: Check assembler support for symbol assignment [PR112563]
The recent libsanitizer import broke the build on Solaris/SPARC with the
native as:
/usr/ccs/bin/as: ".libs/sanitizer_errno.s", line 4247: error: symbol
"__sanitizer_internal_memset" is used but not defined
/usr/ccs/bin/as: ".libs/sanitizer_errno.s", line 4247: error: symbol
"__sanitizer_internal_memcpy" is used but not defined
/usr/ccs/bin/as: ".libs/sanitizer_errno.s", line 4247: error: symbol
"__sanitizer_internal_memmove" is used but not defined
Since none of the alternatives considered in the PR worked out, this
patch checks if the assembler does support symbol assignment, disabling
the code otherwise. This returns the code to the way it was up to LLVM 16.
Bootstrapped without regressions on sparc-sun-solaris2.11 (as and gas) and
i386-pc-solaris2.11 (as and gas).
2023-11-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
libsanitizer:
PR sanitizer/112563
* configure.ac (libsanitizer_cv_as_sym_assign): Check for
assembler symbol assignment support.
* configure: Regenerate.
* asan/Makefile.am (DEFS): Add @AS_SYM_ASSIGN_DEFS@.
* Makefile.in, asan/Makefile.in, hwasan/Makefile.in,
interception/Makefile.in, libbacktrace/Makefile.in,
lsan/Makefile.in, sanitizer_common/Makefile.in, tsan/Makefile.in,
ubsan/Makefile.in: Regenerate.
Diffstat (limited to 'libsanitizer/asan')
-rw-r--r-- | libsanitizer/asan/Makefile.am | 2 | ||||
-rw-r--r-- | libsanitizer/asan/Makefile.in | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libsanitizer/asan/Makefile.am b/libsanitizer/asan/Makefile.am index 223d3e0..6af250e 100644 --- a/libsanitizer/asan/Makefile.am +++ b/libsanitizer/asan/Makefile.am @@ -3,7 +3,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) # May be used by toolexeclibdir. gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) -DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1 -DASAN_NEEDS_SEGV=1 -DCAN_SANITIZE_UB=0 -DASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION=0 +DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1 -DASAN_NEEDS_SEGV=1 -DCAN_SANITIZE_UB=0 -DASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION=0 @AS_SYM_ASSIGN_DEFS@ if USING_MAC_INTERPOSE DEFS += -DMAC_INTERPOSE_FUNCTIONS -DMISSING_BLOCKS_SUPPORT endif diff --git a/libsanitizer/asan/Makefile.in b/libsanitizer/asan/Makefile.in index e88e5e0..ac72e13 100644 --- a/libsanitizer/asan/Makefile.in +++ b/libsanitizer/asan/Makefile.in @@ -264,6 +264,7 @@ ALLOC_FILE = @ALLOC_FILE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +AS_SYM_ASSIGN_DEFS = @AS_SYM_ASSIGN_DEFS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -288,7 +289,7 @@ DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS \ -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS \ -DASAN_HAS_EXCEPTIONS=1 -DASAN_NEEDS_SEGV=1 \ -DCAN_SANITIZE_UB=0 -DASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION=0 \ - $(am__append_1) + @AS_SYM_ASSIGN_DEFS@ $(am__append_1) DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ |