tools/testing/selftests/x86/check_cc.sh

Source file repositories/reference/linux-study-clean/tools/testing/selftests/x86/check_cc.sh

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/x86/check_cc.sh
Extension
.sh
Size
295 bytes
Lines
17
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: tools
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

#!/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

Annotation

Implementation Notes