From 6ed152e45f2815670b2b7323ee067c36fd997339 Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Tue, 2 Apr 2013 19:26:45 +0800 Subject: [4.8] Add -mstack-protector-guard= to x86 compilers To choose between "global" (default) and "tls" (new) for -fstack-protector, -fstack-protector-all, and -fstack-protector-strong (GCC 4.6+). Note that this alone doesn't enable any -fstack-protector* For NDK: The default "global" generates code backward compatible with older bionic For AOSP: build may add "-mstack-protector-guard=tls" to build platform code with new bionic (*1) Related CL: ad88a0863110798cef5169dcf917e18b967a7cf6 (*1) e804643b6dfcfb5842dea4b714601c6dd89f4944 Change-Id: I341c9022530b37ca289d94e1174dfa86a8eaa1bf --- gcc-4.8/gcc/config/i386/i386-opts.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc-4.8/gcc/config/i386/i386-opts.h') diff --git a/gcc-4.8/gcc/config/i386/i386-opts.h b/gcc-4.8/gcc/config/i386/i386-opts.h index 11c08457d..3f3ce13be 100644 --- a/gcc-4.8/gcc/config/i386/i386-opts.h +++ b/gcc-4.8/gcc/config/i386/i386-opts.h @@ -85,4 +85,9 @@ enum ix86_veclibabi { ix86_veclibabi_type_acml }; +enum stack_protector_guard { + SSP_TLS, /* per-thread canary at %gs:20 */ + SSP_GLOBAL, /* global canary */ +}; + #endif -- cgit v1.2.3