Patchwork [google/gcc-4_6_2-mobile] Enable stack protector for Android target

login
register
mail settings
Submitter Ilya Enkovich
Date Feb. 21, 2012, 9:45 a.m.
Message ID <CAMbmDYb4c0TPpYfgERh0TxLbZe8T99UNja8_2_bQGKA1t2+ngA@mail.gmail.com>
Download mbox | patch
Permalink /patch/142273/
State New
Headers show

Comments

Ilya Enkovich - Feb. 21, 2012, 9:45 a.m.
Hello,

Here is a patch which enables stack protector feature for Android
targets. OK for google/gcc-4_6_2-mobile branch?

Thanks,
Ilya
--

2012-02-21  Enkovich Ilya  <ilya.enkovich@intel.com>

	* gcc/configure.ac : Enable stack protector for
	Android target.
	* gcc/configure : Regenerated.

Patch

Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac	(revision 184395)
+++ gcc/configure.ac	(working copy)
@@ -4389,6 +4389,8 @@ 
       gcc_cv_libc_provides_ssp,
       [gcc_cv_libc_provides_ssp=no
     case "$target" in
+       *-android-*)
+         gcc_cv_libc_provides_ssp=yes;;
        *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
       [# glibc 2.4 and later provides __stack_chk_fail and
       # either __stack_chk_guard, or TLS access to stack guard canary.