xref: /kernel/linux/linux-5.10/tools/testing/selftests/x86/check_cc.sh
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/tools/testing/selftests/x86/
18c2ecf20Sopenharmony_ci#!/bin/sh
28c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
38c2ecf20Sopenharmony_ci# check_cc.sh - Helper to test userspace compilation support
48c2ecf20Sopenharmony_ci# Copyright (c) 2015 Andrew Lutomirski
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ciCC="$1"
78c2ecf20Sopenharmony_ciTESTPROG="$2"
88c2ecf20Sopenharmony_cishift 2
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciif [ -n "$CC" ] && $CC -o /dev/null "$TESTPROG" -O0 "$@" 2>/dev/null; then
118c2ecf20Sopenharmony_ci    echo 1
128c2ecf20Sopenharmony_cielse
138c2ecf20Sopenharmony_ci    echo 0
148c2ecf20Sopenharmony_cifi
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciexit 0
17

Indexes created Thu Nov 07 10:32:03 CST 2024