summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sanity.bbclass21
1 files changed, 20 insertions, 1 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index fef05fb012..88888e814a 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -521,6 +521,24 @@ def check_wsl(d):
521 return "OpenEmbedded doesn't work under WSL at this time, sorry" 521 return "OpenEmbedded doesn't work under WSL at this time, sorry"
522 return None 522 return None
523 523
524# Require at least gcc version 4.8.
525#
526# This can be fixed on CentOS-7 with devtoolset-6+
527# https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6/
528#
529# A less invasive fix is with scripts/install-buildtools (or with user
530# built buildtools-extended-tarball)
531#
532def check_gcc_version(sanity_data):
533 from distutils.version import LooseVersion
534 import subprocess
535
536 build_cc, version = oe.utils.get_host_compiler_version(sanity_data)
537 if build_cc.strip() == "gcc":
538 if LooseVersion(version) < LooseVersion("4.8"):
539 return "Your version of gcc is older than 4.8 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"
540 return None
541
524# Tar version 1.24 and onwards handle overwriting symlinks correctly 542# Tar version 1.24 and onwards handle overwriting symlinks correctly
525# but earlier versions do not; this needs to work properly for sstate 543# but earlier versions do not; this needs to work properly for sstate
526# Version 1.28 is needed so opkg-build works correctly when reproducibile builds are enabled 544# Version 1.28 is needed so opkg-build works correctly when reproducibile builds are enabled
@@ -533,7 +551,7 @@ def check_tar_version(sanity_data):
533 return "Unable to execute tar --version, exit code %d\n%s\n" % (e.returncode, e.output) 551 return "Unable to execute tar --version, exit code %d\n%s\n" % (e.returncode, e.output)
534 version = result.split()[3] 552 version = result.split()[3]
535 if LooseVersion(version) < LooseVersion("1.28"): 553 if LooseVersion(version) < LooseVersion("1.28"):
536 return "Your version of tar is older than 1.28 and does not have the support needed to enable reproducible builds. Please install a newer version of tar (you could use the projects buildtools-tarball from our last release or use scripts/install-buildtools).\n" 554 return "Your version of tar is older than 1.28 and does not have the support needed to enable reproducible builds. Please install a newer version of tar (you could use the project's buildtools-tarball from our last release or use scripts/install-buildtools).\n"
537 return None 555 return None
538 556
539# We use git parameters and functionality only found in 1.7.8 or later 557# We use git parameters and functionality only found in 1.7.8 or later
@@ -632,6 +650,7 @@ def check_sanity_version_change(status, d):
632 except ImportError as e: 650 except ImportError as e:
633 status.addresult('Your Python 3 is not a full install. Please install the module %s (see the Getting Started guide for further information).\n' % e.name) 651 status.addresult('Your Python 3 is not a full install. Please install the module %s (see the Getting Started guide for further information).\n' % e.name)
634 652
653 status.addresult(check_gcc_version(d))
635 status.addresult(check_make_version(d)) 654 status.addresult(check_make_version(d))
636 status.addresult(check_patch_version(d)) 655 status.addresult(check_patch_version(d))
637 status.addresult(check_tar_version(d)) 656 status.addresult(check_tar_version(d))