From: Carlos Santos <casantos@datacom.ind.br>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] toolchain: fix detection of SSP support
Date: Sun, 25 Mar 2018 00:59:52 -0300 [thread overview]
Message-ID: <20180325035953.25906-2-casantos@datacom.ind.br> (raw)
In-Reply-To: <20180325035953.25906-1-casantos@datacom.ind.br>
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 <casantos@datacom.ind.br>
---
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
--
2.14.3
next prev parent reply other threads:[~2018-03-25 3:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-25 3:59 [Buildroot] [PATCH 0/2] tpm2-* fix build errors Carlos Santos
2018-03-25 3:59 ` Carlos Santos [this message]
2018-03-25 21:21 ` [Buildroot] [PATCH 1/2] toolchain: fix detection of SSP support Thomas Petazzoni
2018-03-25 3:59 ` [Buildroot] [PATCH 2/2] tpm2-tools: fix compilation error due to uninitialized variable Carlos Santos
2018-03-25 13:44 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180325035953.25906-2-casantos@datacom.ind.br \
--to=casantos@datacom.ind.br \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox