Backport from trunk r187586 http://gcc.gnu.org/ml/gcc-cvs/2012-05/msg00583.html Enable -fstack-protector support for Android targets. The patch only affects ...
12 years, 11 months ago
(2012-05-18 18:35:32 UTC)
#1
Backport from trunk r187586
http://gcc.gnu.org/ml/gcc-cvs/2012-05/msg00583.html
Enable -fstack-protector support for Android targets.
The patch only affects targets where __BIONIC__ is defined.
Built Android arm toolchain.
Would like to commit the patch to google/gcc-4_6 and
google/gcc-4_6_2-mobile.
OK?
2012-05-18 Jing Yu <jingyu@google.com>
Backport from trunk r187586:
2012-05-16 Igor Zamyatin <igor.zamyatin@intel.com>
* configure.ac: Stack protector enabling for Android targets.
* configure: Regenerate.
Index: gcc/configure
===================================================================
--- gcc/configure (revision 187663)
+++ gcc/configure (working copy)
@@ -25862,6 +25862,11 @@
$target_header_dir/bits/uClibc_config.h > /dev/null; then
gcc_cv_libc_provides_ssp=yes
fi
+ # all versions of Bionic support stack protector
+ elif test -f $target_header_dir/sys/cdefs.h \
+ && $EGREP '^[ ]*#[ ]*define[ ]+__BIONIC__[ ]+1' \
+ $target_header_dir/sys/cdefs.h > /dev/null; then
+ gcc_cv_libc_provides_ssp=yes
fi
;;
*-*-gnu*)
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac (revision 187663)
+++ gcc/configure.ac (working copy)
@@ -4414,6 +4414,11 @@
$target_header_dir/bits/uClibc_config.h > /dev/null; then
gcc_cv_libc_provides_ssp=yes
fi
+ # all versions of Bionic support stack protector
+ elif test -f $target_header_dir/sys/cdefs.h \
+ && $EGREP '^[ ]*#[ ]*define[ ]+__BIONIC__[ ]+1' \
+ $target_header_dir/sys/cdefs.h > /dev/null; then
+ gcc_cv_libc_provides_ssp=yes
fi]
;;
*-*-gnu*)
Index: gcc/ChangeLog.google-4_6
===================================================================
--- gcc/ChangeLog.google-4_6 (revision 187663)
+++ gcc/ChangeLog.google-4_6 (working copy)
@@ -1,3 +1,11 @@
+2012-05-18 Jing Yu <jingyu@google.com>
+
+ Backport from trunk r187586:
+ 2012-05-16 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ * configure.ac: Stack protector enabling for Android targets.
+ * configure: Regenerate.
+
2012-05-18 Teresa Johnson <tejohnson@google.com>
Backport from google/main r187660:
--
This patch is available for review at http://codereview.appspot.com/6220051
Issue 6220051: [google]Backport to enable stack protector for Android targets
Created 12 years, 11 months ago by jingyu
Modified 12 years, 11 months ago
Reviewers: bccheng_google.com, pavel.v.chupin_intel.com, carrot, shenhan, Diego Novillo
Base URL: svn+ssh://gcc.gnu.org/svn/gcc/branches/google/gcc-4_6/
Comments: 0