Staging
v0.8.1
https://github.com/torvalds/linux
Raw File
Tip revision: 36a21d51725af2ce0700c6ebcb6b9594aac658a6 authored by Linus Torvalds on 08 August 2021, 20:49:31 UTC
Linux 5.14-rc5
Tip revision: 36a21d5
check_cc.sh
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only
# check_cc.sh - Helper to test userspace compilation support
# Copyright (c) 2015 Andrew Lutomirski

CC="$1"
TESTPROG="$2"
shift 2

if "$CC" -o /dev/null "$TESTPROG" -O0 "$@" 2>/dev/null; then
    echo 1
else
    echo 0
fi

exit 0
back to top