From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7AA3215A7D9 for ; Mon, 13 Mar 2023 21:48:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B2D2BE07E0; Mon, 13 Mar 2023 21:48:08 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7B70DE07E0 for ; Mon, 13 Mar 2023 21:48:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 783DF343617 for ; Mon, 13 Mar 2023 21:48:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3832573E for ; Mon, 13 Mar 2023 21:48:05 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1678744073.162b52d8795d5eead77376c37c23d91001373258.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/clang-common/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/clang-common/clang-common-15.0.7-r3.ebuild sys-devel/clang-common/clang-common-15.0.7-r4.ebuild sys-devel/clang-common/clang-common-16.0.0.9999.ebuild sys-devel/clang-common/clang-common-16.0.0_rc3-r1.ebuild sys-devel/clang-common/clang-common-16.0.0_rc3-r2.ebuild sys-devel/clang-common/clang-common-16.0.0_rc4-r1.ebuild sys-devel/clang-common/clang-common-16.0.0_rc4.ebuild sys-devel/clang-common/clang-common-17.0.0.9999.ebuild sys-devel/clang-common/clang-common-17.0.0_pre20230304-r1.ebuild sys-devel/clang-common/clang-common-17.0.0_pre20230304.ebuild X-VCS-Directories: sys-devel/clang-common/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 162b52d8795d5eead77376c37c23d91001373258 X-VCS-Branch: master Date: Mon, 13 Mar 2023 21:48:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7c0ca620-72ac-436c-9a4b-4e96fa0f29ad X-Archives-Hash: c650b41056cc9bbbd7f988a95b7520b7 commit: 162b52d8795d5eead77376c37c23d91001373258 Author: Sam James gentoo org> AuthorDate: Mon Mar 13 21:46:59 2023 +0000 Commit: Sam James gentoo org> CommitDate: Mon Mar 13 21:47:53 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=162b52d8 sys-devel/clang-common: don't default-enable _FORTIFY_SOURCE w/ ASAN and MSAN This can cause either false positives in warnings from the compiler or false negatives where the sanitizer misses something. Bug: https://github.com/google/sanitizers/issues/247 Signed-off-by: Sam James gentoo.org> ...15.0.7-r3.ebuild => clang-common-15.0.7-r4.ebuild} | 19 ++++++++++++++----- .../clang-common/clang-common-16.0.0.9999.ebuild | 19 ++++++++++++++----- ...c3-r1.ebuild => clang-common-16.0.0_rc3-r2.ebuild} | 19 ++++++++++++++----- ...0_rc4.ebuild => clang-common-16.0.0_rc4-r1.ebuild} | 19 ++++++++++++++----- .../clang-common/clang-common-17.0.0.9999.ebuild | 19 ++++++++++++++----- ...uild => clang-common-17.0.0_pre20230304-r1.ebuild} | 19 ++++++++++++++----- 6 files changed, 84 insertions(+), 30 deletions(-) diff --git a/sys-devel/clang-common/clang-common-15.0.7-r3.ebuild b/sys-devel/clang-common/clang-common-15.0.7-r4.ebuild similarity index 91% rename from sys-devel/clang-common/clang-common-15.0.7-r3.ebuild rename to sys-devel/clang-common/clang-common-15.0.7-r4.ebuild index ae60c641f5f9..c7af956a5dd7 100644 --- a/sys-devel/clang-common/clang-common-15.0.7-r3.ebuild +++ b/sys-devel/clang-common/clang-common-15.0.7-r4.ebuild @@ -107,11 +107,20 @@ src_install() { # without optimization and that would at the very least be very noisy # during builds and at worst trigger many -Werror builds. cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die - #ifndef _FORTIFY_SOURCE - #if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 - #define _FORTIFY_SOURCE ${fortify_level} - #endif - #endif + #ifndef _FORTIFY_SOURCE + # if defined(__has_feature) + # define __GENTOO_HAS_FEATURE(x) __has_feature(x) + # else + # define __GENTOO_HAS_FEATURE(x) 0 + # endif + # + # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 + # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer) + # define _FORTIFY_SOURCE ${fortify_level} + # endif + # endif + # undef __GENTOO_HAS_FEATURE + #endif EOF if use hardened ; then diff --git a/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild index 3165f42a329f..808c1e1a0ae1 100644 --- a/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild +++ b/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild @@ -106,11 +106,20 @@ src_install() { # without optimization and that would at the very least be very noisy # during builds and at worst trigger many -Werror builds. cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die - #ifndef _FORTIFY_SOURCE - #if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 - #define _FORTIFY_SOURCE ${fortify_level} - #endif - #endif + #ifndef _FORTIFY_SOURCE + # if defined(__has_feature) + # define __GENTOO_HAS_FEATURE(x) __has_feature(x) + # else + # define __GENTOO_HAS_FEATURE(x) 0 + # endif + # + # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 + # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer) + # define _FORTIFY_SOURCE ${fortify_level} + # endif + # endif + # undef __GENTOO_HAS_FEATURE + #endif EOF if use hardened ; then diff --git a/sys-devel/clang-common/clang-common-16.0.0_rc3-r1.ebuild b/sys-devel/clang-common/clang-common-16.0.0_rc3-r2.ebuild similarity index 91% rename from sys-devel/clang-common/clang-common-16.0.0_rc3-r1.ebuild rename to sys-devel/clang-common/clang-common-16.0.0_rc3-r2.ebuild index d8624a7c3152..1f768ea302a9 100644 --- a/sys-devel/clang-common/clang-common-16.0.0_rc3-r1.ebuild +++ b/sys-devel/clang-common/clang-common-16.0.0_rc3-r2.ebuild @@ -106,11 +106,20 @@ src_install() { # without optimization and that would at the very least be very noisy # during builds and at worst trigger many -Werror builds. cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die - #ifndef _FORTIFY_SOURCE - #if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 - #define _FORTIFY_SOURCE ${fortify_level} - #endif - #endif + #ifndef _FORTIFY_SOURCE + # if defined(__has_feature) + # define __GENTOO_HAS_FEATURE(x) __has_feature(x) + # else + # define __GENTOO_HAS_FEATURE(x) 0 + # endif + # + # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 + # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer) + # define _FORTIFY_SOURCE ${fortify_level} + # endif + # endif + # undef __GENTOO_HAS_FEATURE + #endif EOF if use hardened ; then diff --git a/sys-devel/clang-common/clang-common-16.0.0_rc4.ebuild b/sys-devel/clang-common/clang-common-16.0.0_rc4-r1.ebuild similarity index 91% rename from sys-devel/clang-common/clang-common-16.0.0_rc4.ebuild rename to sys-devel/clang-common/clang-common-16.0.0_rc4-r1.ebuild index d8624a7c3152..1f768ea302a9 100644 --- a/sys-devel/clang-common/clang-common-16.0.0_rc4.ebuild +++ b/sys-devel/clang-common/clang-common-16.0.0_rc4-r1.ebuild @@ -106,11 +106,20 @@ src_install() { # without optimization and that would at the very least be very noisy # during builds and at worst trigger many -Werror builds. cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die - #ifndef _FORTIFY_SOURCE - #if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 - #define _FORTIFY_SOURCE ${fortify_level} - #endif - #endif + #ifndef _FORTIFY_SOURCE + # if defined(__has_feature) + # define __GENTOO_HAS_FEATURE(x) __has_feature(x) + # else + # define __GENTOO_HAS_FEATURE(x) 0 + # endif + # + # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 + # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer) + # define _FORTIFY_SOURCE ${fortify_level} + # endif + # endif + # undef __GENTOO_HAS_FEATURE + #endif EOF if use hardened ; then diff --git a/sys-devel/clang-common/clang-common-17.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-17.0.0.9999.ebuild index 3165f42a329f..808c1e1a0ae1 100644 --- a/sys-devel/clang-common/clang-common-17.0.0.9999.ebuild +++ b/sys-devel/clang-common/clang-common-17.0.0.9999.ebuild @@ -106,11 +106,20 @@ src_install() { # without optimization and that would at the very least be very noisy # during builds and at worst trigger many -Werror builds. cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die - #ifndef _FORTIFY_SOURCE - #if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 - #define _FORTIFY_SOURCE ${fortify_level} - #endif - #endif + #ifndef _FORTIFY_SOURCE + # if defined(__has_feature) + # define __GENTOO_HAS_FEATURE(x) __has_feature(x) + # else + # define __GENTOO_HAS_FEATURE(x) 0 + # endif + # + # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 + # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer) + # define _FORTIFY_SOURCE ${fortify_level} + # endif + # endif + # undef __GENTOO_HAS_FEATURE + #endif EOF if use hardened ; then diff --git a/sys-devel/clang-common/clang-common-17.0.0_pre20230304.ebuild b/sys-devel/clang-common/clang-common-17.0.0_pre20230304-r1.ebuild similarity index 91% rename from sys-devel/clang-common/clang-common-17.0.0_pre20230304.ebuild rename to sys-devel/clang-common/clang-common-17.0.0_pre20230304-r1.ebuild index 3165f42a329f..808c1e1a0ae1 100644 --- a/sys-devel/clang-common/clang-common-17.0.0_pre20230304.ebuild +++ b/sys-devel/clang-common/clang-common-17.0.0_pre20230304-r1.ebuild @@ -106,11 +106,20 @@ src_install() { # without optimization and that would at the very least be very noisy # during builds and at worst trigger many -Werror builds. cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die - #ifndef _FORTIFY_SOURCE - #if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 - #define _FORTIFY_SOURCE ${fortify_level} - #endif - #endif + #ifndef _FORTIFY_SOURCE + # if defined(__has_feature) + # define __GENTOO_HAS_FEATURE(x) __has_feature(x) + # else + # define __GENTOO_HAS_FEATURE(x) 0 + # endif + # + # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 + # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer) + # define _FORTIFY_SOURCE ${fortify_level} + # endif + # endif + # undef __GENTOO_HAS_FEATURE + #endif EOF if use hardened ; then