Staging
v0.8.1
https://github.com/torvalds/linux
Raw File
Tip revision: 94f6f0550c625fab1f373bb86a6669b45e9748b3 authored by Linus Torvalds on 08 October 2023, 20:49:43 UTC
Linux 6.6-rc5
Tip revision: 94f6f05
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 [ -n "$CC" ] && $CC -o /dev/null "$TESTPROG" -O0 "$@" 2>/dev/null; then
    echo 1
else
    echo 0
fi

exit 0
back to top