From patchwork Tue Jan 16 14:11:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Cederman X-Patchwork-Id: 84183 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0E7133857C55 for ; Tue, 16 Jan 2024 14:12:21 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out3.simply.com (smtp-out3.simply.com [94.231.106.210]) by sourceware.org (Postfix) with ESMTPS id DACA13857C64 for ; Tue, 16 Jan 2024 14:11:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DACA13857C64 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=gaisler.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gaisler.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DACA13857C64 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=94.231.106.210 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705414309; cv=none; b=xEcNyjv3SDYgaY1RkYYWZe3nufCOhyST84u43YoVEwHd444T3mVkrokEwTssnAbhRPhUBog9ruyVx55L8iBr28AmfxBbko3fncWrvad0KDDKoK+gpn5mlT5JUzZr+R9ltzmPNiNKDoKj1uQ5zUarrvMSLOffaEbOLwlWdh2B8K4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705414309; c=relaxed/simple; bh=8hxJC9Mhk05sk893DAVe9YD90T/BMUXhk6hAwzz5CVs=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=YOoaPnbzcnsheeLibheoqpF7QI5a282zHqUipdBAaoAPn9XiaXpF3yb9an+GRznhlIC22S8B5c9dcukD+QgnzglNSNzNdIEOgKrihglFL2GJrqcdz3dPDJQiWDpeyV3EZOQ/GKR49UF4EX0g9aAcY+FZmNSdCzH1kmu4qwPNDEA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by smtp.simply.com (Simply.com) with ESMTP id 4TDrXw37Kzz68DW; Tue, 16 Jan 2024 15:11:44 +0100 (CET) Received: from cederman.got.gaisler.com (h-98-128-223-123.NA.cust.bahnhof.se [98.128.223.123]) by smtp.simply.com (Simply.com) with ESMTPA id 4TDrXw05t9z68D7; Tue, 16 Jan 2024 15:11:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gaisler.com; s=unoeuro; t=1705414304; bh=DTBCMfqZzlFCh1Ht8R0R1Pe5jrProVSMEnx0i4zShqs=; h=From:To:Cc:Subject:Date; b=f5pC2jN9j0pvyTfzEVp8nAY1fvtjnRlwKdMFlUg5R9oHIsWXJXiVwBhS0PPc1jMsq N5N8zz2WZhTXY5LleuMFymdozdRIBC++UXKzwMid0yZQ+UinINOTdRomeOTH49/syC 2gge4VFaQCSlqetuM4G1eus+iTB2cpyjwGu98mHs= From: Daniel Cederman To: gcc-patches@gcc.gnu.org Cc: jakub@redhat.com, ro@CeBiTec.Uni-Bielefeld.DE, ebotcazou@libertysurf.fr, daniel@gaisler.com Subject: [PATCH] libsanitizer: Replace memcpy with internal version in sanitizer_common Date: Tue, 16 Jan 2024 15:11:39 +0100 Message-Id: <20240116141139.3477027-1-cederman@gaisler.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_STOCKGEN, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org When GCC is configured with --enable-target-optspace the compiler generates a memcpy call in the Symbolizer constructor in sanitizer_symbolizer.cpp when compiling for SPARC V8. Add HAVE_AS_SYM_ASSIGN to replace it with a call to __sanitizer_internal_memcpy. libsanitizer/ChangeLog: * sanitizer_common/Makefile.am (DEFS): Add @AS_SYM_ASSIGN_DEFS@. * sanitizer_common/Makefile.in: Regenerate. --- libsanitizer/sanitizer_common/Makefile.am | 2 +- libsanitizer/sanitizer_common/Makefile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libsanitizer/sanitizer_common/Makefile.am b/libsanitizer/sanitizer_common/Makefile.am index 02afe65620a2..9ed6ef88775a 100644 --- a/libsanitizer/sanitizer_common/Makefile.am +++ b/libsanitizer/sanitizer_common/Makefile.am @@ -3,7 +3,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) -isystem $(top_srcdir)/i # 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 @RPC_DEFS@ +DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS @RPC_DEFS@ @AS_SYM_ASSIGN_DEFS@ AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS) AM_CXXFLAGS += -std=gnu++14 diff --git a/libsanitizer/sanitizer_common/Makefile.in b/libsanitizer/sanitizer_common/Makefile.in index 45141930f9fa..31fff8236fee 100644 --- a/libsanitizer/sanitizer_common/Makefile.in +++ b/libsanitizer/sanitizer_common/Makefile.in @@ -245,7 +245,7 @@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS @RPC_DEFS@ +DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS @RPC_DEFS@ @AS_SYM_ASSIGN_DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@