blob: 6b2aeefb9cd3e0884da9ce0cfaaa8d288e03a6ee [file] [log] [blame]
Tejun Heo60a53172009-02-09 22:17:40 +09001#!/bin/sh
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01002# SPDX-License-Identifier: GPL-2.0
Tejun Heo60a53172009-02-09 22:17:40 +09003
Jean Delvareb1e0d8b2012-10-02 16:42:36 +02004echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
Tejun Heo60a53172009-02-09 22:17:40 +09005if [ "$?" -eq "0" ] ; then
6 echo y
7else
8 echo n
9fi