summaryrefslogtreecommitdiffstats
path: root/toolchain/helpers.mk
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/helpers.mk')
-rw-r--r--toolchain/helpers.mk21
1 files changed, 19 insertions, 2 deletions
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index d28a2caed3..551275967f 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -294,8 +294,7 @@ check_uclibc = \
$(call check_uclibc_feature,__UCLIBC_HAS_WCHAR__,BR2_USE_WCHAR,$${UCLIBC_CONFIG_FILE},Wide char support) ;\
$(call check_uclibc_feature,__UCLIBC_HAS_THREADS__,BR2_TOOLCHAIN_HAS_THREADS,$${UCLIBC_CONFIG_FILE},Thread support) ;\
$(call check_uclibc_feature,__PTHREADS_DEBUG_SUPPORT__,BR2_TOOLCHAIN_HAS_THREADS_DEBUG,$${UCLIBC_CONFIG_FILE},Thread debugging support) ;\
- $(call check_uclibc_feature,__UCLIBC_HAS_THREADS_NATIVE__,BR2_TOOLCHAIN_HAS_THREADS_NPTL,$${UCLIBC_CONFIG_FILE},NPTL thread support) ;\
- $(call check_uclibc_feature,__UCLIBC_HAS_SSP__,BR2_TOOLCHAIN_HAS_SSP,$${UCLIBC_CONFIG_FILE},Stack Smashing Protection support)
+ $(call check_uclibc_feature,__UCLIBC_HAS_THREADS_NATIVE__,BR2_TOOLCHAIN_HAS_THREADS_NPTL,$${UCLIBC_CONFIG_FILE},NPTL thread support)
#
# Check that the Buildroot configuration of the ABI matches the
@@ -387,6 +386,24 @@ check_unusable_toolchain = \
fi
#
+# Check if the toolchain has SSP (stack smashing protector) support
+#
+# $1: cross-gcc path
+#
+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` ; \
+ 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 ; \
+ fi ; \
+ if [ "$(BR2_TOOLCHAIN_HAS_SSP)" = "y" -a "$${__HAS_SSP}" != "y" ] ; then \
+ echo "SSP support not available in this toolchain, please disable BR2_TOOLCHAIN_EXTERNAL_HAS_SSP" ; \
+ exit 1 ; \
+ fi ; \
+ rm -f $(BUILD_DIR)/.br-toolchain-test.tmp*
+
+#
# Generate gdbinit file for use with Buildroot
#
gen_gdbinit_file = \
OpenPOWER on IntegriCloud