diff options
Diffstat (limited to 'meta/classes-global')
-rw-r--r-- | meta/classes-global/base.bbclass | 3 | ||||
-rw-r--r-- | meta/classes-global/sanity.bbclass | 21 | ||||
-rw-r--r-- | meta/classes-global/uninative.bbclass | 2 |
3 files changed, 12 insertions, 14 deletions
diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index ac145d9fd6..6be1f5c2df 100644 --- a/meta/classes-global/base.bbclass +++ b/meta/classes-global/base.bbclass | |||
@@ -30,8 +30,9 @@ PREFERRED_TOOLCHAIN:class-crosssdk = "${PREFERRED_TOOLCHAIN_SDK}" | |||
30 | PREFERRED_TOOLCHAIN:class-nativesdk = "${PREFERRED_TOOLCHAIN_SDK}" | 30 | PREFERRED_TOOLCHAIN:class-nativesdk = "${PREFERRED_TOOLCHAIN_SDK}" |
31 | 31 | ||
32 | TOOLCHAIN ??= "${PREFERRED_TOOLCHAIN}" | 32 | TOOLCHAIN ??= "${PREFERRED_TOOLCHAIN}" |
33 | TOOLCHAIN_NATIVE ??= "${PREFERRED_TOOLCHAIN_NATIVE}" | ||
33 | 34 | ||
34 | inherit toolchain/gcc-native | 35 | inherit_defer toolchain/${TOOLCHAIN_NATIVE}-native |
35 | inherit_defer toolchain/${TOOLCHAIN} | 36 | inherit_defer toolchain/${TOOLCHAIN} |
36 | 37 | ||
37 | def lsb_distro_identifier(d): | 38 | def lsb_distro_identifier(d): |
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 | ||
diff --git a/meta/classes-global/uninative.bbclass b/meta/classes-global/uninative.bbclass index 75e0c19704..c246a1ecd6 100644 --- a/meta/classes-global/uninative.bbclass +++ b/meta/classes-global/uninative.bbclass | |||
@@ -142,7 +142,7 @@ def enable_uninative(d): | |||
142 | loader = d.getVar("UNINATIVE_LOADER") | 142 | loader = d.getVar("UNINATIVE_LOADER") |
143 | if os.path.exists(loader): | 143 | if os.path.exists(loader): |
144 | bb.debug(2, "Enabling uninative") | 144 | bb.debug(2, "Enabling uninative") |
145 | d.setVar("NATIVELSBSTRING", "universal%s" % oe.utils.host_gcc_version(d)) | 145 | d.setVar("NATIVELSBSTRING", "universal") |
146 | d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp") | 146 | d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp") |
147 | d.appendVarFlag("SSTATEPOSTUNPACKFUNCS", "vardepvalueexclude", "| uninative_changeinterp") | 147 | d.appendVarFlag("SSTATEPOSTUNPACKFUNCS", "vardepvalueexclude", "| uninative_changeinterp") |
148 | d.appendVar("BUILD_LDFLAGS", " -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=${UNINATIVE_LOADER} -pthread") | 148 | d.appendVar("BUILD_LDFLAGS", " -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=${UNINATIVE_LOADER} -pthread") |