Masahiro Yamada | 400d976 | 2013-12-11 20:11:34 +0900 | [diff] [blame] | 1 | #!/bin/sh |
Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 2 | # SPDX-License-Identifier: GPL-2.0+ |
Masahiro Yamada | 400d976 | 2013-12-11 20:11:34 +0900 | [diff] [blame] | 3 | # Test for gcc '-fstack-usage' support |
| 4 | # Copyright (C) 2013, Masahiro Yamada <yamada.m@jp.panasonic.com> |
| 5 | # |
Masahiro Yamada | 400d976 | 2013-12-11 20:11:34 +0900 | [diff] [blame] | 6 | |
| 7 | TMP="$$" |
| 8 | |
| 9 | cat <<END | $@ -Werror -fstack-usage -x c - -c -o $TMP >/dev/null 2>&1 \ |
| 10 | && echo "y" |
| 11 | int main(void) |
| 12 | { |
| 13 | return 0; |
| 14 | } |
| 15 | END |
| 16 | |
| 17 | rm -f $TMP $TMP.su |