mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
sanity.bbclass: Check for the known broken version of make
See GNU Savannah bug 30612 -- make 3.82 is known to be broken. A number of vendors are providing a modified version, so checking for just the version string is not enough. We also need to check if the patch for the issue has been applied. We use a modified version of the reproduced to check for the issue. (From OE-Core rev: dede532a980b0fabf0beae4519b89ec74a1c2474) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
f744edc0b8
commit
9b007f61b2
@@ -306,6 +306,42 @@ def check_gcc_march(sanity_data):
|
|||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
# Unpatched versions of make 3.82 are known to be broken. See GNU Savannah Bug 30612.
|
||||||
|
# Use a modified reproducer from http://savannah.gnu.org/bugs/?30612 to validate.
|
||||||
|
def check_make_version(sanity_data):
|
||||||
|
from distutils.version import LooseVersion
|
||||||
|
status, result = oe.utils.getstatusoutput("make --version")
|
||||||
|
if status != 0:
|
||||||
|
return "Unable to execute make --version, exit code %s\n" % status
|
||||||
|
version = result.split()[2]
|
||||||
|
if LooseVersion(version) == LooseVersion("3.82"):
|
||||||
|
# Construct a test file
|
||||||
|
f = open("makefile_test", "w")
|
||||||
|
f.write("makefile_test.a: makefile_test_a.c makefile_test_b.c makefile_test.a( makefile_test_a.c makefile_test_b.c)\n")
|
||||||
|
f.write("\n")
|
||||||
|
f.write("makefile_test_a.c:\n")
|
||||||
|
f.write(" touch $@\n")
|
||||||
|
f.write("\n")
|
||||||
|
f.write("makefile_test_b.c:\n")
|
||||||
|
f.write(" touch $@\n")
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
# Check if make 3.82 has been patched
|
||||||
|
status,result = oe.utils.getstatusoutput("make -f makefile_test")
|
||||||
|
|
||||||
|
os.remove("makefile_test")
|
||||||
|
if os.path.exists("makefile_test_a.c"):
|
||||||
|
os.remove("makefile_test_a.c")
|
||||||
|
if os.path.exists("makefile_test_b.c"):
|
||||||
|
os.remove("makefile_test_b.c")
|
||||||
|
if os.path.exists("makefile_test.a"):
|
||||||
|
os.remove("makefile_test.a")
|
||||||
|
|
||||||
|
if status != 0:
|
||||||
|
return "Your version of make 3.82 is broken. Please revert to 3.81 or install a patched version.\n"
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
# Tar version 1.24 and onwards handle overwriting symlinks correctly
|
# Tar version 1.24 and onwards handle overwriting symlinks correctly
|
||||||
# but earlier versions do not; this needs to work properly for sstate
|
# but earlier versions do not; this needs to work properly for sstate
|
||||||
def check_tar_version(sanity_data):
|
def check_tar_version(sanity_data):
|
||||||
@@ -436,6 +472,7 @@ def check_sanity_version_change(status, d):
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
status.addresult('Your python is not a full install. Please install the module xml.parsers.expat (python-xml on openSUSE and SUSE Linux).\n')
|
status.addresult('Your python is not a full install. Please install the module xml.parsers.expat (python-xml on openSUSE and SUSE Linux).\n')
|
||||||
|
|
||||||
|
status.addresult(check_make_version(d))
|
||||||
status.addresult(check_tar_version(d))
|
status.addresult(check_tar_version(d))
|
||||||
status.addresult(check_git_version(d))
|
status.addresult(check_git_version(d))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user