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

package info (click to toggle)
linux-tools 4.4-4~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 26,236 kB
  • sloc: ansic: 302,415; perl: 15,242; asm: 9,350; sh: 8,158; python: 7,955; makefile: 7,238; yacc: 2,669; cpp: 2,489; lex: 1,561; awk: 770
file content (8 lines) | stat: -rwxr-xr-x 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