File: gcc-x86_64-has-stack-protector.sh

package info (click to toggle)
linux 3.14.12-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 666,320 kB
  • sloc: ansic: 11,822,312; asm: 273,382; xml: 46,774; perl: 44,603; makefile: 29,283; sh: 7,245; python: 6,582; cpp: 5,100; yacc: 4,233; lex: 2,167; awk: 737; pascal: 231; lisp: 218; sed: 30
file content (8 lines) | stat: -rw-r--r-- 200 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
#!/bin/sh

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