mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-24 03:24:55 +08:00
e9886ace22
We currently fail to build on a non-multilib x86_64 target. We print a helpful error, but it's nicer to allow the build to succeed. Fix it and improve cross-compilation support by detecting architecture support directly and building only the relevant tests. Signed-off-by: Andy Lutomirski <luto@kernel.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
17 lines
250 B
Bash
Executable File
17 lines
250 B
Bash
Executable File
#!/bin/sh
|
|
# check_cc.sh - Helper to test userspace compilation support
|
|
# Copyright (c) 2015 Andrew Lutomirski
|
|
# GPL v2
|
|
|
|
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
|