+2017-01-19 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR target/78875
+ PR target/79140
+ * config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Unconditionally
+ define to rs6000_init_stack_protect_guard.
+ (rs6000_init_stack_protect_guard): New function.
+
2017-01-19 Matthew Fortune <matthew.fortune@imgtec.com>
Yunqiang Su <yunqiang.su@imgtec.com>
#define TARGET_VECTORIZE_BUILTIN_MD_VECTORIZED_FUNCTION \
rs6000_builtin_md_vectorized_function
-#ifdef TARGET_THREAD_SSP_OFFSET
#undef TARGET_STACK_PROTECT_GUARD
-#define TARGET_STACK_PROTECT_GUARD hook_tree_void_null
-#endif
+#define TARGET_STACK_PROTECT_GUARD rs6000_init_stack_protect_guard
#if !TARGET_MACHO
#undef TARGET_STACK_PROTECT_FAIL
return dest;
}
+/* Only create the global variable for the stack protect guard if we are using
+ the global flavor of that guard. */
+static tree
+rs6000_init_stack_protect_guard (void)
+{
+ if (rs6000_stack_protector_guard == SSP_GLOBAL)
+ return default_stack_protect_guard ();
+
+ return NULL_TREE;
+}
+
/* Implement TARGET_CANNOT_FORCE_CONST_MEM. */
static bool