mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
sanity: Reference gcc/g++ directly
BUILD_CC and BUILD_CXX can be overridden on a per recipe context now so these tests don't make sense in this form any more. They assume gcc/g++ so lets just use those directly. This fixes things to work with toolchain selection for the native case. (From OE-Core rev: cc93781667cf4f6971bcb9319ab8ab21320852de) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
8624474277
commit
57f1eb2e66
|
@ -606,7 +606,7 @@ def drop_v14_cross_builds(d):
|
||||||
|
|
||||||
def check_cpp_toolchain_flag(d, flag, error_message=None):
|
def check_cpp_toolchain_flag(d, flag, error_message=None):
|
||||||
"""
|
"""
|
||||||
Checks if the C++ toolchain support the given flag
|
Checks if the g++ compiler supports the given flag
|
||||||
"""
|
"""
|
||||||
import shlex
|
import shlex
|
||||||
import subprocess
|
import subprocess
|
||||||
|
@ -619,7 +619,7 @@ def check_cpp_toolchain_flag(d, flag, error_message=None):
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
cmd = shlex.split(d.getVar("BUILD_CXX")) + ["-x", "c++","-", "-o", "/dev/null", flag]
|
cmd = ["g++", "-x", "c++","-", "-o", "/dev/null", flag]
|
||||||
try:
|
try:
|
||||||
subprocess.run(cmd, input=cpp_code, capture_output=True, text=True, check=True)
|
subprocess.run(cmd, input=cpp_code, capture_output=True, text=True, check=True)
|
||||||
return None
|
return None
|
||||||
|
@ -697,11 +697,11 @@ def check_sanity_version_change(status, d):
|
||||||
if not check_app_exists("${MAKE}", d):
|
if not check_app_exists("${MAKE}", d):
|
||||||
missing = missing + "GNU make,"
|
missing = missing + "GNU make,"
|
||||||
|
|
||||||
if not check_app_exists('${BUILD_CC}', d):
|
if not check_app_exists('gcc', d):
|
||||||
missing = missing + "C Compiler (%s)," % d.getVar("BUILD_CC")
|
missing = missing + "C Compiler (gcc),"
|
||||||
|
|
||||||
if not check_app_exists('${BUILD_CXX}', d):
|
if not check_app_exists('g++', d):
|
||||||
missing = missing + "C++ Compiler (%s)," % d.getVar("BUILD_CXX")
|
missing = missing + "C++ Compiler (g++),"
|
||||||
|
|
||||||
required_utilities = d.getVar('SANITY_REQUIRED_UTILITIES')
|
required_utilities = d.getVar('SANITY_REQUIRED_UTILITIES')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user