Staging
v0.5.1
https://github.com/torvalds/linux
Raw File
Tip revision: 7928b2cbe55b2a410a0f5c1f154610059c57b1b2 authored by Linus Torvalds on 11 February 2018, 23:04:29 UTC
Linux 4.16-rc1
Tip revision: 7928b2c
gcc-x86_32-has-stack-protector.sh
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0

echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
if [ "$?" -eq "0" ] ; then
	echo y
else
	echo n
fi
back to top