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: 188535 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp281838dye; Tue, 16 Jan 2024 06:12:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IFLYSJ/hCFkT7ZEYyYoJ/iJgrfJNUAkMy1GAzMJ1dV6U9U55f0oRhoJlBSrjrdAWBLckIaH X-Received: by 2002:ae9:c11a:0:b0:783:1938:4046 with SMTP id z26-20020ae9c11a000000b0078319384046mr7529835qki.70.1705414355286; Tue, 16 Jan 2024 06:12:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705414355; cv=pass; d=google.com; s=arc-20160816; b=z/oi+Gmubr8IVAHSVnirnpXvP2pNH7mnHNaq593NTuBudcP4430fUO7NwsgtxX5KM3 mO3QUDu4gRvzFhfJbgKaSQ/jMXqZKq4KRPaNS+eAjMXe/9o7CgvCSnTi0WSonBlCS9OW wuvA7Des0aYRpBDgG3sM70wwmgy1ZVjmA9DWtN/HygVSwoRQdPnHQB6Lhuoi0xd/Diru xqEQOrWf3UGcuYyq3QkYAoMZNdJhiU5RddCOOMTSJahCzXb3gotJrTvvwxVfnCcNdSzo L0RLnyGLXnL9lNyO5gOyKorPjsh3wCsO3louXflh7OWTemCSRtGXWjNXToKHB8DmRgKK +Ssg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=DTBCMfqZzlFCh1Ht8R0R1Pe5jrProVSMEnx0i4zShqs=; fh=a1mqTUw4U5mkyLPMToltk0MuIU8JJyV7ZPCdLNKu8E0=; b=ejaGsHY3P/FY4tOF7M/sh21xuQK9plCjWWBNzpBLNSR6RaQvFEC+nGhcYOvS52+yAc ZjcjW6kLb6P3iNZ9URmqayhO7kW+TENXeDzWYtzenW41o+MEY6CIwCpi5Z7e7KklNHWv n1toljKUfdNQ7cawOWwtcnpH8RtMszkBRq0heC/nuThERWKLmg6SYQFc0MdYmg0s+9Tj Pmoa7ovx//NJM+H//uJMV+LhGgR78D4o0COBHgqSFz5CwSOvk7pa9iD8xzgZOvEXI1us A6jMJXiAFzganeLYqGZWQAWSnkI8g3Xf4eb7hxWTaetizXP+RNFZaPToRrPgf+1DEbEE 5Glg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gaisler.com header.s=unoeuro header.b=f5pC2jN9; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=gaisler.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id de33-20020a05620a372100b0078321fc9bd9si10343207qkb.367.2024.01.16.06.12.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 06:12:35 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gaisler.com header.s=unoeuro header.b=f5pC2jN9; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=gaisler.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 007133857C4C for ; Tue, 16 Jan 2024 14:12:35 +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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788256563079926906 X-GMAIL-MSGID: 1788256563079926906 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@