From patchwork Thu Feb 20 02:01:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1241104 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48NHrY3Tcxz9sRs for ; Thu, 20 Feb 2020 13:01:33 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 408E3860FC; Thu, 20 Feb 2020 02:01:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3EYxg8QAQTpS; Thu, 20 Feb 2020 02:01:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 8C819861A2; Thu, 20 Feb 2020 02:01:29 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 8C67A1BF298 for ; Thu, 20 Feb 2020 02:01:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 87790204A7 for ; Thu, 20 Feb 2020 02:01:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ucymcPj6-JCF for ; Thu, 20 Feb 2020 02:01:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by silver.osuosl.org (Postfix) with ESMTPS id B52991FEBF for ; Thu, 20 Feb 2020 02:01:25 +0000 (UTC) X-Originating-IP: 173.221.118.3 Received: from localhost (173.221.118.3.nw.nuvox.net [173.221.118.3]) (Authenticated sender: thomas.petazzoni@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 1DCE2FF805; Thu, 20 Feb 2020 02:01:22 +0000 (UTC) From: Thomas Petazzoni To: Buildroot List Date: Thu, 20 Feb 2020 03:01:14 +0100 Message-Id: <20200220020117.695236-2-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200220020117.695236-1-thomas.petazzoni@bootlin.com> References: <20200220020117.695236-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/3] toolchain: add hidden BR2_TOOLCHAIN_HAS_SSP_STRONG boolean X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas De Schampheleire , Romain Naour , Fabrice Fontaine , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This will allow toolchain to indicate if they support -fstack-protector-strong or not. Whenever the gcc version is >= 4.9, we always have SSP_STRONG support if we have SSP support. However, some toolchains older than gcc 4.9 might have backported SSP_STRONG support, which is why we cannot rely just on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9. Having this "default" value allows to avoid adding a "select BR2_TOOLCHAIN_HAS_SSP_STRONG" in the internal toolchain logic plus in almost external toolchains. But it allows custom external toolchains that are pre-4.9 to potentially declare that they support strong SSP. Signed-off-by: Thomas Petazzoni --- toolchain/Config.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/toolchain/Config.in b/toolchain/Config.in index 973c03254f..87509f3d64 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -189,6 +189,10 @@ config BR2_TOOLCHAIN_HAS_THREADS_NPTL config BR2_TOOLCHAIN_HAS_SSP bool +config BR2_TOOLCHAIN_HAS_SSP_STRONG + bool + default y if BR2_TOOLCHAIN_HAS_SSP && BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + config BR2_TOOLCHAIN_HAS_UCONTEXT bool