From patchwork Sun Mar 25 03:59:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 890608 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=datacom.ind.br Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4083TH3V3jz9s1n for ; Sun, 25 Mar 2018 15:00:18 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 1272622796; Sun, 25 Mar 2018 04:00:14 +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 dY7bOU-LDblq; Sun, 25 Mar 2018 04:00:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id AF9CC227AF; Sun, 25 Mar 2018 04:00:08 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 44B961CF0E1 for ; Sun, 25 Mar 2018 04:00:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 41ED589671 for ; Sun, 25 Mar 2018 04:00:07 +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 zcRVtlhNkOd0 for ; Sun, 25 Mar 2018 04:00:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.datacom.ind.br (mx.datacom.ind.br [177.66.5.10]) by hemlock.osuosl.org (Postfix) with ESMTPS id AFAF6897B5 for ; Sun, 25 Mar 2018 04:00:05 +0000 (UTC) Received: from mail.datacom.ind.br (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTPS id 0405A1BA02B9; Sun, 25 Mar 2018 01:00:09 -0300 (-03) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTP id E2B3E1BA0338; Sun, 25 Mar 2018 01:00:08 -0300 (-03) Received: from mail.datacom.ind.br ([127.0.0.1]) by localhost (mail.datacom.ind.br [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Ewd36Hgt9Ndc; Sun, 25 Mar 2018 01:00:08 -0300 (-03) Received: from p7-1130br.casantos.org (unknown [177.18.152.199]) by mail.datacom.ind.br (Postfix) with ESMTPSA id 84BC21BA02B9; Sun, 25 Mar 2018 01:00:08 -0300 (-03) From: Carlos Santos To: buildroot@buildroot.org Date: Sun, 25 Mar 2018 00:59:52 -0300 Message-Id: <20180325035953.25906-2-casantos@datacom.ind.br> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180325035953.25906-1-casantos@datacom.ind.br> References: <20180325035953.25906-1-casantos@datacom.ind.br> Subject: [Buildroot] [PATCH 1/2] toolchain: fix detection of SSP support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas De Schampheleire , Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" GCC issues a warning message if -fstack-protector is passed but SSP is not available, so in order to force the compilation to fail we must also pass -Werror. All external toolchains were verified. The only one whose configuration incorrectly selected BR2_TOOLCHAIN_HAS_SSP was CodeSourcery NIOSII. Fixes: http://autobuild.buildroot.net/results/ce8fe8ac9cf0db01ae15d476ea714ff176965cfb http://autobuild.buildroot.net/results/09ce8f05e28c0219f499ce55130e896cae0c8b45 Signed-off-by: Carlos Santos --- toolchain/helpers.mk | 2 +- .../toolchain-external/toolchain-external-codesourcery-niosII/Config.in | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk index 63ef6fb4b0..1792286add 100644 --- a/toolchain/helpers.mk +++ b/toolchain/helpers.mk @@ -421,7 +421,7 @@ check_unusable_toolchain = \ # check_toolchain_ssp = \ __CROSS_CC=$(strip $1) ; \ - __HAS_SSP=`echo 'void main(){}' | $${__CROSS_CC} -fstack-protector -x c - -o $(BUILD_DIR)/.br-toolchain-test.tmp >/dev/null 2>&1 && echo y` ; \ + __HAS_SSP=`echo 'void main(){}' | $${__CROSS_CC} -Werror -fstack-protector -x c - -o $(BUILD_DIR)/.br-toolchain-test.tmp >/dev/null 2>&1 && echo y` ; \ if [ "$(BR2_TOOLCHAIN_HAS_SSP)" != "y" -a "$${__HAS_SSP}" = "y" ] ; then \ echo "SSP support available in this toolchain, please enable BR2_TOOLCHAIN_EXTERNAL_HAS_SSP" ; \ exit 1 ; \ diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in index 7563995eb6..4ac9c95c86 100644 --- a/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in @@ -5,7 +5,6 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" depends on !BR2_STATIC_LIBS select BR2_TOOLCHAIN_EXTERNAL_GLIBC - select BR2_TOOLCHAIN_HAS_SSP select BR2_TOOLCHAIN_HAS_NATIVE_RPC select BR2_INSTALL_LIBSTDCPP select BR2_HOSTARCH_NEEDS_IA32_LIBS