summaryrefslogtreecommitdiffstats
path: root/scripts/sysinclude_test
blob: d38cf28c1c97bfe533512a62cc9ea01bbc8a97fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /bin/sh
#
# This script find out which sysinclude path is compiled into gcc
#

if [ "x$GCC" == "x" ]; then
	echo "usage: GCC=<your_gcc> $0";
	exit 1;
fi

cat << EOF | $GCC -E - | \
awk '{if (($2 =="1") && index($3,"/stddef.h")) { gsub("/stddef.h",""); print $3}}'
#include <stddef.h>

int main (void)
{
	return 0;
}
EOF