From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id B3F3B3858D33 for ; Fri, 2 Feb 2024 01:38:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B3F3B3858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=loongson.cn ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B3F3B3858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706837887; cv=none; b=JqHSM4OPv8360NioXcnZuAvGezsC3y5qxtyqy3kBEpkCxQOT3PC/xAUjJTF5M7DLDY1T+I90JtE8GXAdbOo7+c7llx9nSzXJ0D24yAl3ylc2jOboAk5anknQrhHGJh/8UniFQ/rpHl8+fZpu/d3WiAnu1W4BEJKdiw0/b0ACyBg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706837887; c=relaxed/simple; bh=1lMRC5BnEc2WYPgpIWfL/4R//T5sZPv993Qom1aan7I=; h=Subject:To:From:Message-ID:Date:MIME-Version; b=U7rT9dvNzbEJh/8opzsy77s7brtTfkSPQ85+VDnmykP4xGmFVBE0Ushi7mAcXB0+YVXz76LuYB8ZBxN65NZsQIO3G3e+br8GMKtIz6W/bI3akCgYo+3kBpziVlq++7YjP5RUBBSYaTjTsU1aPVkzZeMdg3kFhE45t75ntzQEls4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail.loongson.cn ([114.242.206.163]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rViVE-0005yh-Ok for gcc-patches@gcc.gnu.org; Thu, 01 Feb 2024 20:38:03 -0500 Received: from loongson.cn (unknown [10.20.4.107]) by gateway (Coremail) with SMTP id _____8Cx2uhyR7xlJvYJAA--.9178S3; Fri, 02 Feb 2024 09:37:55 +0800 (CST) Received: from [10.20.4.107] (unknown [10.20.4.107]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxRMxwR7xlkL4sAA--.31591S3; Fri, 02 Feb 2024 09:37:53 +0800 (CST) Subject: Re: [PATCH] LoongArch: libsanitizer: Enable build lsan and tsan for loongarch64. To: gcc-patches@gcc.gnu.org, jakub@redhat.com Cc: xry111@xry111.site, i@xen0n.name, xuchenghua@loongson.cn, chenguoqi References: <20240130020951.18469-1-chenglulu@loongson.cn> From: chenglulu Message-ID: Date: Fri, 2 Feb 2024 09:37:52 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20240130020951.18469-1-chenglulu@loongson.cn> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID:AQAAf8AxRMxwR7xlkL4sAA--.31591S3 X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBj93XoWxuryfGF4rJr15Kry7WFWrCrX_yoW5KrW3pw 4F9F1UJa4ktrZ7Zr48GayYqr10yw1UKFnFgF1rGr18CrnakrykGws2gas0qay7Kw4Yka15 CFyUurWagryUuFbCm3ZEXasCq-sJn29KB7ZKAUJUUUUr529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUBYb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6r4j6r4UJwAaw2AFwI0_Jrv_JF1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0c Ia020Ex4CE44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JF0_ Jw1lYx0Ex4A2jsIE14v26r4j6F4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrw CYjI0SjxkI62AI1cAE67vIY487MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j 6r4UMxCIbckI1I0E14v26r1Y6r17MI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwV AFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv2 0xvE14v26r1I6r4UMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4 v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x0267AK xVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU8SAp5UUUUU== Received-SPF: pass client-ip=114.242.206.163; envelope-from=chenglulu@loongson.cn; helo=mail.loongson.cn X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9,MIME_CHARSET_FARAWAY=2.45,NICE_REPLY_A=-2.112,SPF_HELO_NONE=0.001,SPF_PASS=-0.001,T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,MIME_CHARSET_FARAWAY,NICE_REPLY_A,SPF_FAIL,SPF_HELO_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 List-Id: Ping? ÔÚ 2024/1/30 ÉÏÎç10:09, Lulu Cheng дµÀ: > From: chenguoqi > > libsanitizer/ChangeLog: > > * configure.tgt: Enable tsan and lsan for loongarch64. > * tsan/Makefile.am: Add tsan_rtl_loongarch64.S to EXTRA_libtsan_la_SOURCES. > * tsan/Makefile.in: Regenerate. > --- > libsanitizer/configure.tgt | 5 +++++ > libsanitizer/tsan/Makefile.am | 2 +- > libsanitizer/tsan/Makefile.in | 3 ++- > 3 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/libsanitizer/configure.tgt b/libsanitizer/configure.tgt > index 38fc7001ff7..77a0e68222b 100644 > --- a/libsanitizer/configure.tgt > +++ b/libsanitizer/configure.tgt > @@ -79,6 +79,11 @@ case "${target}" in > fi > ;; > loongarch64-*-linux*) > + if test x$ac_cv_sizeof_void_p = x8; then > + TSAN_SUPPORTED=yes > + LSAN_SUPPORTED=yes > + TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_loongarch64.lo > + fi > ;; > *) > UNSUPPORTED=1 > diff --git a/libsanitizer/tsan/Makefile.am b/libsanitizer/tsan/Makefile.am > index cb8bf2e705e..e8fca16be5f 100644 > --- a/libsanitizer/tsan/Makefile.am > +++ b/libsanitizer/tsan/Makefile.am > @@ -50,7 +50,7 @@ tsan_files = \ > tsan_vector_clock.cpp > > libtsan_la_SOURCES = $(tsan_files) > -EXTRA_libtsan_la_SOURCES = tsan_rtl_amd64.S tsan_rtl_aarch64.S tsan_rtl_mips64.S tsan_rtl_ppc64.S tsan_rtl_s390x.S tsan_rtl_riscv64.S > +EXTRA_libtsan_la_SOURCES = tsan_rtl_amd64.S tsan_rtl_aarch64.S tsan_rtl_loongarch64.S tsan_rtl_mips64.S tsan_rtl_ppc64.S tsan_rtl_s390x.S tsan_rtl_riscv64.S > libtsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(TSAN_TARGET_DEPENDENT_OBJECTS) > libtsan_la_DEPENDENCIES = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(TSAN_TARGET_DEPENDENT_OBJECTS) > if LIBBACKTRACE_SUPPORTED > diff --git a/libsanitizer/tsan/Makefile.in b/libsanitizer/tsan/Makefile.in > index 5cc6f95a40a..5bbdf3915b8 100644 > --- a/libsanitizer/tsan/Makefile.in > +++ b/libsanitizer/tsan/Makefile.in > @@ -456,7 +456,7 @@ tsan_files = \ > tsan_vector_clock.cpp > > libtsan_la_SOURCES = $(tsan_files) > -EXTRA_libtsan_la_SOURCES = tsan_rtl_amd64.S tsan_rtl_aarch64.S tsan_rtl_mips64.S tsan_rtl_ppc64.S tsan_rtl_s390x.S tsan_rtl_riscv64.S > +EXTRA_libtsan_la_SOURCES = tsan_rtl_amd64.S tsan_rtl_aarch64.S tsan_rtl_loongarch64.S tsan_rtl_mips64.S tsan_rtl_ppc64.S tsan_rtl_s390x.S tsan_rtl_riscv64.S > libtsan_la_LIBADD = \ > $(top_builddir)/sanitizer_common/libsanitizer_common.la \ > $(top_builddir)/interception/libinterception.la \ > @@ -614,6 +614,7 @@ distclean-compile: > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsan_rtl_aarch64.Plo@am__quote@ > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsan_rtl_access.Plo@am__quote@ > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsan_rtl_amd64.Plo@am__quote@ > +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsan_rtl_loongarch64.Plo@am__quote@ > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsan_rtl_mips64.Plo@am__quote@ > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsan_rtl_mutex.Plo@am__quote@ > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsan_rtl_ppc64.Plo@am__quote@