summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-06-04 23:47:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-06-06 13:36:05 +0100
commit26d0a9f74ac796c7c02831edffb57f150dc4a61d (patch)
tree4f2f7aa69cfdf1d69e3b83f8e4fd5509e5521dd7
parent25c2ca903ade5c44bbd379ca61ae7031a99c3b8f (diff)
downloadpoky-26d0a9f74ac796c7c02831edffb57f150dc4a61d.tar.gz
sanity: Switch to make 4.0 as a minimum version
We can't build glibc without make 4.0 and we don't work on older distros with older versions of make without buildtools tarball so increase the minimum version to 4.0. (From OE-Core rev: e9a449aeec72a698206323c3471c9268f949b1ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/sanity.bbclass30
1 files changed, 3 insertions, 27 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index b416918013..eb0ca05804 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -432,8 +432,7 @@ def check_patch_version(sanity_data):
432 except subprocess.CalledProcessError as e: 432 except subprocess.CalledProcessError as e:
433 return "Unable to execute patch --version, exit code %d:\n%s\n" % (e.returncode, e.output) 433 return "Unable to execute patch --version, exit code %d:\n%s\n" % (e.returncode, e.output)
434 434
435# Unpatched versions of make 3.82 are known to be broken. See GNU Savannah Bug 30612. 435# Glibc needs make 4.0 or later, we may as well match at this point
436# Use a modified reproducer from http://savannah.gnu.org/bugs/?30612 to validate.
437def check_make_version(sanity_data): 436def check_make_version(sanity_data):
438 import subprocess 437 import subprocess
439 438
@@ -442,31 +441,8 @@ def check_make_version(sanity_data):
442 except subprocess.CalledProcessError as e: 441 except subprocess.CalledProcessError as e:
443 return "Unable to execute make --version, exit code %d\n%s\n" % (e.returncode, e.output) 442 return "Unable to execute make --version, exit code %d\n%s\n" % (e.returncode, e.output)
444 version = result.split()[2] 443 version = result.split()[2]
445 if bb.utils.vercmp_string_op(version, "3.82", "=="): 444 if bb.utils.vercmp_string_op(version, "4.0", "<"):
446 # Construct a test file 445 return "Please install a make version of 4.0 or later.\n"
447 f = open("makefile_test", "w")
448 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")
449 f.write("\n")
450 f.write("makefile_test_a.c:\n")
451 f.write(" touch $@\n")
452 f.write("\n")
453 f.write("makefile_test_b.c:\n")
454 f.write(" touch $@\n")
455 f.close()
456
457 # Check if make 3.82 has been patched
458 try:
459 subprocess.check_call(['make', '-f', 'makefile_test'])
460 except subprocess.CalledProcessError as e:
461 return "Your version of make 3.82 is broken. Please revert to 3.81 or install a patched version.\n"
462 finally:
463 os.remove("makefile_test")
464 if os.path.exists("makefile_test_a.c"):
465 os.remove("makefile_test_a.c")
466 if os.path.exists("makefile_test_b.c"):
467 os.remove("makefile_test_b.c")
468 if os.path.exists("makefile_test.a"):
469 os.remove("makefile_test.a")
470 446
471 if bb.utils.vercmp_string_op(version, "4.2.1", "=="): 447 if bb.utils.vercmp_string_op(version, "4.2.1", "=="):
472 distro = oe.lsb.distro_identifier() 448 distro = oe.lsb.distro_identifier()