160a5317fSTejun Heo#!/bin/sh
2b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
360a5317fSTejun Heo
43fb0fdb3SAndy Lutomirski# This requires GCC 8.1 or better.  Specifically, we require
53fb0fdb3SAndy Lutomirski# -mstack-protector-guard-reg, added by
63fb0fdb3SAndy Lutomirski# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81708
73fb0fdb3SAndy Lutomirski
8*70a9f00dSNathan Chancellorecho "int foo(void) { char X[200]; return 3; }" | $* -S -x c -m32 -O0 -fstack-protector -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard - -o - 2> /dev/null | grep -q "%fs"
9