linux/scripts/cc-can-link.sh
Alexei Starovoitov 819dd92b9c bpfilter: switch to CC from HOSTCC
check that CC can build executables and use that compiler instead of HOSTCC

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-05 10:21:18 -04:00

12 lines
178 B
Bash
Executable File

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
cat << "END" | $@ -x c - -o /dev/null >/dev/null 2>&1 && echo "y"
#include <stdio.h>
int main(void)
{
printf("");
return 0;
}
END