|
@@ -433,6 +433,7 @@ check_unusable_toolchain = \
|
|
# Check if the toolchain has SSP (stack smashing protector) support
|
|
# Check if the toolchain has SSP (stack smashing protector) support
|
|
#
|
|
#
|
|
# $1: cross-gcc path
|
|
# $1: cross-gcc path
|
|
|
|
+# $2: gcc ssp option
|
|
#
|
|
#
|
|
check_toolchain_ssp = \
|
|
check_toolchain_ssp = \
|
|
__CROSS_CC=$(strip $1) ; \
|
|
__CROSS_CC=$(strip $1) ; \
|
|
@@ -445,6 +446,13 @@ check_toolchain_ssp = \
|
|
echo "SSP support not available in this toolchain, please disable BR2_TOOLCHAIN_EXTERNAL_HAS_SSP" ; \
|
|
echo "SSP support not available in this toolchain, please disable BR2_TOOLCHAIN_EXTERNAL_HAS_SSP" ; \
|
|
exit 1 ; \
|
|
exit 1 ; \
|
|
fi ; \
|
|
fi ; \
|
|
|
|
+ __SSP_OPTION=$(2); \
|
|
|
|
+ if [ -n "$${__SSP_OPTION}" ] ; then \
|
|
|
|
+ if ! echo 'void main(){}' | $${__CROSS_CC} -Werror $${__SSP_OPTION} -x c - -o $(BUILD_DIR)/.br-toolchain-test.tmp >/dev/null 2>&1 ; then \
|
|
|
|
+ echo "SSP option $${__SSP_OPTION} not available in this toolchain, please select another SSP level" ; \
|
|
|
|
+ exit 1 ; \
|
|
|
|
+ fi; \
|
|
|
|
+ fi; \
|
|
rm -f $(BUILD_DIR)/.br-toolchain-test.tmp*
|
|
rm -f $(BUILD_DIR)/.br-toolchain-test.tmp*
|
|
|
|
|
|
#
|
|
#
|