diff options
Diffstat (limited to 'meta/classes-global/sanity.bbclass')
-rw-r--r-- | meta/classes-global/sanity.bbclass | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass index d1452967fc..1044ed9cc6 100644 --- a/meta/classes-global/sanity.bbclass +++ b/meta/classes-global/sanity.bbclass | |||
@@ -514,12 +514,9 @@ def check_userns(): | |||
514 | # built buildtools-extended-tarball) | 514 | # built buildtools-extended-tarball) |
515 | # | 515 | # |
516 | def check_gcc_version(sanity_data): | 516 | def check_gcc_version(sanity_data): |
517 | import subprocess | 517 | version = oe.utils.get_host_gcc_version(sanity_data) |
518 | 518 | if bb.utils.vercmp_string_op(version, "8.0", "<"): | |
519 | build_cc, version = oe.utils.get_host_compiler_version(sanity_data) | 519 | return "Your version of gcc is older than 8.0 and will break builds. Please install a newer version of gcc (you could use the project's buildtools-extended-tarball or use scripts/install-buildtools).\n" |
520 | if build_cc.strip() == "gcc": | ||
521 | if bb.utils.vercmp_string_op(version, "8.0", "<"): | ||
522 | return "Your version of gcc is older than 8.0 and will break builds. Please install a newer version of gcc (you could use the project's buildtools-extended-tarball or use scripts/install-buildtools).\n" | ||
523 | return None | 520 | return None |
524 | 521 | ||
525 | # Tar version 1.24 and onwards handle overwriting symlinks correctly | 522 | # Tar version 1.24 and onwards handle overwriting symlinks correctly |
@@ -609,7 +606,7 @@ def drop_v14_cross_builds(d): | |||
609 | 606 | ||
610 | def check_cpp_toolchain_flag(d, flag, error_message=None): | 607 | def check_cpp_toolchain_flag(d, flag, error_message=None): |
611 | """ | 608 | """ |
612 | Checks if the C++ toolchain support the given flag | 609 | Checks if the g++ compiler supports the given flag |
613 | """ | 610 | """ |
614 | import shlex | 611 | import shlex |
615 | import subprocess | 612 | import subprocess |
@@ -622,7 +619,7 @@ def check_cpp_toolchain_flag(d, flag, error_message=None): | |||
622 | } | 619 | } |
623 | """ | 620 | """ |
624 | 621 | ||
625 | cmd = shlex.split(d.getVar("BUILD_CXX")) + ["-x", "c++","-", "-o", "/dev/null", flag] | 622 | cmd = ["g++", "-x", "c++","-", "-o", "/dev/null", flag] |
626 | try: | 623 | try: |
627 | subprocess.run(cmd, input=cpp_code, capture_output=True, text=True, check=True) | 624 | subprocess.run(cmd, input=cpp_code, capture_output=True, text=True, check=True) |
628 | return None | 625 | return None |
@@ -700,11 +697,11 @@ def check_sanity_version_change(status, d): | |||
700 | if not check_app_exists("${MAKE}", d): | 697 | if not check_app_exists("${MAKE}", d): |
701 | missing = missing + "GNU make," | 698 | missing = missing + "GNU make," |
702 | 699 | ||
703 | if not check_app_exists('${BUILD_CC}', d): | 700 | if not check_app_exists('gcc', d): |
704 | missing = missing + "C Compiler (%s)," % d.getVar("BUILD_CC") | 701 | missing = missing + "C Compiler (gcc)," |
705 | 702 | ||
706 | if not check_app_exists('${BUILD_CXX}', d): | 703 | if not check_app_exists('g++', d): |
707 | missing = missing + "C++ Compiler (%s)," % d.getVar("BUILD_CXX") | 704 | missing = missing + "C++ Compiler (g++)," |
708 | 705 | ||
709 | required_utilities = d.getVar('SANITY_REQUIRED_UTILITIES') | 706 | required_utilities = d.getVar('SANITY_REQUIRED_UTILITIES') |
710 | 707 | ||