swh:1:snp:173f8deb0c56c557784b4fd217e7608ac6197844
Raw File
Tip revision: bebc6082da0a9f5d47a1ea2edc099bf671058bd4 authored by Linus Torvalds on 12 November 2017, 18:46:13 UTC
Linux 4.14
Tip revision: bebc608
gcc-x86_64-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 -mcmodel=kernel -fno-PIE -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
if [ "$?" -eq "0" ] ; then
	echo y
else
	echo n
fi
back to top